diff options
author | Winson Chung <winsonc@google.com> | 2014-03-07 15:06:19 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2014-03-11 12:03:08 -0700 |
commit | 303e1ff1fec8b240b587bb18b981247a99833aa8 (patch) | |
tree | 277b80ed79659b89d26ce701af9d60593f3b2d9d /services/core/java | |
parent | 4cfde32ff0105d7c8a4743e084f1c9775f4c6b5c (diff) | |
download | frameworks_base-303e1ff1fec8b240b587bb18b981247a99833aa8.zip frameworks_base-303e1ff1fec8b240b587bb18b981247a99833aa8.tar.gz frameworks_base-303e1ff1fec8b240b587bb18b981247a99833aa8.tar.bz2 |
Initial changes for recents.
Change-Id: Ide2c202b4a5b25410f0f32bd0a81ccf817ede38f
Diffstat (limited to 'services/core/java')
-rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerService.java | 18 | ||||
-rwxr-xr-x | services/core/java/com/android/server/am/ActivityStack.java | 16 |
2 files changed, 30 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 864211d..128f636 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -7245,6 +7245,24 @@ public final class ActivityManagerService extends ActivityManagerNative } @Override + public boolean isInHomeStack(int taskId) { + enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS, + "getStackInfo()"); + long ident = Binder.clearCallingIdentity(); + try { + synchronized (this) { + TaskRecord tr = recentTaskForIdLocked(taskId); + if (tr != null) { + return tr.stack.isHomeStack(); + } + } + } finally { + Binder.restoreCallingIdentity(ident); + } + return false; + } + + @Override public int getTaskForActivity(IBinder token, boolean onlyRoot) { synchronized(this) { return ActivityRecord.getTaskForActivityLocked(token, onlyRoot); diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index f3ccdd6..087ad83c 100755 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -71,6 +71,7 @@ import android.os.Looper; import android.os.Message; import android.os.RemoteException; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.util.EventLog; @@ -715,10 +716,17 @@ final class ActivityStack { int w = mThumbnailWidth; int h = mThumbnailHeight; if (w < 0) { - mThumbnailWidth = w = - res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width); - mThumbnailHeight = h = - res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_height); + if (SystemProperties.getBoolean("persist.recents.use_alternate", false)) { + mThumbnailWidth = w = + res.getDimensionPixelSize(com.android.internal.R.dimen.recents_thumbnail_width); + mThumbnailHeight = h = + res.getDimensionPixelSize(com.android.internal.R.dimen.recents_thumbnail_height); + } else { + mThumbnailWidth = w = + res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width); + mThumbnailHeight = h = + res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_height); + } } if (w > 0) { |