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

Commit 476d9182 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/21872485',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/21872485', 'googleplex-android-review.googlesource.com/22290643'] into security-aosp-tm-release.

Change-Id: I0d64f190ca1a197241d6c9ba67e7ea7582f79ab6
parents cb5dbea0 5569a796
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -103,7 +103,8 @@ public class AddAccountSettings extends Activity {
                    intent.putExtras(addAccountOptions)
                            .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                            .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
                    startActivityForResultAsUser(intent, ADD_ACCOUNT_REQUEST, mUserHandle);
                    startActivityForResultAsUser(
                            new Intent(intent), ADD_ACCOUNT_REQUEST, mUserHandle);
                } else {
                    setResult(RESULT_OK);
                    if (mPendingIntent != null) {
+7 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ public class NotificationAccessSettings extends EmptyTextSettings {
    private static final String TAG = "NotifAccessSettings";
    private static final String ALLOWED_KEY = "allowed";
    private static final String NOT_ALLOWED_KEY = "not_allowed";
    private static final int MAX_CN_LENGTH = 500;

    private static final ManagedServiceSettings.Config CONFIG =
            new ManagedServiceSettings.Config.Builder()
@@ -101,6 +102,12 @@ public class NotificationAccessSettings extends EmptyTextSettings {
                .setNoun(CONFIG.noun)
                .setSetting(CONFIG.setting)
                .setTag(CONFIG.tag)
                .setValidator(info -> {
                    if (info.getComponentName().flattenToString().length() > MAX_CN_LENGTH) {
                        return false;
                    }
                    return true;
                })
                .build();
        mServiceListing.addCallback(this::updateList);