Loading packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +7 −7 Original line number Diff line number Diff line Loading @@ -282,6 +282,13 @@ public class ImageWallpaper extends WallpaperService { updateWallpaperLocked(); } if (mBackground == null) { // If we somehow got to this point after we have last flushed // the wallpaper, well we really need it to draw again. So // seems like we need to reload it. Ouch. updateWallpaperLocked(); } SurfaceHolder sh = getSurfaceHolder(); final Rect frame = sh.getSurfaceFrame(); final int dw = frame.width(); Loading @@ -303,13 +310,6 @@ public class ImageWallpaper extends WallpaperService { mLastXTranslation = xPixels; mLastYTranslation = yPixels; if (mBackground == null) { // If we somehow got to this point after we have last flushed // the wallpaper, well we really need it to draw again. So // seems like we need to reload it. Ouch. updateWallpaperLocked(); } if (mIsHwAccelerated) { if (!drawWallpaperWithOpenGL(sh, availw, availh, xPixels, yPixels)) { drawWallpaperWithCanvas(sh, availw, availh, xPixels, yPixels); Loading services/java/com/android/server/WallpaperManagerService.java +13 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub { WallpaperConnection mWallpaperConnection; long mLastDiedTime; boolean mWallpaperUpdating; boolean mDesiredDimensionChanging; class WallpaperConnection extends IWallpaperConnection.Stub implements ServiceConnection { Loading Loading @@ -213,6 +214,13 @@ class WallpaperManagerService extends IWallpaperManager.Stub { public void attachEngine(IWallpaperEngine engine) { mEngine = engine; if (engine != null && mDesiredDimensionChanging) { try { engine.setDesiredSize(mWidth, mHeight); mDesiredDimensionChanging = false; } catch (RemoteException e) { } } } public ParcelFileDescriptor setWallpaper(String name) { Loading Loading @@ -395,6 +403,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub { synchronized (mLock) { if (width != mWidth || height != mHeight) { boolean desiredDimensionPropagated = false; mWidth = width; mHeight = height; saveSettingsLocked(); Loading @@ -403,11 +412,15 @@ class WallpaperManagerService extends IWallpaperManager.Stub { try { mWallpaperConnection.mEngine.setDesiredSize( width, height); desiredDimensionPropagated = true; } catch (RemoteException e) { } notifyCallbacksLocked(); } } if (!desiredDimensionPropagated) { mDesiredDimensionChanging = true; } } } } Loading Loading
packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +7 −7 Original line number Diff line number Diff line Loading @@ -282,6 +282,13 @@ public class ImageWallpaper extends WallpaperService { updateWallpaperLocked(); } if (mBackground == null) { // If we somehow got to this point after we have last flushed // the wallpaper, well we really need it to draw again. So // seems like we need to reload it. Ouch. updateWallpaperLocked(); } SurfaceHolder sh = getSurfaceHolder(); final Rect frame = sh.getSurfaceFrame(); final int dw = frame.width(); Loading @@ -303,13 +310,6 @@ public class ImageWallpaper extends WallpaperService { mLastXTranslation = xPixels; mLastYTranslation = yPixels; if (mBackground == null) { // If we somehow got to this point after we have last flushed // the wallpaper, well we really need it to draw again. So // seems like we need to reload it. Ouch. updateWallpaperLocked(); } if (mIsHwAccelerated) { if (!drawWallpaperWithOpenGL(sh, availw, availh, xPixels, yPixels)) { drawWallpaperWithCanvas(sh, availw, availh, xPixels, yPixels); Loading
services/java/com/android/server/WallpaperManagerService.java +13 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub { WallpaperConnection mWallpaperConnection; long mLastDiedTime; boolean mWallpaperUpdating; boolean mDesiredDimensionChanging; class WallpaperConnection extends IWallpaperConnection.Stub implements ServiceConnection { Loading Loading @@ -213,6 +214,13 @@ class WallpaperManagerService extends IWallpaperManager.Stub { public void attachEngine(IWallpaperEngine engine) { mEngine = engine; if (engine != null && mDesiredDimensionChanging) { try { engine.setDesiredSize(mWidth, mHeight); mDesiredDimensionChanging = false; } catch (RemoteException e) { } } } public ParcelFileDescriptor setWallpaper(String name) { Loading Loading @@ -395,6 +403,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub { synchronized (mLock) { if (width != mWidth || height != mHeight) { boolean desiredDimensionPropagated = false; mWidth = width; mHeight = height; saveSettingsLocked(); Loading @@ -403,11 +412,15 @@ class WallpaperManagerService extends IWallpaperManager.Stub { try { mWallpaperConnection.mEngine.setDesiredSize( width, height); desiredDimensionPropagated = true; } catch (RemoteException e) { } notifyCallbacksLocked(); } } if (!desiredDimensionPropagated) { mDesiredDimensionChanging = true; } } } } Loading