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

Commit 087fcd5d authored by Aurélien Pomini's avatar Aurélien Pomini Committed by Android (Google) Code Review
Browse files

Merge "Migrate multi crop flag" into main

parents 428ef5d7 2807c901
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ import static android.Manifest.permission.READ_WALLPAPER_INTERNAL;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.ParcelFileDescriptor.MODE_READ_ONLY;

import static com.android.window.flags.Flags.multiCrop;

import android.annotation.FloatRange;
import android.annotation.IntDef;
import android.annotation.NonNull;
@@ -857,8 +859,7 @@ public class WallpaperManager {
     */
    public static boolean isMultiCropEnabled() {
        if (sGlobals == null) {
            sIsMultiCropEnabled = SystemProperties.getBoolean(
                    "persist.wm.debug.wallpaper_multi_crop", false);
            sIsMultiCropEnabled = multiCrop();
        }
        if (sIsMultiCropEnabled == null) {
            try {
+8 −1
Original line number Diff line number Diff line
@@ -6,3 +6,10 @@ flag {
    description: "Allow out of focus process to update wallpaper complications"
    bug: "271132915"
}

flag {
  name: "multi_crop"
  namespace: "systemui"
  description: "Support storing different wallpaper crops for different display dimensions. Only effective after rebooting."
  bug: "281648899"
}
+0 −6
Original line number Diff line number Diff line
@@ -438,12 +438,6 @@ object Flags {
    val LOCKSCREEN_ENABLE_LANDSCAPE =
            unreleasedFlag("lockscreen.enable_landscape")

    // TODO(b/281648899): Tracking bug
    @Keep
    @JvmField
    val WALLPAPER_MULTI_CROP =
        sysPropBooleanFlag("persist.wm.debug.wallpaper_multi_crop", default = false)

    // 1200 - predictive back
    @Keep
    @JvmField
+2 −3
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import static com.android.server.wallpaper.WallpaperUtils.WALLPAPER_INFO;
import static com.android.server.wallpaper.WallpaperUtils.WALLPAPER_LOCK_ORIG;
import static com.android.server.wallpaper.WallpaperUtils.getWallpaperDir;
import static com.android.server.wallpaper.WallpaperUtils.makeWallpaperIdLocked;
import static com.android.window.flags.Flags.multiCrop;

import android.annotation.NonNull;
import android.app.ActivityManager;
@@ -93,7 +94,6 @@ import android.os.ResultReceiver;
import android.os.SELinux;
import android.os.ShellCallback;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManager;
@@ -1516,8 +1516,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
        mColorsChangedListeners = new SparseArray<>();
        mWallpaperDataParser = new WallpaperDataParser(mContext, mWallpaperDisplayHelper,
                mWallpaperCropper);
        mIsMultiCropEnabled =
                SystemProperties.getBoolean("persist.wm.debug.wallpaper_multi_crop", false);
        mIsMultiCropEnabled = multiCrop();
        LocalServices.addService(WallpaperManagerInternal.class, new LocalService());
    }