summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2014-11-16 15:31:37 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2014-11-17 16:49:17 +0000
commitf7bef2545ba45e8405dd5a00c0d276d669bf0ad0 (patch)
tree0b51e888c47f9ef473ddfe06584ac5a9c83778a7 /src
parent4c0d7ee35090e24478ce59c13f6a482bfa785f0e (diff)
downloadandroid_packages_apps_Trebuchet-f7bef2545ba45e8405dd5a00c0d276d669bf0ad0.tar.gz
android_packages_apps_Trebuchet-f7bef2545ba45e8405dd5a00c0d276d669bf0ad0.tar.bz2
android_packages_apps_Trebuchet-f7bef2545ba45e8405dd5a00c0d276d669bf0ad0.zip
Exclude empty and custom screens when centering wallpaper
If the user has CM Home or Google Now enabled then getChildCount() will include those as well. We need to exclude those screens when determining if the wallpaper should be centered for one screen. Change-Id: I702feb752b37d8c714352a2e18f0c61e6f640ba9
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Workspace.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 9813e6ca0..478b261e9 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1390,7 +1390,7 @@ public class Workspace extends SmoothPagedView
}
private float wallpaperOffsetForCurrentScroll() {
- if (getChildCount() <= 1) {
+ if (getNumScreensExcludingEmptyAndCustom() <= 1) {
return mWallpaperIsLiveWallpaper ? 0 : 0.5f;
}