diff options
author | Michael Jurka <mikejurka@google.com> | 2013-11-13 17:59:46 +0100 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2013-12-03 15:33:12 -0800 |
commit | a6a0547fa6df0769fcd107a2e5f7c7d527fa0700 (patch) | |
tree | ac75103087aa51154ce8ed713473de110e16ce33 /src/com/android/launcher3/LauncherAppState.java | |
parent | 87f445c8b28c59e787e5fbfc7ba223e112d2263f (diff) | |
download | android_packages_apps_Trebuchet-a6a0547fa6df0769fcd107a2e5f7c7d527fa0700.tar.gz android_packages_apps_Trebuchet-a6a0547fa6df0769fcd107a2e5f7c7d527fa0700.tar.bz2 android_packages_apps_Trebuchet-a6a0547fa6df0769fcd107a2e5f7c7d527fa0700.zip |
Update suggested wallpaper dimensions in onResume
If another launcher runs in between, it might
change the suggested dimensions. This fixes that
case.
Bug: 11667475
Diffstat (limited to 'src/com/android/launcher3/LauncherAppState.java')
-rw-r--r-- | src/com/android/launcher3/LauncherAppState.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java index 9a47eaa32..5daa845f3 100644 --- a/src/com/android/launcher3/LauncherAppState.java +++ b/src/com/android/launcher3/LauncherAppState.java @@ -39,6 +39,7 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks { private boolean mIsScreenLarge; private float mScreenDensity; private int mLongPressTimeout = 300; + private boolean mWallpaperChangedSinceLastCheck; private static WeakReference<LauncherProvider> sLauncherProvider; private static Context sContext; @@ -217,6 +218,16 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks { return mLongPressTimeout; } + public void onWallpaperChanged() { + mWallpaperChangedSinceLastCheck = true; + } + + public boolean hasWallpaperChangedSinceLastCheck() { + boolean result = mWallpaperChangedSinceLastCheck; + mWallpaperChangedSinceLastCheck = false; + return result; + } + @Override public void onAvailableSizeChanged(DeviceProfile grid) { Utilities.setIconSize(grid.iconSizePx); |