Preventing reloading of pages on swipe and disabling offsets for xlarge static wallpapers.
Change-Id: I4ca72164775d09706e36c38e0fac0e84254221c7
This commit is contained in:
@@ -499,11 +499,15 @@ public class Workspace extends ViewGroup
|
||||
}
|
||||
|
||||
private void updateWallpaperOffset(int scrollRange) {
|
||||
IBinder token = getWindowToken();
|
||||
if (token != null) {
|
||||
mWallpaperManager.setWallpaperOffsetSteps(1.0f / (getChildCount() - 1), 0 );
|
||||
mWallpaperManager.setWallpaperOffsets(getWindowToken(),
|
||||
Math.max(0.f, Math.min(mScrollX/(float)scrollRange, 1.f)), 0);
|
||||
final boolean isStaticWallpaper = (mWallpaperManager != null) &&
|
||||
(mWallpaperManager.getWallpaperInfo() == null);
|
||||
if (LauncherApplication.isScreenXLarge() && !isStaticWallpaper) {
|
||||
IBinder token = getWindowToken();
|
||||
if (token != null) {
|
||||
mWallpaperManager.setWallpaperOffsetSteps(1.0f / (getChildCount() - 1), 0 );
|
||||
mWallpaperManager.setWallpaperOffsets(getWindowToken(),
|
||||
Math.max(0.f, Math.min(mScrollX/(float)scrollRange, 1.f)), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user