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

Commit 8b5e678e authored by Dmitry Dementyev's avatar Dmitry Dementyev Committed by Automerger Merge Worker
Browse files

Merge "Update checkKeyIntent" into tm-dev am: 413da0f7 am: 183257bf am:...

Merge "Update checkKeyIntent" into tm-dev am: 413da0f7 am: 183257bf am: 6119d343 am: 965fd40e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/29676541



Change-Id: I5ff6390b10b431e66191af759cba4b48b13990a4
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a53fff2d 965fd40e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -4991,6 +4991,8 @@ public class AccountManagerService
                    Log.e(TAG, String.format(tmpl, activityName, pkgName, mAccountType));
                    return false;
                }
                intent.setComponent(targetActivityInfo.getComponentName());
                bundle.putParcelable(AccountManager.KEY_INTENT, intent);
                return true;
            } finally {
                Binder.restoreCallingIdentity(bid);
@@ -5012,14 +5014,15 @@ public class AccountManagerService
            Bundle simulateBundle = p.readBundle();
            p.recycle();
            Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT, Intent.class);
            if (intent != null && intent.getClass() != Intent.class) {
                return false;
            }
            Intent simulateIntent = simulateBundle.getParcelable(AccountManager.KEY_INTENT,
                    Intent.class);
            if (intent == null) {
                return (simulateIntent == null);
            }
            if (intent.getClass() != Intent.class || simulateIntent.getClass() != Intent.class) {
                return false;
            }

            if (!intent.filterEquals(simulateIntent)) {
                return false;
            }