summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-11-19 08:12:01 -0800
committerMatt Garnes <matt@cyngn.com>2014-11-19 19:44:13 +0000
commit5555c107ca3edc05bfa03e56e246a7feac65ef88 (patch)
treed4070904b3def29f7b2a693c63881726573e0398
parent872c5eec983308dde70b713a4549a39581516014 (diff)
downloadandroid_packages_apps_Trebuchet-5555c107ca3edc05bfa03e56e246a7feac65ef88.tar.gz
android_packages_apps_Trebuchet-5555c107ca3edc05bfa03e56e246a7feac65ef88.tar.bz2
android_packages_apps_Trebuchet-5555c107ca3edc05bfa03e56e246a7feac65ef88.zip
Search Provider: Remove Action.ASSIST preference
Always return to Trebuchet on return gesture. Change-Id: I92ca0dc3bfcb7763691a1d73381c2a6cebebdae3 (cherry picked from commit b8f623db36a1de8703911949bafc418804f64a20)
-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 fbd6e5b16..5f5b81c50 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;
- }
-
}