mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-14 02:14:34 -05:00
ffddff80bf
Signed-off-by: Tavi <tavi@divested.dev>
38 lines
2.0 KiB
Diff
38 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dmitry Dementyev <dementyev@google.com>
|
|
Date: Tue, 2 Jul 2024 11:02:07 -0700
|
|
Subject: [PATCH] Remove authenticator data if it was disabled.
|
|
|
|
Test: manual
|
|
Bug: 343440463
|
|
Flag: EXEMPT bugfix
|
|
(cherry picked from commit ddfc078af7e89641360b896f99af23a6b371b847)
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cd372149336675c82e032fe2613d1dc8b03122f6)
|
|
Merged-In: I36bd6bf101da03c9c30a6d3c0080b801e7898bc6
|
|
Change-Id: I36bd6bf101da03c9c30a6d3c0080b801e7898bc6
|
|
---
|
|
.../android/server/accounts/AccountManagerService.java | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java
|
|
index ce98ce412aaa..0d20d86da413 100644
|
|
--- a/services/core/java/com/android/server/accounts/AccountManagerService.java
|
|
+++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
|
|
@@ -636,6 +636,16 @@ public class AccountManagerService
|
|
META_KEY_FOR_AUTHENTICATOR_UID_FOR_TYPE_PREFIX + type,
|
|
uid}
|
|
);
|
|
+ } else if (knownUid != null && !uid.equals(knownUid.toString())) {
|
|
+ Slog.w(TAG, "authenticator no longer exist for type " + type);
|
|
+ obsoleteAuthType.add(type);
|
|
+ db.delete(
|
|
+ TABLE_META,
|
|
+ META_KEY + "=? AND " + META_VALUE + "=?",
|
|
+ new String[] {
|
|
+ META_KEY_FOR_AUTHENTICATOR_UID_FOR_TYPE_PREFIX + type,
|
|
+ uid}
|
|
+ );
|
|
}
|
|
}
|
|
}
|