summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Ruesga <jorge@ruesga.com>2013-06-21 22:53:35 (GMT)
committerJorge Ruesga <jorge@ruesga.com>2013-06-21 22:53:35 (GMT)
commit73c303e92d43cb74824f25b8158c65765b1a421b (patch)
tree330fc578b379ee8e9590f28fb83bcd75e48f09d1
parent0827ce7a634435f515aee66cd128c9a1684d17e2 (diff)
downloadandroid_packages_apps_Trebuchet-73c303e92d43cb74824f25b8158c65765b1a421b.zip
android_packages_apps_Trebuchet-73c303e92d43cb74824f25b8158c65765b1a421b.tar.gz
android_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>
-rw-r--r--res/xml/preferences_dock.xml2
-rw-r--r--res/xml/preferences_homescreen.xml2
-rw-r--r--src/com/cyanogenmod/trebuchet/Hotseat.java4
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java4
4 files changed, 8 insertions, 4 deletions
diff --git a/res/xml/preferences_dock.xml b/res/xml/preferences_dock.xml
index f24c64f..351ca48 100644
--- a/res/xml/preferences_dock.xml
+++ b/res/xml/preferences_dock.xml
@@ -34,7 +34,7 @@
android:summary="@string/preferences_interface_dock_default_page_summary"
android:defaultValue="1"
launcher:maxExternal="ui_dock_pages"
- launcher:max="3"
+ launcher:max="1"
launcher:min="1" />
<!-- android:dependency="ui_dock_enabled" /-->
<com.cyanogenmod.trebuchet.preference.NumberPickerPreference android:key="ui_dock_icons"
diff --git a/res/xml/preferences_homescreen.xml b/res/xml/preferences_homescreen.xml
index b89ebe6..ec4ef8d 100644
--- a/res/xml/preferences_homescreen.xml
+++ b/res/xml/preferences_homescreen.xml
@@ -43,7 +43,7 @@
android:summary="@string/preferences_interface_homescreen_general_default_screen_summary"
android:defaultValue="3"
launcher:maxExternal="ui_homescreen_screens"
- launcher:max="7"
+ launcher:max="5"
launcher:min="1" />
<CheckBoxPreference android:key="ui_homescreen_stretch_screens"
android:title="@string/preferences_interface_homescreen_general_stretch_screens_title"
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;
}