Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d285d67f authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge changes I5df77ae5,Ice538d09,I2451be87,I953ab6cb,Ie1b8debc

* changes:
  If the surface of a window is displayed, screenshot
  Update starting window fade out to spec
  Fill task snapshot with background color
  Add starting windows while unlocking
  Starting window tests, yay!
parents e5ec7080 52e85da8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,8 +21,8 @@
<alpha
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:detachWallpaper="true"
    android:interpolator="@interpolator/decelerate_quad"
    android:interpolator="@interpolator/linear"
    android:fromAlpha="1.0"
    android:toAlpha="0.0"
    android:duration="160" />
    android:duration="150" />
+6 −0
Original line number Diff line number Diff line
@@ -1795,6 +1795,12 @@ final class ActivityStack extends ConfigurationContainer {
        }
    }

    void addStartingWindowsForVisibleActivities(boolean taskSwitch) {
        for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {
            mTaskHistory.get(taskNdx).addStartingWindowsForVisibleActivities(taskSwitch);
        }
    }

    /**
     * @return true if the top visible activity wants to occlude the Keyguard, false otherwise
     */
+11 −0
Original line number Diff line number Diff line
@@ -3229,6 +3229,17 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
        }
    }

    void addStartingWindowsForVisibleActivities(boolean taskSwitch) {
        for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
            final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
            final int topStackNdx = stacks.size() - 1;
            for (int stackNdx = topStackNdx; stackNdx >= 0; --stackNdx) {
                final ActivityStack stack = stacks.get(stackNdx);
                stack.addStartingWindowsForVisibleActivities(taskSwitch);
            }
        }
    }

    void invalidateTaskLayers() {
        mTaskLayersChanged = true;
    }
+2 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import static com.android.server.wm.AppTransition.TRANSIT_FLAG_KEYGUARD_GOING_AW
import static com.android.server.wm.AppTransition.TRANSIT_KEYGUARD_GOING_AWAY;
import static com.android.server.wm.AppTransition.TRANSIT_KEYGUARD_OCCLUDE;
import static com.android.server.wm.AppTransition.TRANSIT_KEYGUARD_UNOCCLUDE;
import static com.android.server.wm.AppTransition.TRANSIT_NONE;
import static com.android.server.wm.AppTransition.TRANSIT_UNSET;

import android.os.IBinder;
@@ -120,6 +121,7 @@ class KeyguardController {

                // Some stack visibility might change (e.g. docked stack)
                mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
                mStackSupervisor.addStartingWindowsForVisibleActivities(true /* taskSwitch */);
                mWindowManager.executeAppTransition();
            } finally {
                mWindowManager.continueSurfaceLayout();
+13 −1
Original line number Diff line number Diff line
@@ -416,7 +416,7 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta
        final Configuration overrideConfig = getOverrideConfiguration();
        mWindowContainerController = new TaskWindowContainerController(taskId, this, getStackId(),
                userId, bounds, overrideConfig, mResizeMode, isHomeTask(), isOnTopLauncher(), onTop,
                showForAllUsers);
                showForAllUsers, lastTaskDescription);
    }

    void removeWindowContainer() {
@@ -1402,6 +1402,9 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta
            }
            lastTaskDescription = new TaskDescription(label, null, iconFilename, colorPrimary,
                    colorBackground);
            if (mWindowContainerController != null) {
                mWindowContainerController.setTaskDescription(lastTaskDescription);
            }
            // Update the task affiliation color if we are the parent of the group
            if (taskId == mAffiliatedTaskId) {
                mAffiliatedTaskColor = lastTaskDescription.getPrimaryColor();
@@ -1981,6 +1984,15 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta
        return rootAffinity != null && getStackId() != PINNED_STACK_ID;
    }

    void addStartingWindowsForVisibleActivities(boolean taskSwitch) {
        for (int activityNdx = mActivities.size() - 1; activityNdx >= 0; --activityNdx) {
            final ActivityRecord r = mActivities.get(activityNdx);
            if (r.visible) {
                r.showStartingWindow(null /* prev */, false /* newTask */, taskSwitch);
            }
        }
    }

    void dump(PrintWriter pw, String prefix) {
        pw.print(prefix); pw.print("userId="); pw.print(userId);
                pw.print(" effectiveUid="); UserHandle.formatUid(pw, effectiveUid);
Loading