OSDN Git Service

"Back" with translucent window now sets ActivityOptions.
authorGeorge Mount <mount@google.com>
Wed, 3 Sep 2014 19:35:09 +0000 (12:35 -0700)
committerGeorge Mount <mount@google.com>
Thu, 4 Sep 2014 18:02:29 +0000 (11:02 -0700)
Also made convertToTranslucent set the canvas opacity.

Bug 16215650

Change-Id: Id4325eaed34cda1269d874f239aeb5f6f82c959f

core/java/android/app/Activity.java
policy/src/com/android/internal/policy/impl/PhoneWindow.java
services/core/java/com/android/server/am/ActivityManagerService.java

index 8ab344e..29ef484 100644 (file)
@@ -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.
index 93591a9..958e277 100644 (file)
@@ -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,
index 389369f..0c21f75 100755 (executable)
@@ -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;
             }