diff options
author | Michael Jurka <mikejurka@google.com> | 2013-02-08 15:41:56 +0100 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2015-08-31 10:50:34 +0200 |
commit | d1fdb3c761c61a19ce42d104c7b010418be3d058 (patch) | |
tree | de0c02932c8efaf59f1d7255b539dbc212ee9bf7 | |
parent | a6de323672a3d3e3e5510cf47a4cd1d61118ba98 (diff) | |
download | frameworks_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.java | 8 |
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); |