commit | 3aca460dfce1f43f540cc06192bfd2a4ea1d6a3d | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Thu May 06 05:07:25 2021 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu May 06 05:07:25 2021 +0000 |
tree | 921de3f17353b63d776bb510198cf5e93c6724b8 | |
parent | 0dc1ee01f895d536aad9f893c0938c705a6954c2 [diff] | |
parent | aa48592b40ee75761cd3b679eca983134505abc1 [diff] |
Merge "Update Prevent Ringing summary when it turn off" into sc-dev
diff --git a/src/com/android/settings/gestures/PreventRingingParentPreferenceController.java b/src/com/android/settings/gestures/PreventRingingParentPreferenceController.java index ca1f1c7..b679438 100644 --- a/src/com/android/settings/gestures/PreventRingingParentPreferenceController.java +++ b/src/com/android/settings/gestures/PreventRingingParentPreferenceController.java
@@ -92,8 +92,9 @@ case VOLUME_HUSH_MUTE: summary = mContext.getText(R.string.prevent_ringing_option_mute_summary); break; + // VOLUME_HUSH_OFF default: - summary = null; + summary = mContext.getText(R.string.switch_off_text); } preference.setSummary(summary); }
diff --git a/tests/robotests/src/com/android/settings/gestures/PreventRingingParentPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/gestures/PreventRingingParentPreferenceControllerTest.java index 9e4877c..4844a1c 100644 --- a/tests/robotests/src/com/android/settings/gestures/PreventRingingParentPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/gestures/PreventRingingParentPreferenceControllerTest.java
@@ -97,7 +97,8 @@ Settings.Secure.putInt(mContext.getContentResolver(), VOLUME_HUSH_GESTURE, VOLUME_HUSH_OFF); mController.updateState(mPreference); - assertThat(mPreference.getSummary()).isEqualTo(null); + assertThat(mPreference.getSummary()).isEqualTo(mContext.getResources().getText( + R.string.switch_off_text)); } @Test