diff options
author | Luis Vidal <lvidal@cyngn.com> | 2016-07-27 11:42:45 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-07-28 09:03:41 -0700 |
commit | 32416ca07e7f85a2f6b93bee82accb70a09aea5c (patch) | |
tree | 3f9c32bca07a1d3d972a3268f1495a6ceeab6d3e /src/com/android | |
parent | 14a996fdb68ae6e0f2e398c968eb1409a956f441 (diff) | |
download | packages_apps_Settings-32416ca07e7f85a2f6b93bee82accb70a09aea5c.zip packages_apps_Settings-32416ca07e7f85a2f6b93bee82accb70a09aea5c.tar.gz packages_apps_Settings-32416ca07e7f85a2f6b93bee82accb70a09aea5c.tar.bz2 |
ZenMode rules: Show days list in the correct order
Populate the days list based on what the first day of the week is
for the current locale. Ex. Sunday is the first item in the
list for US, whereas Monday is for UK
Change-Id: Ib3c03a59cee73cfcd809fb115a5d49e5eb7c2e45
TICKET: CYNGNOS-3181
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/settings/notification/ZenModeScheduleDaysSelection.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/settings/notification/ZenModeScheduleDaysSelection.java b/src/com/android/settings/notification/ZenModeScheduleDaysSelection.java index 3e88046..a0af03f 100644 --- a/src/com/android/settings/notification/ZenModeScheduleDaysSelection.java +++ b/src/com/android/settings/notification/ZenModeScheduleDaysSelection.java @@ -61,8 +61,9 @@ public class ZenModeScheduleDaysSelection extends ScrollView { } mLayout.setOrientation(LinearLayout.VERTICAL); final Calendar c = Calendar.getInstance(); + int i = c.getFirstDayOfWeek() - 1; final LayoutInflater inflater = LayoutInflater.from(context); - for (int i = 0; i < DAYS.length; i++) { + for (int d = 0; d < DAYS.length; d++) { final int day = DAYS[i]; final CheckBox checkBox = (CheckBox) inflater.inflate(R.layout.zen_schedule_rule_day, this, false); @@ -77,6 +78,7 @@ public class ZenModeScheduleDaysSelection extends ScrollView { } }); mLayout.addView(checkBox); + i = ++i % DAYS.length; } } |