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

Commit 5feaa616 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[CS] 4/N: Remove wallpaperSupportsAmbientMode from shade window.

It appears this variable is unused.

Bug: 277762009
Bug: 277764509
Test: mp sysuig
Test: atest NotificationShadeWindowControllerImplTest
Change-Id: I8445e64ebcdb8b9ce815890adae643692679a15a
parent 400abd93
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 −8
Original line number Diff line number Diff line
@@ -3565,14 +3565,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
            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);
        }
    };