summaryrefslogtreecommitdiffstats
path: root/src/com/android/calendar/Utils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/calendar/Utils.java')
-rw-r--r--src/com/android/calendar/Utils.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/com/android/calendar/Utils.java b/src/com/android/calendar/Utils.java
index 837141a1..a0393857 100644
--- a/src/com/android/calendar/Utils.java
+++ b/src/com/android/calendar/Utils.java
@@ -234,9 +234,17 @@ public class Utils {
}
}
- // Default to the last view
- return prefs.getInt(
- GeneralPreferences.KEY_START_VIEW, GeneralPreferences.DEFAULT_START_VIEW);
+ // Check if the user wants the last view or the default startup view
+ int defaultStart = Integer.valueOf(prefs.getString(GeneralPreferences.KEY_DEFAULT_START,
+ GeneralPreferences.DEFAULT_DEFAULT_START));
+ if (defaultStart == -2) {
+ // Return the last view used
+ return prefs.getInt(
+ GeneralPreferences.KEY_START_VIEW, GeneralPreferences.DEFAULT_START_VIEW);
+ } else {
+ // Return the default view
+ return defaultStart;
+ }
}
/**