summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Garnes <matt@cyngn.com>2014-10-27 14:41:18 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2014-10-31 22:20:26 +0000
commit956a856a47d2faefa0101d1fae7b6ab0967234ea (patch)
treed21d71eb530fe25a28e85e9272f87f0b5daae692 /src
parentaf6bd9fe6d94fc7b3834602fcd643916f1c923ae (diff)
downloadandroid_packages_apps_Trebuchet-956a856a47d2faefa0101d1fae7b6ab0967234ea.tar.gz
android_packages_apps_Trebuchet-956a856a47d2faefa0101d1fae7b6ab0967234ea.tar.bz2
android_packages_apps_Trebuchet-956a856a47d2faefa0101d1fae7b6ab0967234ea.zip
Catch ActivityNotFoundException when launching GlobalSearchActivity.staging/cm-12.0-caf
When the left panel is set to launch the Global Search Activity, this can throw an ActivityNotFoundException if the application is updating while the user swipes to the left. Catch this exception and log it in the occurance of this unlikely timing. Change-Id: Ic7aed06697e873787d64a36556cbfc8a3e840aa4
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/GelIntegrationHelper.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/launcher3/GelIntegrationHelper.java b/src/com/android/launcher3/GelIntegrationHelper.java
index 118be19db..fbd6e5b16 100644
--- a/src/com/android/launcher3/GelIntegrationHelper.java
+++ b/src/com/android/launcher3/GelIntegrationHelper.java
@@ -3,11 +3,13 @@ package com.android.launcher3;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.SearchManager;
+import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.service.gesture.EdgeGestureManager;
+import android.util.Log;
import com.android.internal.util.gesture.EdgeGesturePosition;
import java.util.List;
@@ -18,6 +20,7 @@ import java.util.List;
* in CyanogenMod.
*/
public class GelIntegrationHelper {
+ private static final String TAG = "GelIntegrationHelper";
private static final String GEL_ACTIVITY = "com.google.android.velvet.ui.VelvetActivity";
private static final String GEL_PACKAGE_NAME = "com.google.android.googlequicksearchbox";
@@ -88,8 +91,12 @@ public class GelIntegrationHelper {
intent.setComponent(globalSearchActivity);
}
- launcherActivity.startActivity(intent);
- launcherActivity.overridePendingTransition(0, R.anim.exit_out_right);
+ try {
+ launcherActivity.startActivity(intent);
+ launcherActivity.overridePendingTransition(0, R.anim.exit_out_right);
+ } catch (ActivityNotFoundException e) {
+ Log.e(TAG, "Unable to launch global search activity.");
+ }
}
private boolean isIntentSupported(Context context, Intent intent) {