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

Commit 005a4891 authored by Dmitry Dementyev's avatar Dmitry Dementyev Committed by Automerger Merge Worker
Browse files

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

parents f202c5a7 413da0f7
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -4917,6 +4917,8 @@ public class AccountManagerService
                    Log.e(TAG, String.format(tmpl, activityName, pkgName, mAccountType));
                    Log.e(TAG, String.format(tmpl, activityName, pkgName, mAccountType));
                    return false;
                    return false;
                }
                }
                intent.setComponent(targetActivityInfo.getComponentName());
                bundle.putParcelable(AccountManager.KEY_INTENT, intent);
                return true;
                return true;
            } finally {
            } finally {
                Binder.restoreCallingIdentity(bid);
                Binder.restoreCallingIdentity(bid);
@@ -4938,14 +4940,15 @@ public class AccountManagerService
            Bundle simulateBundle = p.readBundle();
            Bundle simulateBundle = p.readBundle();
            p.recycle();
            p.recycle();
            Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT, Intent.class);
            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 simulateIntent = simulateBundle.getParcelable(AccountManager.KEY_INTENT,
                    Intent.class);
                    Intent.class);
            if (intent == null) {
            if (intent == null) {
                return (simulateIntent == null);
                return (simulateIntent == null);
            }
            }
            if (intent.getClass() != Intent.class || simulateIntent.getClass() != Intent.class) {
                return false;
            }

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