diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2013-04-07 20:32:33 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-04-07 20:32:33 +0200 |
commit | d8e1aa79e719c04d04cf75dd0a94c4b88133a491 (patch) | |
tree | aca068c8248aeb2cdc3e11c45f0d291fa608c96c /src/com/cyanogenmod/trebuchet/Hotseat.java | |
parent | 42b656dbd1302cd27f0b4d0667f2fdb1af1b8a70 (diff) | |
download | packages_apps_trebuchet-d8e1aa79e719c04d04cf75dd0a94c4b88133a491.tar.gz packages_apps_trebuchet-d8e1aa79e719c04d04cf75dd0a94c4b88133a491.tar.bz2 packages_apps_trebuchet-d8e1aa79e719c04d04cf75dd0a94c4b88133a491.zip |
Trebuchet: force close in dock (Trebuchet) with raised default page count
Use the same ui_homescreen_default_screen's algorithm to fix overflow default values
Change-Id: I2f529dc902fd736c2e36ff92cdf001bd23518236
JIRA: CYAN-757
Issue: https://jira.cyanogenmod.org/browse/CYAN-757
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/Hotseat.java')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Hotseat.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Hotseat.java b/src/com/cyanogenmod/trebuchet/Hotseat.java index e5de57ba..f2e6d960 100644 --- a/src/com/cyanogenmod/trebuchet/Hotseat.java +++ b/src/com/cyanogenmod/trebuchet/Hotseat.java @@ -56,7 +56,9 @@ public class Hotseat extends PagedView { int hotseatPages = PreferencesProvider.Interface.Dock.getNumberPages(); int defaultPage = PreferencesProvider.Interface.Dock.getDefaultPage(hotseatPages / 2); - + if (defaultPage >= hotseatPages) { + defaultPage = hotseatPages / 2; + } mCurrentPage = defaultPage; |