summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-11-19 16:12:01 (GMT)
committerMatt Garnes <matt@cyngn.com>2014-11-19 19:21:58 (GMT)
commitb8f623db36a1de8703911949bafc418804f64a20 (patch)
treed4070904b3def29f7b2a693c63881726573e0398
parentf7bef2545ba45e8405dd5a00c0d276d669bf0ad0 (diff)
downloadandroid_packages_apps_Trebuchet-b8f623db36a1de8703911949bafc418804f64a20.zip
android_packages_apps_Trebuchet-b8f623db36a1de8703911949bafc418804f64a20.tar.gz
android_packages_apps_Trebuchet-b8f623db36a1de8703911949bafc418804f64a20.tar.bz2
Search Provider: Remove Action.ASSIST preference
Always return to Trebuchet on return gesture. Change-Id: I92ca0dc3bfcb7763691a1d73381c2a6cebebdae3
-rw-r--r--src/com/android/launcher3/GelIntegrationHelper.java24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/com/android/launcher3/GelIntegrationHelper.java b/src/com/android/launcher3/GelIntegrationHelper.java
index fbd6e5b..5f5b81c 100644
--- a/src/com/android/launcher3/GelIntegrationHelper.java
+++ b/src/com/android/launcher3/GelIntegrationHelper.java
@@ -68,6 +68,7 @@ public class GelIntegrationHelper {
Intent homeIntent = new Intent(Intent.ACTION_MAIN);
homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
homeIntent.addCategory(Intent.CATEGORY_HOME);
+ homeIntent.setPackage(launcherActivity.getPackageName());
launcherActivity.startActivity(homeIntent);
launcherActivity.overridePendingTransition(0, 0);
dropEventsUntilLift();
@@ -80,16 +81,13 @@ public class GelIntegrationHelper {
int edge = isLayoutRtl ? EDGE_GESTURE_SERVICE_LEFT_EDGE : EDGE_GESTURE_SERVICE_RIGHT_EDGE;
edgeGestureManager.updateEdgeGestureActivationListener(mEdgeGestureActivationListener,
edge);
- // Attempt to use Intent.ACTION_ASSIST, if supported
- Intent intent = new Intent(Intent.ACTION_ASSIST);
- if (!isIntentSupported(launcherActivity, intent)) {
- // Start the Global Search Activity
- final SearchManager searchManager =
- (SearchManager) launcherActivity.getSystemService(Context.SEARCH_SERVICE);
- ComponentName globalSearchActivity = searchManager.getGlobalSearchActivity();
- intent = new Intent();
- intent.setComponent(globalSearchActivity);
- }
+
+ // Start the Global Search Activity
+ final SearchManager searchManager =
+ (SearchManager) launcherActivity.getSystemService(Context.SEARCH_SERVICE);
+ ComponentName globalSearchActivity = searchManager.getGlobalSearchActivity();
+ Intent intent = new Intent();
+ intent.setComponent(globalSearchActivity);
try {
launcherActivity.startActivity(intent);
@@ -98,10 +96,4 @@ public class GelIntegrationHelper {
Log.e(TAG, "Unable to launch global search activity.");
}
}
-
- private boolean isIntentSupported(Context context, Intent intent) {
- PackageManager pm = context.getPackageManager();
- return pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null;
- }
-
}