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

Commit 5248a2a0 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "[conflict] Merge "Extends waiting condition for wake up transition."...

Merge "[conflict] Merge "Extends waiting condition for wake up transition." into tm-qpr-dev am: b8d50a3f" into tm-qpr-dev-plus-aosp
parents 9b7ac10c 3e5f2104
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -4547,7 +4547,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                                    pmWakeReason)) + ")");
        }

        mActivityTaskManagerInternal.notifyWakingUp();
        mDefaultDisplayPolicy.setAwake(true);

        // Since goToSleep performs these functions synchronously, we must
+4 −0
Original line number Diff line number Diff line
@@ -9670,6 +9670,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    @Override
    boolean isSyncFinished() {
        if (!super.isSyncFinished()) return false;
        if (mDisplayContent != null && mDisplayContent.mUnknownAppVisibilityController
                .isVisibilityUnknown(this)) {
            return false;
        }
        if (!isVisibleRequested()) return true;
        // Wait for attach. That is the earliest time where we know if there will be an associated
        // display rotation. If we don't wait, the starting-window can finishDrawing first and
+0 −3
Original line number Diff line number Diff line
@@ -666,9 +666,6 @@ public abstract class ActivityTaskManagerInternal {
    public abstract boolean hasSystemAlertWindowPermission(int callingUid, int callingPid,
            String callingPackage);

    /** Called when the device is waking up */
    public abstract void notifyWakingUp();

    /**
     * Registers a callback which can intercept activity starts.
     * @throws IllegalArgumentException if duplicate ids are provided
+0 −10
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ import static android.provider.Settings.System.FONT_SCALE;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_LAUNCHER_CLEAR_SNAPSHOT;
import static android.view.WindowManager.TRANSIT_WAKE;

import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_CONFIGURATION;
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_FOCUS;
@@ -6623,15 +6622,6 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                    callingPid, callingPackage);
        }

        @Override
        public void notifyWakingUp() {
            synchronized (mGlobalLock) {
                // Start a transition for waking. This is needed for showWhenLocked activities.
                getTransitionController().requestTransitionIfNeeded(TRANSIT_WAKE, 0 /* flags */,
                        null /* trigger */, mRootWindowContainer.getDefaultDisplay());
            }
        }

        @Override
        public void registerActivityStartInterceptor(
                @ActivityInterceptorCallback.OrderedId int id,
+16 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
import static android.view.WindowManager.TRANSIT_WAKE;
import static android.view.WindowManagerGlobal.ADD_OKAY;
import static android.view.WindowManagerPolicyConstants.ACTION_HDMI_PLUGGED;
import static android.view.WindowManagerPolicyConstants.ALT_BAR_BOTTOM;
@@ -776,7 +777,22 @@ public class DisplayPolicy {
    }

    public void setAwake(boolean awake) {
        if (awake == mAwake) {
            return;
        }
        mAwake = awake;
        synchronized (mService.mGlobalLock) {
            if (!mDisplayContent.isDefaultDisplay) {
                return;
            }
            if (mAwake) {
                // Start a transition for waking. This is needed for showWhenLocked activities.
                mDisplayContent.mTransitionController.requestTransitionIfNeeded(TRANSIT_WAKE,
                        0 /* flags */, null /* trigger */, mDisplayContent);
            }
            mService.mAtmService.mKeyguardController.updateDeferWakeTransition(
                    mAwake /* waiting */);
        }
    }

    public boolean isAwake() {
Loading