summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2015-07-08 21:01:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-08 21:01:27 +0000
commit7f806ec2288df739a0ec03a2363cc912ad49f443 (patch)
tree5d24a448215f42ee288fe387451b63e3a2f194b6 /packages
parent3bbcc46d54f667ec7529a051f1bb9cbfd9f5fed0 (diff)
parentab6edbf8e09a856bf638d0a1fcdd1e0d1f708574 (diff)
downloadframeworks_base-7f806ec2288df739a0ec03a2363cc912ad49f443.zip
frameworks_base-7f806ec2288df739a0ec03a2363cc912ad49f443.tar.gz
frameworks_base-7f806ec2288df739a0ec03a2363cc912ad49f443.tar.bz2
Merge "Dump internal state of ImageWallpaper" into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/ImageWallpaper.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
index 6acd137..9f6d8df 100644
--- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
@@ -38,7 +38,9 @@ import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.WindowManager;
+import java.io.FileDescriptor;
import java.io.IOException;
+import java.io.PrintWriter;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
@@ -147,6 +149,10 @@ public class ImageWallpaper extends WallpaperService {
private static final int TRIANGLE_VERTICES_DATA_POS_OFFSET = 0;
private static final int TRIANGLE_VERTICES_DATA_UV_OFFSET = 3;
+ private int mRotationAtLastSurfaceSizeUpdate = -1;
+ private int mDisplayWidthAtLastSurfaceSizeUpdate = -1;
+ private int mDisplayHeightAtLastSurfaceSizeUpdate = -1;
+
public DrawableEngine() {
super();
setFixedSizeAllowed(true);
@@ -315,6 +321,9 @@ public class ImageWallpaper extends WallpaperService {
if (newRotation != mLastRotation) {
// Update surface size (if necessary)
updateSurfaceSize(getSurfaceHolder(), displayInfo);
+ mRotationAtLastSurfaceSizeUpdate = newRotation;
+ mDisplayWidthAtLastSurfaceSizeUpdate = displayInfo.logicalWidth;
+ mDisplayHeightAtLastSurfaceSizeUpdate = displayInfo.logicalHeight;
}
SurfaceHolder sh = getSurfaceHolder();
final Rect frame = sh.getSurfaceFrame();
@@ -449,6 +458,37 @@ public class ImageWallpaper extends WallpaperService {
}
}
+ @Override
+ protected void dump(String prefix, FileDescriptor fd, PrintWriter out, String[] args) {
+ super.dump(prefix, fd, out, args);
+
+ out.print(prefix); out.println("ImageWallpaper.DrawableEngine:");
+ out.print(prefix); out.print(" mBackground="); out.print(mBackground);
+ out.print(" mBackgroundWidth="); out.print(mBackgroundWidth);
+ out.print(" mBackgroundHeight="); out.println(mBackgroundHeight);
+
+ out.print(prefix); out.print(" mLastRotation="); out.print(mLastRotation);
+ out.print(" mLastSurfaceWidth="); out.print(mLastSurfaceWidth);
+ out.print(" mLastSurfaceHeight="); out.println(mLastSurfaceHeight);
+
+ out.print(prefix); out.print(" mXOffset="); out.print(mXOffset);
+ 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.println(" DisplayInfo at last updateSurfaceSize:");
+ out.print(prefix);
+ out.print(" rotation="); out.print(mRotationAtLastSurfaceSizeUpdate);
+ out.print(" width="); out.print(mDisplayWidthAtLastSurfaceSizeUpdate);
+ out.print(" height="); out.println(mDisplayHeightAtLastSurfaceSizeUpdate);
+ }
+
private void drawWallpaperWithCanvas(SurfaceHolder sh, int w, int h, int left, int top) {
Canvas c = sh.lockCanvas();
if (c != null) {