From 9e18397112df0ebe49b9e4325d7040498b2afcfa Mon Sep 17 00:00:00 2001 From: George Mount Date: Wed, 3 Sep 2014 12:35:09 -0700 Subject: "Back" with translucent window now sets ActivityOptions. Also made convertToTranslucent set the canvas opacity. Bug 16215650 Change-Id: Id4325eaed34cda1269d874f239aeb5f6f82c959f --- core/java/android/app/Activity.java | 1 + policy/src/com/android/internal/policy/impl/PhoneWindow.java | 1 - services/core/java/com/android/server/am/ActivityManagerService.java | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 8ab344e..29ef484 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -5410,6 +5410,7 @@ public class Activity extends ContextThemeWrapper mTranslucentCallback = callback; mChangeCanvasToTranslucent = ActivityManagerNative.getDefault().convertToTranslucent(mToken, options); + WindowManagerGlobal.getInstance().changeCanvasOpacity(mToken, false); drawComplete = true; } catch (RemoteException e) { // Make callback return as though it timed out. diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 93591a9..958e277 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -2890,7 +2890,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { invalidate(); int opacity = PixelFormat.OPAQUE; - // Note: if there is no background, we will assume opaque. The // common case seems to be that an application sets there to be // no background so it can draw everything itself. For that, diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 389369f..0c21f75 100755 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -10307,8 +10307,8 @@ public final class ActivityManagerService extends ActivityManagerNative final boolean translucentChanged = r.changeWindowTranslucency(false); if (translucentChanged) { r.task.stack.convertToTranslucent(r); - mStackSupervisor.ensureActivitiesVisibleLocked(null, 0); } + mStackSupervisor.ensureActivitiesVisibleLocked(null, 0); mWindowManager.setAppFullscreen(token, false); return translucentChanged; } -- cgit v1.1