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

Commit e0a1ba94 authored by Binyi Wu's avatar Binyi Wu Committed by Automerger Merge Worker
Browse files

Merge "Prevent intent defined in AccountPreference from leaking access" into...

Merge "Prevent intent defined in AccountPreference from leaking access" into tm-qpr-dev am: effd45b3 am: b2aa91a3

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19852695



Change-Id: I9aee9ecb42c05fadf7bfc7b2345644e32b72dd0b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 547d4fbe b2aa91a3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.settings.accounts;

import android.accounts.Account;
import android.accounts.AuthenticatorDescription;
import android.content.ClipData;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
@@ -164,6 +165,9 @@ public class AccountTypePreferenceLoader {
                                 * exploiting the fact that settings has system privileges.
                                 */
                            if (isSafeIntent(pm, prefIntent, acccountType)) {
                                // Explicitly set an empty ClipData to ensure that we don't offer to
                                // promote any Uris contained inside for granting purposes
                                prefIntent.setClipData(ClipData.newPlainText(null, null));
                                mFragment.getActivity().startActivityAsUser(
                                    prefIntent, mUserHandle);
                            } else {