diff options
author | Craig Mautner <cmautner@google.com> | 2013-08-19 23:11:50 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-19 23:13:47 +0000 |
commit | 007751276c210c39bd405ae9fa69854e67e80951 (patch) | |
tree | e3dc7267ee3cb3679626d764e485d2368165881d /services | |
parent | b6c38e9de1a2824ce599d7074fa4a226926177c1 (diff) | |
parent | bc57cd1b248bf23e443581f9fe44167c94699ce8 (diff) | |
download | frameworks_base-007751276c210c39bd405ae9fa69854e67e80951.zip frameworks_base-007751276c210c39bd405ae9fa69854e67e80951.tar.gz frameworks_base-007751276c210c39bd405ae9fa69854e67e80951.tar.bz2 |
Merge "Notify ViewRootImpl when it's safe to modify Canvas." into klp-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index 3f58fa4..8f4b6c2 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -8154,18 +8154,20 @@ public final class ActivityManagerService extends ActivityManagerNative } @Override - public void convertFromTranslucent(IBinder token) { + public boolean convertFromTranslucent(IBinder token) { final long origId = Binder.clearCallingIdentity(); try { synchronized (this) { final ActivityRecord r = ActivityRecord.isInStackLocked(token); if (r == null) { - return; + return false; } if (r.changeWindowTranslucency(true)) { mWindowManager.setAppFullscreen(token, true); mStackSupervisor.ensureActivitiesVisibleLocked(null, 0); + return true; } + return false; } } finally { Binder.restoreCallingIdentity(origId); @@ -8173,19 +8175,21 @@ public final class ActivityManagerService extends ActivityManagerNative } @Override - public void convertToTranslucent(IBinder token) { + public boolean convertToTranslucent(IBinder token) { final long origId = Binder.clearCallingIdentity(); try { synchronized (this) { final ActivityRecord r = ActivityRecord.isInStackLocked(token); if (r == null) { - return; + return false; } if (r.changeWindowTranslucency(false)) { r.task.stack.convertToTranslucent(r); mWindowManager.setAppFullscreen(token, false); mStackSupervisor.ensureActivitiesVisibleLocked(null, 0); + return true; } + return false; } } finally { Binder.restoreCallingIdentity(origId); |