commit | aa48592b40ee75761cd3b679eca983134505abc1 | [log] [tgz] |
---|---|---|
author | Edgar Wang <edgarwang@google.com> | Thu May 06 01:44:50 2021 +0800 |
committer | Edgar Wang <edgarwang@google.com> | Thu May 06 01:49:24 2021 +0800 |
tree | 030b3941f6460f8d2f6c11605cbcab3375a3a363 | |
parent | c3dc96ebc30fdf90690e87bee41ed90094017168 [diff] |
Update Prevent Ringing summary when it turn off Bug: 187145174 Test: manual & robotest Change-Id: Ifc06a38ff65f084db2803c56b5a37224c5b9b810
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