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

Commit 86a7d467 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov Committed by Automerger Merge Worker
Browse files

Merge changes from topic "caitlinshk-csi-setlockscreenuser" into udc-qpr-dev am: 11f114e4

parents 59d53af9 11f114e4
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -543,7 +543,6 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW
                state.forceUserActivity,
                state.launchingActivityFromNotification,
                state.mediaBackdropShowing,
                state.wallpaperSupportsAmbientMode,
                state.windowNotTouchable,
                state.componentsForcingTopUi,
                state.forceOpenTokens,
@@ -734,12 +733,6 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW
        apply(mCurrentState);
    }

    @Override
    public void setWallpaperSupportsAmbientMode(boolean supportsAmbientMode) {
        mCurrentState.wallpaperSupportsAmbientMode = supportsAmbientMode;
        apply(mCurrentState);
    }

    /**
     * @param state The {@link StatusBarStateController} of the status bar.
     */
+0 −5
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ class NotificationShadeWindowState(
    @JvmField var forceUserActivity: Boolean = false,
    @JvmField var launchingActivityFromNotification: Boolean = false,
    @JvmField var mediaBackdropShowing: Boolean = false,
    @JvmField var wallpaperSupportsAmbientMode: Boolean = false,
    @JvmField var windowNotTouchable: Boolean = false,
    @JvmField var componentsForcingTopUi: MutableSet<String> = mutableSetOf(),
    @JvmField var forceOpenTokens: MutableSet<Any> = mutableSetOf(),
@@ -84,7 +83,6 @@ class NotificationShadeWindowState(
            forceUserActivity.toString(),
            launchingActivityFromNotification.toString(),
            mediaBackdropShowing.toString(),
            wallpaperSupportsAmbientMode.toString(),
            windowNotTouchable.toString(),
            componentsForcingTopUi.toString(),
            forceOpenTokens.toString(),
@@ -124,7 +122,6 @@ class NotificationShadeWindowState(
            forceUserActivity: Boolean,
            launchingActivity: Boolean,
            backdropShowing: Boolean,
            wallpaperSupportsAmbientMode: Boolean,
            notTouchable: Boolean,
            componentsForcingTopUi: MutableSet<String>,
            forceOpenTokens: MutableSet<Any>,
@@ -153,7 +150,6 @@ class NotificationShadeWindowState(
                this.forceUserActivity = forceUserActivity
                this.launchingActivityFromNotification = launchingActivity
                this.mediaBackdropShowing = backdropShowing
                this.wallpaperSupportsAmbientMode = wallpaperSupportsAmbientMode
                this.windowNotTouchable = notTouchable
                this.componentsForcingTopUi.clear()
                this.componentsForcingTopUi.addAll(componentsForcingTopUi)
@@ -200,7 +196,6 @@ class NotificationShadeWindowState(
                "forceUserActivity",
                "launchingActivity",
                "backdropShowing",
                "wallpaperSupportsAmbientMode",
                "notTouchable",
                "componentsForcingTopUi",
                "forceOpenTokens",
+0 −3
Original line number Diff line number Diff line
@@ -112,9 +112,6 @@ public interface NotificationShadeWindowController extends RemoteInputController
    /** Sets the state of whether heads up is showing or not. */
    default void setHeadsUpShowing(boolean showing) {}

    /** Sets whether the wallpaper supports ambient mode or not. */
    default void setWallpaperSupportsAmbientMode(boolean supportsAmbientMode) {}

    /** Gets whether the wallpaper is showing or not. */
    default boolean isShowingWallpaper() {
        return false;
+0 −2
Original line number Diff line number Diff line
@@ -259,8 +259,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {

    void readyForKeyguardDone();

    void setLockscreenUser(int newUserId);

    void showKeyguard();

    boolean hideKeyguard();
+0 −49
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import android.app.PendingIntent;
import android.app.StatusBarManager;
import android.app.TaskInfo;
import android.app.UiModeManager;
import android.app.WallpaperInfo;
import android.app.WallpaperManager;
import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
@@ -980,16 +979,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {

        createAndAddWindows(result);

        if (mWallpaperSupported) {
            // Make sure we always have the most current wallpaper info.
            IntentFilter wallpaperChangedFilter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED);
            mBroadcastDispatcher.registerReceiver(mWallpaperChangedReceiver, wallpaperChangedFilter,
                    null /* handler */, UserHandle.ALL);
            mWallpaperChangedReceiver.onReceive(mContext, null);
        } else if (DEBUG) {
            Log.v(TAG, "start(): no wallpaper service ");
        }

        // Set up the initial notification state. This needs to happen before CommandQueue.disable()
        setUpPresenter();

@@ -2163,18 +2152,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        }
    };

    /**
     * Notify the shade controller that the current user changed
     *
     * @param newUserId userId of the new user
     */
    @Override
    public void setLockscreenUser(int newUserId) {
        if (mWallpaperSupported) {
            mWallpaperChangedReceiver.onReceive(mContext, null);
        }
    }

    /**
     * Reload some of our resources when the configuration changes.
     *
@@ -3549,32 +3526,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        }
    };

    /**
     * @deprecated See {@link com.android.systemui.wallpapers.data.repository.WallpaperRepository}
     * instead.
     */
    private final BroadcastReceiver mWallpaperChangedReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            if (!mWallpaperSupported) {
                // Receiver should not have been registered at all...
                Log.wtf(TAG, "WallpaperManager not supported");
                return;
            }
            WallpaperInfo info = mWallpaperManager.getWallpaperInfoForUser(
                    mUserTracker.getUserId());
            mWallpaperController.onWallpaperInfoUpdated(info);

            final boolean deviceSupportsAodWallpaper = mContext.getResources().getBoolean(
                    com.android.internal.R.bool.config_dozeSupportsAodWallpaper);
            // If WallpaperInfo is null, it must be ImageWallpaper.
            final boolean supportsAmbientMode = deviceSupportsAodWallpaper
                    && (info != null && info.supportsAmbientMode());

            mNotificationShadeWindowController.setWallpaperSupportsAmbientMode(supportsAmbientMode);
        }
    };

    private final ConfigurationListener mConfigurationListener = new ConfigurationListener() {
        @Override
        public void onConfigChanged(Configuration newConfig) {
Loading