Loading packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +10 −2 Original line number Diff line number Diff line Loading @@ -127,7 +127,12 @@ public class ImageWallpaper extends WallpaperService { setFixedSizeAllowed(true); updateSurfaceSize(); mRenderer.setOnBitmapChanged(this::updateMiniBitmap); mRenderer.setOnBitmapChanged(b -> { mLocalColorsToAdd.addAll(mColorAreas); if (mLocalColorsToAdd.size() > 0) { updateMiniBitmapAndNotify(b); } }); getDisplayContext().getSystemService(DisplayManager.class) .registerDisplayListener(this, mWorker.getThreadHandler()); Trace.endSection(); Loading Loading @@ -171,7 +176,7 @@ public class ImageWallpaper extends WallpaperService { computeAndNotifyLocalColors(new ArrayList<>(mColorAreas), mMiniBitmap)); } private void updateMiniBitmap(Bitmap b) { private void updateMiniBitmapAndNotify(Bitmap b) { if (b == null) return; int size = Math.min(b.getWidth(), b.getHeight()); float scale = 1.0f; Loading Loading @@ -233,6 +238,9 @@ public class ImageWallpaper extends WallpaperService { Bitmap bitmap = mMiniBitmap; if (bitmap == null) { mLocalColorsToAdd.addAll(regions); mRenderer.use(b -> { updateMiniBitmapAndNotify(b); }); } else { computeAndNotifyLocalColors(regions, bitmap); } Loading packages/SystemUI/src/com/android/systemui/glwallpaper/ImageWallpaperRenderer.java +7 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,13 @@ public class ImageWallpaperRenderer implements GLWallpaperRenderer { mOnBitmapUpdated = c; } /** * @hide */ public void use(Consumer<Bitmap> c) { mTexture.use(c); } @Override public boolean isWcgContent() { return mTexture.isWcgContent(); Loading Loading
packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +10 −2 Original line number Diff line number Diff line Loading @@ -127,7 +127,12 @@ public class ImageWallpaper extends WallpaperService { setFixedSizeAllowed(true); updateSurfaceSize(); mRenderer.setOnBitmapChanged(this::updateMiniBitmap); mRenderer.setOnBitmapChanged(b -> { mLocalColorsToAdd.addAll(mColorAreas); if (mLocalColorsToAdd.size() > 0) { updateMiniBitmapAndNotify(b); } }); getDisplayContext().getSystemService(DisplayManager.class) .registerDisplayListener(this, mWorker.getThreadHandler()); Trace.endSection(); Loading Loading @@ -171,7 +176,7 @@ public class ImageWallpaper extends WallpaperService { computeAndNotifyLocalColors(new ArrayList<>(mColorAreas), mMiniBitmap)); } private void updateMiniBitmap(Bitmap b) { private void updateMiniBitmapAndNotify(Bitmap b) { if (b == null) return; int size = Math.min(b.getWidth(), b.getHeight()); float scale = 1.0f; Loading Loading @@ -233,6 +238,9 @@ public class ImageWallpaper extends WallpaperService { Bitmap bitmap = mMiniBitmap; if (bitmap == null) { mLocalColorsToAdd.addAll(regions); mRenderer.use(b -> { updateMiniBitmapAndNotify(b); }); } else { computeAndNotifyLocalColors(regions, bitmap); } Loading
packages/SystemUI/src/com/android/systemui/glwallpaper/ImageWallpaperRenderer.java +7 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,13 @@ public class ImageWallpaperRenderer implements GLWallpaperRenderer { mOnBitmapUpdated = c; } /** * @hide */ public void use(Consumer<Bitmap> c) { mTexture.use(c); } @Override public boolean isWcgContent() { return mTexture.isWcgContent(); Loading