From 09233289624a85093b1d99e4a6a149bf09059d8d Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 30 Apr 2014 11:33:59 -0700 Subject: Make GET_TASKS signature|system. Normal apps can't hold it now. If they try to use getRecentTasks() or getRunningTasks() without the permission, they will only see their own tasks and home in the list. Also took this opportunity to eradicate all of the old pending thumbnail stuff. Change-Id: I6dc52a06221c78097162e4a8b482027b798bf3ee --- core/java/android/app/ActivityThread.java | 34 +------------------------------ 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'core/java/android/app/ActivityThread.java') diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 7dc21b4..3b2ff7f 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -821,10 +821,6 @@ public final class ActivityThread { sendMessage(H.SUICIDE, null); } - public void requestThumbnail(IBinder token) { - sendMessage(H.REQUEST_THUMBNAIL, token); - } - public void scheduleConfigurationChanged(Configuration config) { updatePendingConfiguration(config); sendMessage(H.CONFIGURATION_CHANGED, config); @@ -1168,7 +1164,7 @@ public final class ActivityThread { public static final int CREATE_SERVICE = 114; public static final int SERVICE_ARGS = 115; public static final int STOP_SERVICE = 116; - public static final int REQUEST_THUMBNAIL = 117; + public static final int CONFIGURATION_CHANGED = 118; public static final int CLEAN_UP_CONTEXT = 119; public static final int GC_WHEN_IDLE = 120; @@ -1218,7 +1214,6 @@ public final class ActivityThread { case CREATE_SERVICE: return "CREATE_SERVICE"; case SERVICE_ARGS: return "SERVICE_ARGS"; case STOP_SERVICE: return "STOP_SERVICE"; - case REQUEST_THUMBNAIL: return "REQUEST_THUMBNAIL"; case CONFIGURATION_CHANGED: return "CONFIGURATION_CHANGED"; case CLEAN_UP_CONTEXT: return "CLEAN_UP_CONTEXT"; case GC_WHEN_IDLE: return "GC_WHEN_IDLE"; @@ -1367,11 +1362,6 @@ public final class ActivityThread { maybeSnapshot(); Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); break; - case REQUEST_THUMBNAIL: - Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "requestThumbnail"); - handleRequestThumbnail((IBinder)msg.obj); - Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); - break; case CONFIGURATION_CHANGED: Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "configChanged"); mCurDefaultDisplayDpi = ((Configuration)msg.obj).densityDpi; @@ -3817,28 +3807,6 @@ public final class ActivityThread { handleLaunchActivity(r, currentIntent); } - private void handleRequestThumbnail(IBinder token) { - ActivityClientRecord r = mActivities.get(token); - Bitmap thumbnail = createThumbnailBitmap(r); - CharSequence description = null; - try { - description = r.activity.onCreateDescription(); - } catch (Exception e) { - if (!mInstrumentation.onException(r.activity, e)) { - throw new RuntimeException( - "Unable to create description of activity " - + r.intent.getComponent().toShortString() - + ": " + e.toString(), e); - } - } - //System.out.println("Reporting top thumbnail " + thumbnail); - try { - ActivityManagerNative.getDefault().reportThumbnail( - token, thumbnail, description); - } catch (RemoteException ex) { - } - } - ArrayList collectComponentCallbacks( boolean allActivities, Configuration newConfig) { ArrayList callbacks -- cgit v1.1