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

Commit 3461dbd3 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/26553605',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/26553605', 'googleplex-android-review.googlesource.com/26552176'] into 24Q2-release.

Change-Id: I3cf6187da8fe2ba0bc0df7401b5b830466b84af7
parents cb1cb072 c5c913c9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginBottom="8dp"
            android:focusable="false"
            androidprv:layout_constraintVertical_bias="1.0"
            androidprv:layout_constraintDimensionRatio="1.0"
            androidprv:layout_constraintStart_toStartOf="parent"
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@
            android:id="@+id/lockPatternView"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:focusable="false"
            androidprv:layout_constraintTop_toBottomOf="@id/pattern_top_guideline"
            androidprv:layout_constraintBottom_toBottomOf="parent"
            androidprv:layout_constraintLeft_toLeftOf="parent"
+11 −5
Original line number Diff line number Diff line
@@ -314,6 +314,11 @@ public class WallpaperDataParser {
            wallpaper.wallpaperId = makeWallpaperIdLocked();
        }

        Rect legacyCropHint = new Rect(
                getAttributeInt(parser, "cropLeft", 0),
                getAttributeInt(parser, "cropTop", 0),
                getAttributeInt(parser, "cropRight", 0),
                getAttributeInt(parser, "cropBottom", 0));
        Rect totalCropHint = new Rect(
                getAttributeInt(parser, "totalCropLeft", 0),
                getAttributeInt(parser, "totalCropTop", 0),
@@ -332,17 +337,18 @@ public class WallpaperDataParser {
                        parser.getAttributeInt(null, "cropBottom" + pair.second, 0));
                if (!cropHint.isEmpty()) wallpaper.mCropHints.put(pair.first, cropHint);
            }
            if (wallpaper.mCropHints.size() == 0) {
            if (wallpaper.mCropHints.size() == 0 && totalCropHint.isEmpty()) {
                // migration case: the crops per screen orientation are not specified.
                // use the old attributes to find the crop for one screen orientation.
                Integer orientation = totalCropHint.width() < totalCropHint.height()
                int orientation = legacyCropHint.width() < legacyCropHint.height()
                        ? WallpaperManager.PORTRAIT : WallpaperManager.LANDSCAPE;
                if (!totalCropHint.isEmpty()) wallpaper.mCropHints.put(orientation, totalCropHint);
                if (!legacyCropHint.isEmpty()) {
                    wallpaper.mCropHints.put(orientation, legacyCropHint);
                }
            } else {
                wallpaper.cropHint.set(totalCropHint);
            }
        } else {
            wallpaper.cropHint.set(totalCropHint);
            wallpaper.cropHint.set(legacyCropHint);
        }
        final DisplayData wpData = mWallpaperDisplayHelper
                .getDisplayDataOrCreate(DEFAULT_DISPLAY);