summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2013-02-08 15:41:56 +0100
committerPaul Kocialkowski <contact@paulk.fr>2015-08-31 10:50:34 +0200
commitd1fdb3c761c61a19ce42d104c7b010418be3d058 (patch)
treede0c02932c8efaf59f1d7255b539dbc212ee9bf7
parenta6de323672a3d3e3e5510cf47a4cd1d61118ba98 (diff)
downloadframeworks_base-d1fdb3c761c61a19ce42d104c7b010418be3d058.zip
frameworks_base-d1fdb3c761c61a19ce42d104c7b010418be3d058.tar.gz
frameworks_base-d1fdb3c761c61a19ce42d104c7b010418be3d058.tar.bz2
Prevent SecurityException from crashing Recents
Bug: 6787477 Signed-off-by: Michael Jurka <mikejurka@google.com> Tested-by: Moritz Bandemer <replicant@posteo.mx>
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 3b4155c..c30b4a0 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -693,8 +693,12 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
| Intent.FLAG_ACTIVITY_TASK_ON_HOME
| Intent.FLAG_ACTIVITY_NEW_TASK);
if (DEBUG) Log.v(TAG, "Starting activity " + intent);
- context.startActivityAsUser(intent, opts,
- new UserHandle(UserHandle.USER_CURRENT));
+ try {
+ context.startActivityAsUser(intent, opts,
+ new UserHandle(UserHandle.USER_CURRENT));
+ } catch (SecurityException e) {
+ Log.e(TAG, "Recents does not have the permission to launch " + intent, e);
+ }
}
if (usingDrawingCache) {
holder.thumbnailViewImage.setDrawingCacheEnabled(false);