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

Commit 176d76f1 authored by Hao Ke's avatar Hao Ke Committed by Android (Google) Code Review
Browse files

Merge "Fix checkKeyIntentParceledCorrectly's bypass" into tm-dev

parents 4478cb06 3723f400
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -3091,7 +3091,7 @@ public class AccountManagerService
                            }
                        }

                        Intent intent = result.getParcelable(AccountManager.KEY_INTENT);
                        Intent intent = result.getParcelable(AccountManager.KEY_INTENT, Intent.class);
                        if (intent != null && notifyOnAuthFailure && !customTokens) {
                            /*
                             * Make sure that the supplied intent is owned by the authenticator
@@ -3516,8 +3516,7 @@ public class AccountManagerService
            Bundle.setDefusable(result, true);
            mNumResults++;
            Intent intent = null;
            if (result != null
                    && (intent = result.getParcelable(AccountManager.KEY_INTENT)) != null) {
            if (result != null) {
                if (!checkKeyIntent(
                        Binder.getCallingUid(),
                        result)) {
@@ -4876,8 +4875,10 @@ public class AccountManagerService
            	EventLog.writeEvent(0x534e4554, "250588548", authUid, "");
                return false;
            }

            Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT, Intent.class);
            if (intent == null) {
                return true;
            }
            // Explicitly set an empty ClipData to ensure that we don't offer to
            // promote any Uris contained inside for granting purposes
            if (intent.getClipData() == null) {
@@ -4927,8 +4928,12 @@ public class AccountManagerService
            Bundle simulateBundle = p.readBundle();
            p.recycle();
            Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT, Intent.class);
            return (intent.filterEquals(simulateBundle.getParcelable(AccountManager.KEY_INTENT,
                Intent.class)));
            Intent simulateIntent = simulateBundle.getParcelable(AccountManager.KEY_INTENT,
                    Intent.class);
            if (intent == null) {
                return (simulateIntent == null);
            }
            return intent.filterEquals(simulateIntent);
        }

        private boolean isExportedSystemActivity(ActivityInfo activityInfo) {
@@ -5073,8 +5078,7 @@ public class AccountManagerService
                    }
                }
            }
            if (result != null
                    && (intent = result.getParcelable(AccountManager.KEY_INTENT)) != null) {
            if (result != null) {
                if (!checkKeyIntent(
                        Binder.getCallingUid(),
                        result)) {