Loading res/values/strings.xml +12 −0 Original line number Diff line number Diff line Loading @@ -7151,6 +7151,18 @@ <!-- Sound: Title for the option managing notification volume. [CHAR LIMIT=30] --> <string name="notification_volume_option_title">Notification volume</string> <!-- Sound: Content description of ring volume title in silent mode. [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=8994620163934249882] --> <string name="ringer_content_description_silent_mode">Ringer silent</string> <!-- Sound: Content description of ring volume title in vibrate mode. [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=6261841170896561364] --> <string name="ringer_content_description_vibrate_mode">Ringer vibrate</string> <!-- Sound: Content description of notification volume title in vibrate mode. [CHAR LIMIT=NONE] --> <string name="notification_volume_content_description_vibrate_mode">Notification volume muted, notifications will vibrate</string> <!-- Sound: Content description of volume title in silent mode [CHAR LIMIT=NONE] --> <string name="volume_content_description_silent_mode"> <xliff:g id="volume type" example="notification volume">%1$s</xliff:g> muted</string> <!-- Sound: Summary for when notification volume is disabled. [CHAR LIMIT=100] --> <string name="notification_volume_disabled_summary">Unavailable because ring is muted</string> src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceController.java +4 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,8 @@ public class ApprovalPreferenceController extends BasePreferenceController { final RestrictedSwitchPreference preference = (RestrictedSwitchPreference) pref; final CharSequence label = mPkgInfo.applicationInfo.loadLabel(mPm); final boolean isAllowedCn = mCn.flattenToShortString().length() <= NotificationManager.MAX_SERVICE_COMPONENT_NAME_LENGTH; final boolean isEnabled = isServiceEnabled(mCn); preference.setChecked(isEnabled); preference.setOnPreferenceChangeListener((p, newValue) -> { Loading @@ -105,7 +107,8 @@ public class ApprovalPreferenceController extends BasePreferenceController { return false; } }); preference.updateState(mCn.getPackageName(), mPkgInfo.applicationInfo.uid, isEnabled); preference.updateState( mCn.getPackageName(), mPkgInfo.applicationInfo.uid, isAllowedCn, isEnabled); } public void disable(final ComponentName cn) { Loading src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java +2 −2 Original line number Diff line number Diff line Loading @@ -623,9 +623,9 @@ public class FingerprintSettings extends SubSettings { return; // Activity went away } final Preference addPreference = findPreference(KEY_FINGERPRINT_ADD); mAddFingerprintPreference = findPreference(KEY_FINGERPRINT_ADD); if (addPreference == null) { if (mAddFingerprintPreference == null) { return; // b/275519315 Skip if updateAddPreference() invoke before addPreference() } Loading src/com/android/settings/notification/MediaVolumePreferenceController.java +13 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class MediaVolumePreferenceController extends VolumeSeekBarPreferenceCont public MediaVolumePreferenceController(Context context) { super(context, KEY_MEDIA_VOLUME); mVolumePreferenceListener = this::updateContentDescription; } @Override Loading Loading @@ -109,6 +110,18 @@ public class MediaVolumePreferenceController extends VolumeSeekBarPreferenceCont return false; } private void updateContentDescription() { if (mPreference != null) { if (mPreference.isMuted()) { mPreference.updateContentDescription( mContext.getString(R.string.volume_content_description_silent_mode, mPreference.getTitle())); } else { mPreference.updateContentDescription(mPreference.getTitle()); } } } @Override public SliceAction getSliceEndItem(Context context) { if (!isSupportEndItem()) { Loading src/com/android/settings/notification/NotificationAccessConfirmationActivity.java +3 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,9 @@ public class NotificationAccessConfirmationActivity extends Activity mUserId = getIntent().getIntExtra(EXTRA_USER_ID, UserHandle.USER_NULL); CharSequence mAppLabel; if (mComponentName == null || mComponentName.getPackageName() == null) { if (mComponentName == null || mComponentName.getPackageName() == null || mComponentName.flattenToString().length() > NotificationManager.MAX_SERVICE_COMPONENT_NAME_LENGTH) { finish(); return; } Loading Loading
res/values/strings.xml +12 −0 Original line number Diff line number Diff line Loading @@ -7151,6 +7151,18 @@ <!-- Sound: Title for the option managing notification volume. [CHAR LIMIT=30] --> <string name="notification_volume_option_title">Notification volume</string> <!-- Sound: Content description of ring volume title in silent mode. [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=8994620163934249882] --> <string name="ringer_content_description_silent_mode">Ringer silent</string> <!-- Sound: Content description of ring volume title in vibrate mode. [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=6261841170896561364] --> <string name="ringer_content_description_vibrate_mode">Ringer vibrate</string> <!-- Sound: Content description of notification volume title in vibrate mode. [CHAR LIMIT=NONE] --> <string name="notification_volume_content_description_vibrate_mode">Notification volume muted, notifications will vibrate</string> <!-- Sound: Content description of volume title in silent mode [CHAR LIMIT=NONE] --> <string name="volume_content_description_silent_mode"> <xliff:g id="volume type" example="notification volume">%1$s</xliff:g> muted</string> <!-- Sound: Summary for when notification volume is disabled. [CHAR LIMIT=100] --> <string name="notification_volume_disabled_summary">Unavailable because ring is muted</string>
src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceController.java +4 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,8 @@ public class ApprovalPreferenceController extends BasePreferenceController { final RestrictedSwitchPreference preference = (RestrictedSwitchPreference) pref; final CharSequence label = mPkgInfo.applicationInfo.loadLabel(mPm); final boolean isAllowedCn = mCn.flattenToShortString().length() <= NotificationManager.MAX_SERVICE_COMPONENT_NAME_LENGTH; final boolean isEnabled = isServiceEnabled(mCn); preference.setChecked(isEnabled); preference.setOnPreferenceChangeListener((p, newValue) -> { Loading @@ -105,7 +107,8 @@ public class ApprovalPreferenceController extends BasePreferenceController { return false; } }); preference.updateState(mCn.getPackageName(), mPkgInfo.applicationInfo.uid, isEnabled); preference.updateState( mCn.getPackageName(), mPkgInfo.applicationInfo.uid, isAllowedCn, isEnabled); } public void disable(final ComponentName cn) { Loading
src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java +2 −2 Original line number Diff line number Diff line Loading @@ -623,9 +623,9 @@ public class FingerprintSettings extends SubSettings { return; // Activity went away } final Preference addPreference = findPreference(KEY_FINGERPRINT_ADD); mAddFingerprintPreference = findPreference(KEY_FINGERPRINT_ADD); if (addPreference == null) { if (mAddFingerprintPreference == null) { return; // b/275519315 Skip if updateAddPreference() invoke before addPreference() } Loading
src/com/android/settings/notification/MediaVolumePreferenceController.java +13 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class MediaVolumePreferenceController extends VolumeSeekBarPreferenceCont public MediaVolumePreferenceController(Context context) { super(context, KEY_MEDIA_VOLUME); mVolumePreferenceListener = this::updateContentDescription; } @Override Loading Loading @@ -109,6 +110,18 @@ public class MediaVolumePreferenceController extends VolumeSeekBarPreferenceCont return false; } private void updateContentDescription() { if (mPreference != null) { if (mPreference.isMuted()) { mPreference.updateContentDescription( mContext.getString(R.string.volume_content_description_silent_mode, mPreference.getTitle())); } else { mPreference.updateContentDescription(mPreference.getTitle()); } } } @Override public SliceAction getSliceEndItem(Context context) { if (!isSupportEndItem()) { Loading
src/com/android/settings/notification/NotificationAccessConfirmationActivity.java +3 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,9 @@ public class NotificationAccessConfirmationActivity extends Activity mUserId = getIntent().getIntExtra(EXTRA_USER_ID, UserHandle.USER_NULL); CharSequence mAppLabel; if (mComponentName == null || mComponentName.getPackageName() == null) { if (mComponentName == null || mComponentName.getPackageName() == null || mComponentName.flattenToString().length() > NotificationManager.MAX_SERVICE_COMPONENT_NAME_LENGTH) { finish(); return; } Loading