From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dmitry Dementyev Date: Fri, 30 Jun 2023 14:36:44 -0700 Subject: [PATCH] Update AccountManagerService checkKeyIntentParceledCorrectly. Bug: 265798288 Test: manual (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b117b506ec0504ff9eb2fa523e82f1879ecb8cc1) Merged-In: Iad33851af32a11c99d11bc2b5c76d124c3e97ebb Change-Id: Iad33851af32a11c99d11bc2b5c76d124c3e97ebb --- .../com/android/server/accounts/AccountManagerService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index 36732273ab6f..ec15113c2c78 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -4827,6 +4827,9 @@ public class AccountManagerService Bundle simulateBundle = p.readBundle(); p.recycle(); Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT); + if (intent != null && intent.getClass() != Intent.class) { + return false; + } Intent simulateIntent = simulateBundle.getParcelable(AccountManager.KEY_INTENT); if (intent == null) { return (simulateIntent == null);