Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 770a4e1f authored by Xin Li's avatar Xin Li Committed by Android (Google) Code Review
Browse files

Merge "Merge UP1A.230905.019" into aosp-main-future

parents 9c21429a f8a0c032
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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>
+4 −1
Original line number Diff line number Diff line
@@ -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) -> {
@@ -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) {
+2 −2
Original line number Diff line number Diff line
@@ -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()
            }

+13 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ public class MediaVolumePreferenceController extends VolumeSeekBarPreferenceCont

    public MediaVolumePreferenceController(Context context) {
        super(context, KEY_MEDIA_VOLUME);
        mVolumePreferenceListener = this::updateContentDescription;
    }

    @Override
@@ -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()) {
+3 −1
Original line number Diff line number Diff line
@@ -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