Skip to content

Commit

Permalink
Lockscreen: UI fix LS carrier replacement jump text
Browse files Browse the repository at this point in the history
Signed-off-by: DHD2280 <[email protected]>
  • Loading branch information
DHD2280 committed Dec 13, 2024
1 parent da29c91 commit 73d682b
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
mDateFormatDialog.show(
getString(R.string.lockscreen_carrier_replacement),
mPreferences.getString(LOCKSCREEN_CARRIER_REPLACEMENT, ""),
(text) -> mPreferences.edit().putString(LOCKSCREEN_CARRIER_REPLACEMENT, text.toString()).apply());
(text) -> {
mPreferences.edit().putString(LOCKSCREEN_CARRIER_REPLACEMENT, text.toString()).apply();
setJumps();
});
return true;
});
}
Expand Down Expand Up @@ -230,6 +233,7 @@ private void setJumps() {
OplusJumpPreference mLockscreenClock = findPreference("lockscreen_clock_main");
OplusJumpPreference mLockscreenWeather = findPreference("lockscreen_weather");
OplusJumpPreference mLockscreenWidgets = findPreference("lockscreen_widgets");
OplusJumpPreference mLsCarrierText = findPreference("ls_carrier_replacement");

if (mLockscreenClock != null) {
mLockscreenClock.setJumpText(mPreferences.getBoolean(LOCKSCREEN_CLOCK_SWITCH, false) ?
Expand All @@ -244,6 +248,11 @@ private void setJumps() {
if (mLockscreenWidgets != null) {
mLockscreenWidgets.setJumpText(mPreferences.getBoolean(LOCKSCREEN_WIDGETS_ENABLED, false) ? getString(R.string.general_on) : getString(R.string.general_off));
}

if (mLsCarrierText != null) {
mLsCarrierText.setJumpText(mPreferences.getString(LOCKSCREEN_CARRIER_REPLACEMENT, "").isEmpty() ?
getString(R.string.general_off) : getString(R.string.general_on));
}
}

ActivityResultLauncher<Intent> pickImageIntent = registerForActivityResult(
Expand Down

0 comments on commit 73d682b

Please sign in to comment.