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

Commit f41a19e7 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [14413935, 14413996, 14413997, 14413998, 14413255, 14413907] into sc-release

Change-Id: Ibdebef3a1629efbc7c81c9b0d020d0b531b52fca
parents 35a27ced 8244759d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -452,6 +452,10 @@ class StageCoordinator implements SplitLayout.LayoutChangeListener,
            // Make sure the main stage is active.
            mMainStage.activate(getMainStageBounds(), wct);
            mSideStage.setBounds(getSideStageBounds(), wct);
            // Reorder side stage to the top whenever there's a new child task appeared in side
            // stage. This is needed to prevent main stage occludes side stage and makes main stage
            // flipping between fullscreen and multi-window windowing mode.
            wct.reorder(mSideStage.mRootTaskInfo.token, true);
            mTaskOrganizer.applyTransaction(wct);
        }
    }
+6 −22
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import com.android.internal.policy.IKeyguardExitCallback;
import com.android.internal.policy.IKeyguardService;
import com.android.internal.policy.IKeyguardStateCallback;
import com.android.systemui.SystemUIApplication;
import com.android.wm.shell.transition.Transitions;

import javax.inject.Inject;

@@ -63,29 +62,16 @@ public class KeyguardService extends Service {
     * Run Keyguard animation as remote animation in System UI instead of local animation in
     * the server process.
     *
     * 0: Runs all keyguard animation as local animation
     * 1: Only runs keyguard going away animation as remote animation
     * 2: Runs all keyguard animation as remote animation
     *
     * Note: Must be consistent with WindowManagerService.
     */
    private static final String ENABLE_REMOTE_KEYGUARD_ANIMATION_PROPERTY =
            "persist.wm.enable_remote_keyguard_animation";

    private static final int sEnableRemoteKeyguardAnimation =
            SystemProperties.getInt(ENABLE_REMOTE_KEYGUARD_ANIMATION_PROPERTY, 1);

    /**
     * @see #ENABLE_REMOTE_KEYGUARD_ANIMATION_PROPERTY
     */
    public static boolean sEnableRemoteKeyguardGoingAwayAnimation =
            !Transitions.ENABLE_SHELL_TRANSITIONS && sEnableRemoteKeyguardAnimation >= 1;

    /**
     * @see #ENABLE_REMOTE_KEYGUARD_ANIMATION_PROPERTY
     */
    public static boolean sEnableRemoteKeyguardOccludeAnimation =
            !Transitions.ENABLE_SHELL_TRANSITIONS && sEnableRemoteKeyguardAnimation >= 2;
    static boolean sEnableRemoteKeyguardAnimation =
            SystemProperties.getBoolean(ENABLE_REMOTE_KEYGUARD_ANIMATION_PROPERTY, false);

    private final KeyguardViewMediator mKeyguardViewMediator;
    private final KeyguardLifecyclesDispatcher mKeyguardLifecyclesDispatcher;
@@ -97,23 +83,21 @@ public class KeyguardService extends Service {
        mKeyguardViewMediator = keyguardViewMediator;
        mKeyguardLifecyclesDispatcher = keyguardLifecyclesDispatcher;

        if (sEnableRemoteKeyguardAnimation) {
            RemoteAnimationDefinition definition = new RemoteAnimationDefinition();
        if (sEnableRemoteKeyguardGoingAwayAnimation) {
            final RemoteAnimationAdapter exitAnimationAdapter =
                    new RemoteAnimationAdapter(mExitAnimationRunner, 0, 0);
            definition.addRemoteAnimation(TRANSIT_OLD_KEYGUARD_GOING_AWAY, exitAnimationAdapter);
            definition.addRemoteAnimation(TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER,
                    exitAnimationAdapter);
        }
        if (sEnableRemoteKeyguardOccludeAnimation) {
            final RemoteAnimationAdapter occludeAnimationAdapter =
                    new RemoteAnimationAdapter(mOccludeAnimationRunner, 0, 0);
            definition.addRemoteAnimation(TRANSIT_OLD_KEYGUARD_OCCLUDE, occludeAnimationAdapter);
            definition.addRemoteAnimation(TRANSIT_OLD_KEYGUARD_UNOCCLUDE, occludeAnimationAdapter);
        }
            ActivityTaskManager.getInstance().registerRemoteAnimationsForDisplay(
                    DEFAULT_DISPLAY, definition);
        }
    }

    @Override
    public void onCreate() {
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
    }

    override fun onKeyguardDismissAmountChanged() {
        if (!KeyguardService.sEnableRemoteKeyguardGoingAwayAnimation) {
        if (!KeyguardService.sEnableRemoteKeyguardAnimation) {
            return
        }

+1 −1
Original line number Diff line number Diff line
@@ -2100,7 +2100,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
                playSounds(false);
            }

            if (KeyguardService.sEnableRemoteKeyguardGoingAwayAnimation) {
            if (KeyguardService.sEnableRemoteKeyguardAnimation) {
                mSurfaceBehindRemoteAnimationFinishedCallback = finishedCallback;
                mSurfaceBehindRemoteAnimationRunning = true;

+1 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.systemui.statusbar;

import static com.android.systemui.statusbar.RemoteInputController.processForRemoteInput;
import static com.android.systemui.statusbar.notification.NotificationEntryManager.UNDEFINED_DISMISS_REASON;
import static com.android.systemui.statusbar.phone.StatusBar.DEBUG;

import android.annotation.NonNull;
import android.annotation.SuppressLint;
@@ -34,7 +35,6 @@ import android.util.Log;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.statusbar.dagger.StatusBarModule;
import com.android.systemui.statusbar.phone.NotificationListenerWithPlugins;
import com.android.systemui.statusbar.phone.StatusBar;

import java.util.ArrayList;
import java.util.List;
@@ -46,7 +46,6 @@ import java.util.List;
@SuppressLint("OverrideAbstract")
public class NotificationListener extends NotificationListenerWithPlugins {
    private static final String TAG = "NotificationListener";
    private static final boolean DEBUG = StatusBar.DEBUG;

    private final Context mContext;
    private final NotificationManager mNotificationManager;
Loading