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

Commit ec07c289 authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

Add a SysPropBooleanFlag for the lockscreen-lwp project.

This is in order to teamfood the flag and flip it more easily. The flag
is SysProp since accessed from different repos (mainly Frameworks/base and LivePicker)

Bug: 273443374
Test: manual: flip the flag in the flippin app and observe the change
Change-Id: Ic5b488a80b8e946069fd4eadbd895c2bb8e7f4bc
parent 0e6239a9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -243,4 +243,11 @@ interface IWallpaperManager {
     * @hide
     */
    boolean lockScreenWallpaperExists();

    /**
     * Temporary method for project b/197814683.
     * Return true if the lockscreen wallpaper always uses a WallpaperService, not a static image.
     * @hide
     */
     boolean isLockscreenLiveWallpaperEnabled();
}
+14 −7
Original line number Diff line number Diff line
@@ -142,9 +142,6 @@ public class WallpaperManager {
    private static final @NonNull RectF LOCAL_COLOR_BOUNDS =
            new RectF(0, 0, 1, 1);

    /** Temporary feature flag for project b/197814683 */
    private final boolean mLockscreenLiveWallpaper;

    /** {@hide} */
    private static final String PROP_WALLPAPER = "ro.config.wallpaper";
    /** {@hide} */
@@ -306,6 +303,7 @@ public class WallpaperManager {
    private final Context mContext;
    private final boolean mWcgEnabled;
    private final ColorManagementProxy mCmProxy;
    private Boolean mIsLockscreenLiveWallpaperEnabled = null;

    /**
     * Special drawable that draws a wallpaper as fast as possible.  Assumes
@@ -794,8 +792,6 @@ public class WallpaperManager {
        mWcgEnabled = context.getResources().getConfiguration().isScreenWideColorGamut()
                && context.getResources().getBoolean(R.bool.config_enableWcgMode);
        mCmProxy = new ColorManagementProxy(context);
        mLockscreenLiveWallpaper = context.getResources()
                .getBoolean(R.bool.config_independentLockscreenLiveWallpaper);
    }

    // no-op constructor called just by DisabledWallpaperManager
@@ -803,7 +799,6 @@ public class WallpaperManager {
        mContext = null;
        mCmProxy = null;
        mWcgEnabled = false;
        mLockscreenLiveWallpaper = false;
    }

    /**
@@ -827,7 +822,19 @@ public class WallpaperManager {
     */
    @TestApi
    public boolean isLockscreenLiveWallpaperEnabled() {
        return mLockscreenLiveWallpaper;
        if (sGlobals == null) {
            mIsLockscreenLiveWallpaperEnabled = SystemProperties.getBoolean(
                    "persist.wm.debug.lockscreen_live_wallpaper", false);
        }
        if (mIsLockscreenLiveWallpaperEnabled == null) {
            try {
                mIsLockscreenLiveWallpaperEnabled =
                        sGlobals.mService.isLockscreenLiveWallpaperEnabled();
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
        }
        return mIsLockscreenLiveWallpaperEnabled;
    }

    /**
+0 −4
Original line number Diff line number Diff line
@@ -6296,10 +6296,6 @@
    -->
    <integer name="config_deviceStateRearDisplay">-1</integer>

    <!-- Whether the lock screen is allowed to run its own live wallpaper,
         different from the home screen wallpaper. -->
    <bool name="config_independentLockscreenLiveWallpaper">false</bool>

    <!-- Device state that corresponds to concurrent display mode where the default display
         is the internal display. Public API for the feature is provided through Jetpack
         WindowManager.
+0 −1
Original line number Diff line number Diff line
@@ -4956,7 +4956,6 @@
  <java-symbol type="string" name="concurrent_display_notification_power_save_content"/>
  <java-symbol type="string" name="device_state_notification_turn_off_button"/>
  <java-symbol type="string" name="device_state_notification_settings_button"/>
  <java-symbol type="bool" name="config_independentLockscreenLiveWallpaper"/>
  <java-symbol type="integer" name="config_deviceStateConcurrentRearDisplay" />
  <java-symbol type="string" name="config_rearDisplayPhysicalAddress" />

+5 −0
Original line number Diff line number Diff line
@@ -513,6 +513,11 @@ object Flags {
        sysPropBooleanFlag(
            1116, "persist.wm.debug.enable_move_floating_window_in_tabletop", default = true)

    // TODO(b/273443374): Tracking Bug
    @Keep
    @JvmField val LOCKSCREEN_LIVE_WALLPAPER =
        sysPropBooleanFlag(1117, "persist.wm.debug.lockscreen_live_wallpaper", default = false)

    // 1200 - predictive back
    @Keep
    @JvmField
Loading