Settings: Use the same day sequence for downtime.

Make the starting day (Monday) the same between
the selection dialog and the summary text.

Bug:17390052

Change-Id: I4f884cb5e02c1cc2642ab05915cd94c655b9f362
This commit is contained in:
John Spurlock
2014-09-10 11:38:30 -04:00
parent cddb29544a
commit 1e7dbd455e
2 changed files with 5 additions and 3 deletions

View File

@@ -16,6 +16,8 @@
package com.android.settings.notification;
import static com.android.settings.notification.ZenModeDowntimeDaysSelection.DAYS;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
@@ -314,8 +316,8 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
if (days != null && days.length != 0) {
final StringBuilder sb = new StringBuilder();
final Calendar c = Calendar.getInstance();
for (int i = 0; i < ZenModeConfig.ALL_DAYS.length; i++) {
final int day = ZenModeConfig.ALL_DAYS[i];
for (int i = 0; i < DAYS.length; i++) {
final int day = DAYS[i];
for (int j = 0; j < days.length; j++) {
if (day == days[j]) {
c.set(Calendar.DAY_OF_WEEK, day);