diff options
| author | Dianne Hackborn <hackbod@google.com> | 2014-04-30 11:33:59 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2014-05-02 11:51:26 -0700 |
| commit | 09233289624a85093b1d99e4a6a149bf09059d8d (patch) | |
| tree | ced7eefedc4db60d4134aee3616e9b043cd950d7 /core/java/android/app/ActivityThread.java | |
| parent | 201a24f652745c4bcbe7e26f0ffea973bcb615b3 (diff) | |
| download | frameworks_base-09233289624a85093b1d99e4a6a149bf09059d8d.zip frameworks_base-09233289624a85093b1d99e4a6a149bf09059d8d.tar.gz frameworks_base-09233289624a85093b1d99e4a6a149bf09059d8d.tar.bz2 | |
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
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 34 |
1 files changed, 1 insertions, 33 deletions
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<ComponentCallbacks2> collectComponentCallbacks( boolean allActivities, Configuration newConfig) { ArrayList<ComponentCallbacks2> callbacks |
