diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2013-06-22 00:53:35 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-06-22 00:53:35 +0200 |
commit | 73c303e92d43cb74824f25b8158c65765b1a421b (patch) | |
tree | 330fc578b379ee8e9590f28fb83bcd75e48f09d1 /src | |
parent | 0827ce7a634435f515aee66cd128c9a1684d17e2 (diff) | |
download | packages_apps_trebuchet-73c303e92d43cb74824f25b8158c65765b1a421b.zip packages_apps_trebuchet-73c303e92d43cb74824f25b8158c65765b1a421b.tar.gz packages_apps_trebuchet-73c303e92d43cb74824f25b8158c65765b1a421b.tar.bz2 |
Trebuchet: Sync "maxExternal" preferences and its defaults values
Change-Id: If6f70d75a9a2e5ea044e68dcaf906748bd09a53e
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Hotseat.java | 4 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Workspace.java | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Hotseat.java b/src/com/cyanogenmod/trebuchet/Hotseat.java index 2773c0f..5dcbcb1 100644 --- a/src/com/cyanogenmod/trebuchet/Hotseat.java +++ b/src/com/cyanogenmod/trebuchet/Hotseat.java @@ -38,6 +38,8 @@ public class Hotseat extends PagedView { private float[] mTempCellLayoutCenterCoordinates = new float[2]; private Matrix mTempInverseMatrix = new Matrix(); + private static final int DEFAULT_PAGE = 0; + private static final int DEFAULT_CELL_COUNT = 5; public Hotseat(Context context) { @@ -57,7 +59,7 @@ public class Hotseat extends PagedView { mHandleScrollIndicator = true; int hotseatPages = PreferencesProvider.Interface.Dock.getNumberPages(); - int defaultPage = PreferencesProvider.Interface.Dock.getDefaultPage(hotseatPages / 2); + int defaultPage = PreferencesProvider.Interface.Dock.getDefaultPage(DEFAULT_PAGE); if (defaultPage >= hotseatPages) { defaultPage = hotseatPages / 2; } diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index cb96f36..a6f9154 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -165,6 +165,8 @@ public class Workspace extends PagedView private SpringLoadedDragController mSpringLoadedDragController; private float mSpringLoadedShrinkFactor; + private static final int DEFAULT_HOMESCREEN = 2; + private static final int DEFAULT_CELL_COUNT_X = 4; private static final int DEFAULT_CELL_COUNT_Y = 4; @@ -385,7 +387,7 @@ public class Workspace extends PagedView // Preferences mNumberHomescreens = PreferencesProvider.Interface.Homescreen.getNumberHomescreens(); - mDefaultHomescreen = PreferencesProvider.Interface.Homescreen.getDefaultHomescreen(mNumberHomescreens / 2); + mDefaultHomescreen = PreferencesProvider.Interface.Homescreen.getDefaultHomescreen(DEFAULT_HOMESCREEN); if (mDefaultHomescreen >= mNumberHomescreens) { mDefaultHomescreen = mNumberHomescreens / 2; } |