Merge "Home Controls: Add conditional copy for setting." into tm-dev am: 126e629c7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17476399 Change-Id: I07568b33ba507c78fe9ad3fe2f058687533893d8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -13468,6 +13468,8 @@
|
|||||||
<string name="lockscreen_trivial_controls_setting_toggle">Control from locked device</string>
|
<string name="lockscreen_trivial_controls_setting_toggle">Control from locked device</string>
|
||||||
<!-- Trivial Device controls summary [CHAR LIMIT=NONE] -->
|
<!-- Trivial Device controls summary [CHAR LIMIT=NONE] -->
|
||||||
<string name="lockscreen_trivial_controls_summary">Control external devices without unlocking your phone or tablet if allowed by the device controls app</string>
|
<string name="lockscreen_trivial_controls_summary">Control external devices without unlocking your phone or tablet if allowed by the device controls app</string>
|
||||||
|
<!-- Trivial Device disabled controls summary [CHAR LIMIT=NONE] -->
|
||||||
|
<string name="lockscreen_trivial_disabled_controls_summary">To use, first turn on \u0022Show device controls\u0022</string>
|
||||||
<!-- Lockscreen double-line clock summary [CHAR LIMIT=NONE] -->
|
<!-- Lockscreen double-line clock summary [CHAR LIMIT=NONE] -->
|
||||||
<string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
|
<string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
|
||||||
<!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
|
<!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
|
||||||
|
@@ -50,6 +50,9 @@ public class ControlsTrivialPrivacyPreferenceController extends TogglePreference
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CharSequence getSummary() {
|
public CharSequence getSummary() {
|
||||||
|
if (getAvailabilityStatus() == DISABLED_DEPENDENT_SETTING) {
|
||||||
|
return mContext.getText(R.string.lockscreen_trivial_disabled_controls_summary);
|
||||||
|
}
|
||||||
return mContext.getText(R.string.lockscreen_trivial_controls_summary);
|
return mContext.getText(R.string.lockscreen_trivial_controls_summary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -109,7 +109,7 @@ public class ControlsTrivialPrivacyPreferenceControllerTest {
|
|||||||
Settings.Secure.putInt(mContentResolver, DEPENDENCY_SETTING_KEY, 0);
|
Settings.Secure.putInt(mContentResolver, DEPENDENCY_SETTING_KEY, 0);
|
||||||
|
|
||||||
assertThat(mController.getSummary().toString()).isEqualTo(
|
assertThat(mController.getSummary().toString()).isEqualTo(
|
||||||
mContext.getText(R.string.lockscreen_trivial_controls_summary));
|
mContext.getText(R.string.lockscreen_trivial_disabled_controls_summary));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user