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

Commit 9eb5b7a9 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

Merge "framework: Allow specifying max wallpaper width" into cm-10.1

parents 8326b25e 9302a3b0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1069,4 +1069,9 @@
         config to 7. -->
    <integer name="config_deviceHardwareKeys">15</integer>

    <!-- Maximum wallpaper width for devices with very high-res screen (1920x1200)
         the wallpaper width suggestion by the launcher may be too large for
         the GPU to handle. -->
    <integer name="config_wallpaperMaxWidth">-1</integer>

</resources>
+1 −0
Original line number Diff line number Diff line
@@ -1836,6 +1836,7 @@
  <java-symbol type="bool" name="config_show_cmIMESwitcher"/>
  <java-symbol type="bool" name="config_smsSamsungCdmaAlternateMessageIDEncoding" />
  <java-symbol type="bool" name="config_samsung_stk" />
  <java-symbol type="integer" name="config_wallpaperMaxWidth" />

  <!-- Hardware Key ReMapping -->
  <java-symbol type="integer" name="config_deviceHardwareKeys" />
+6 −0
Original line number Diff line number Diff line
@@ -639,6 +639,12 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
                throw new IllegalArgumentException("width and height must be > 0");
            }

            int maxWidth = mContext.getResources().getInteger(
                    com.android.internal.R.integer.config_wallpaperMaxWidth);
            if (maxWidth != -1 && width > maxWidth) {
                  width = maxWidth;
            }

            if (width != wallpaper.width || height != wallpaper.height) {
                wallpaper.width = width;
                wallpaper.height = height;