summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2015-07-18 00:23:46 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-07-18 00:23:46 +0000
commit37a69731cbcbc6a37e464cc7c022eece3a3bab8e (patch)
treeb85849019e8effc0ceae2c6a3144ee3778559ef8
parent658a096f85112a89f8fb8ac3cb4535cab189f84e (diff)
parent931d3cc975bd717b62645bebcda95e56882ecdbc (diff)
am 931d3cc9: am 9f71f05b: am 1f72739a: am 57ee4b87: Merge "Fix image wallpaper size" into mnc-dev
* commit '931d3cc975bd717b62645bebcda95e56882ecdbc': Fix image wallpaper size
-rw-r--r--packages/SystemUI/src/com/android/systemui/ImageWallpaper.java21
1 files changed, 8 insertions, 13 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
index ed4d35823b49..5a6f3c99fb4e 100644
--- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
@@ -116,7 +116,6 @@ public class ImageWallpaper extends WallpaperService {
private final DisplayInfo mTmpDisplayInfo = new DisplayInfo();
boolean mVisible = true;
- boolean mRedrawNeeded;
boolean mOffsetsChanged;
int mLastXTranslation;
int mLastYTranslation;
@@ -153,6 +152,9 @@ public class ImageWallpaper extends WallpaperService {
private int mDisplayWidthAtLastSurfaceSizeUpdate = -1;
private int mDisplayHeightAtLastSurfaceSizeUpdate = -1;
+ private int mLastRequestedWidth = -1;
+ private int mLastRequestedHeight = -1;
+
public DrawableEngine() {
super();
setFixedSizeAllowed(true);
@@ -211,21 +213,13 @@ public class ImageWallpaper extends WallpaperService {
int surfaceWidth = Math.max(displayInfo.logicalWidth, mBackgroundWidth);
int surfaceHeight = Math.max(displayInfo.logicalHeight, mBackgroundHeight);
- // If the surface dimensions haven't changed, then just return
- final Rect frame = surfaceHolder.getSurfaceFrame();
- if (frame != null) {
- final int dw = frame.width();
- final int dh = frame.height();
- if (surfaceWidth == dw && surfaceHeight == dh) {
- return;
- }
- }
-
if (FIXED_SIZED_SURFACE) {
// Used a fixed size surface, because we are special. We can do
// this because we know the current design of window animations doesn't
// cause this to break.
surfaceHolder.setFixedSize(surfaceWidth, surfaceHeight);
+ mLastRequestedWidth = surfaceWidth;
+ mLastRequestedHeight = surfaceHeight;
} else {
surfaceHolder.setSizeFromLayout();
}
@@ -389,7 +383,6 @@ public class ImageWallpaper extends WallpaperService {
yPixels += (int) (availhUnscaled * (mYOffset - .5f) + .5f);
mOffsetsChanged = false;
- mRedrawNeeded = false;
if (surfaceDimensionsChanged) {
mLastSurfaceWidth = dw;
mLastSurfaceHeight = dh;
@@ -477,13 +470,15 @@ public class ImageWallpaper extends WallpaperService {
out.print(" mYOffset="); out.println(mYOffset);
out.print(prefix); out.print(" mVisible="); out.print(mVisible);
- out.print(" mRedrawNeeded="); out.print(mRedrawNeeded);
out.print(" mOffsetsChanged="); out.println(mOffsetsChanged);
out.print(prefix); out.print(" mLastXTranslation="); out.print(mLastXTranslation);
out.print(" mLastYTranslation="); out.print(mLastYTranslation);
out.print(" mScale="); out.println(mScale);
+ out.print(prefix); out.print(" mLastRequestedWidth="); out.print(mLastRequestedWidth);
+ out.print(" mLastRequestedHeight="); out.println(mLastRequestedHeight);
+
out.print(prefix); out.println(" DisplayInfo at last updateSurfaceSize:");
out.print(prefix);
out.print(" rotation="); out.print(mRotationAtLastSurfaceSizeUpdate);