am ff941af7: Merge "Settings: Disable Interruptions > From when N/A." into lmp-dev

* commit 'ff941af733a86c4b9fdf1f7f23ac6405faf73231':
  Settings: Disable Interruptions > From when N/A.
This commit is contained in:
John Spurlock
2014-07-23 01:45:38 +00:00
committed by Android Git Automerger

View File

@@ -358,6 +358,7 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
} }
mMessages.setChecked(mConfig.allowMessages); mMessages.setChecked(mConfig.allowMessages);
mStarred.setSelectedValue(mConfig.allowFrom); mStarred.setSelectedValue(mConfig.allowFrom);
updateStarredEnabled();
updateDays(); updateDays();
mStart.setTime(mConfig.sleepStartHour, mConfig.sleepStartMinute); mStart.setTime(mConfig.sleepStartHour, mConfig.sleepStartMinute);
mEnd.setTime(mConfig.sleepEndHour, mConfig.sleepEndMinute); mEnd.setTime(mConfig.sleepEndHour, mConfig.sleepEndMinute);
@@ -366,6 +367,10 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
updateEndSummary(); updateEndSummary();
} }
private void updateStarredEnabled() {
mStarred.setEnabled(mConfig.allowCalls || mConfig.allowMessages);
}
private void refreshAutomationSection() { private void refreshAutomationSection() {
if (mConditionProviders != null) { if (mConditionProviders != null) {
final int total = ConditionProviderSettings.getProviderCount(mPM); final int total = ConditionProviderSettings.getProviderCount(mPM);
@@ -453,6 +458,7 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
mConfig = config; mConfig = config;
if (DEBUG) Log.d(TAG, "Saved mConfig=" + mConfig); if (DEBUG) Log.d(TAG, "Saved mConfig=" + mConfig);
updateEndSummary(); updateEndSummary();
updateStarredEnabled();
} }
return success; return success;
} catch (Exception e) { } catch (Exception e) {