Merge "Prevent SecurityException from crashing Recents"
This commit is contained in:
committed by
Android (Google) Code Review
commit
bde3104ddc
@@ -682,8 +682,12 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
|
|||||||
| Intent.FLAG_ACTIVITY_TASK_ON_HOME
|
| Intent.FLAG_ACTIVITY_TASK_ON_HOME
|
||||||
| Intent.FLAG_ACTIVITY_NEW_TASK);
|
| Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
if (DEBUG) Log.v(TAG, "Starting activity " + intent);
|
if (DEBUG) Log.v(TAG, "Starting activity " + intent);
|
||||||
context.startActivityAsUser(intent, opts,
|
try {
|
||||||
new UserHandle(UserHandle.USER_CURRENT));
|
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) {
|
if (usingDrawingCache) {
|
||||||
holder.thumbnailViewImage.setDrawingCacheEnabled(false);
|
holder.thumbnailViewImage.setDrawingCacheEnabled(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user