diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-02-09 15:22:42 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-02-10 15:11:35 -0800 |
commit | 5abb9f88efc42ce7c5b34f21944bc119ecb57cec (patch) | |
tree | 08738ce66784e2a002fecc6ec08bc06e609964d0 /src | |
parent | 7c50b31f57e3e3ec1f433d243afe05554dcaf977 (diff) | |
download | android_packages_apps_Trebuchet-5abb9f88efc42ce7c5b34f21944bc119ecb57cec.tar.gz android_packages_apps_Trebuchet-5abb9f88efc42ce7c5b34f21944bc119ecb57cec.tar.bz2 android_packages_apps_Trebuchet-5abb9f88efc42ce7c5b34f21944bc119ecb57cec.zip |
Separating out Launcher3 resources from Wallpaper resources
Change-Id: I7e33c83df8b16e8552fe588cadbcf3bf7881cb95
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 3 | ||||
-rw-r--r-- | src/com/android/launcher3/util/WallpaperUtils.java | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 7330712f8..cb2f7d312 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -113,6 +113,7 @@ import com.android.launcher3.util.LongArrayMap; import com.android.launcher3.util.TestingUtils; import com.android.launcher3.util.Thunk; import com.android.launcher3.util.ViewOnDrawExecutor; +import com.android.launcher3.util.WallpaperUtils; import com.android.launcher3.widget.PendingAddWidgetInfo; import com.android.launcher3.widget.WidgetHostViewLoader; import com.android.launcher3.widget.WidgetsContainerView; @@ -2764,7 +2765,7 @@ public class Launcher extends Activity int pageScroll = mWorkspace.getScrollForPage(mWorkspace.getPageNearestToCenterOfScreen()); float offset = mWorkspace.mWallpaperOffset.wallpaperOffsetForScroll(pageScroll); startActivityForResult(new Intent(Intent.ACTION_SET_WALLPAPER).setPackage(getPackageName()) - .putExtra(WallpaperPickerActivity.EXTRA_WALLPAPER_OFFSET, offset), + .putExtra(WallpaperUtils.EXTRA_WALLPAPER_OFFSET, offset), REQUEST_PICK_WALLPAPER); if (mLauncherCallbacks != null) { diff --git a/src/com/android/launcher3/util/WallpaperUtils.java b/src/com/android/launcher3/util/WallpaperUtils.java index a5251e190..45c83bd8c 100644 --- a/src/com/android/launcher3/util/WallpaperUtils.java +++ b/src/com/android/launcher3/util/WallpaperUtils.java @@ -38,6 +38,8 @@ public final class WallpaperUtils { public static final String WALLPAPER_HEIGHT_KEY = "wallpaper.height"; public static final float WALLPAPER_SCREENS_SPAN = 2f; + public static final String EXTRA_WALLPAPER_OFFSET = "com.android.launcher3.WALLPAPER_OFFSET"; + public static void saveWallpaperDimensions(int width, int height, Activity activity) { if (Utilities.ATLEAST_KITKAT) { // From Kitkat onwards, ImageWallpaper does not care about the |