Merge "Update Prevent Ringing summary when it turn off" into sc-dev am: 3aca460dfc
am: 17877ef23e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14442220 Change-Id: Ie7b7bac2f5b8956f6f74c1bdef702ffbe1703d0a
This commit is contained in:
@@ -92,8 +92,9 @@ public class PreventRingingParentPreferenceController extends TogglePreferenceCo
|
|||||||
case VOLUME_HUSH_MUTE:
|
case VOLUME_HUSH_MUTE:
|
||||||
summary = mContext.getText(R.string.prevent_ringing_option_mute_summary);
|
summary = mContext.getText(R.string.prevent_ringing_option_mute_summary);
|
||||||
break;
|
break;
|
||||||
|
// VOLUME_HUSH_OFF
|
||||||
default:
|
default:
|
||||||
summary = null;
|
summary = mContext.getText(R.string.switch_off_text);
|
||||||
}
|
}
|
||||||
preference.setSummary(summary);
|
preference.setSummary(summary);
|
||||||
}
|
}
|
||||||
|
@@ -97,7 +97,8 @@ public class PreventRingingParentPreferenceControllerTest {
|
|||||||
Settings.Secure.putInt(mContext.getContentResolver(), VOLUME_HUSH_GESTURE,
|
Settings.Secure.putInt(mContext.getContentResolver(), VOLUME_HUSH_GESTURE,
|
||||||
VOLUME_HUSH_OFF);
|
VOLUME_HUSH_OFF);
|
||||||
mController.updateState(mPreference);
|
mController.updateState(mPreference);
|
||||||
assertThat(mPreference.getSummary()).isEqualTo(null);
|
assertThat(mPreference.getSummary()).isEqualTo(mContext.getResources().getText(
|
||||||
|
R.string.switch_off_text));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user