summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-12-08 06:34:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-12-08 06:34:24 +0000
commitbdd1caebf987f636339aa7992cb328b8c333493f (patch)
treee574db37e24d981d16f2ceef5d121066d7753b29
parent88fc7c7b75cca1cc3cb3a4af9692ad7068386af6 (diff)
parentbc6453c34913ef163a7ab465c878c063650156e7 (diff)
Merge "Catch exception when package is unknown." into main
-rw-r--r--services/core/java/com/android/server/content/SyncManager.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index 3b7d80c844de..1e5e147749a2 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -1292,7 +1292,11 @@ public class SyncManager {
*/
private boolean isPackageStopped(String packageName, int userId) {
if (android.content.pm.Flags.stayStopped()) {
- return mPackageManagerInternal.isPackageStopped(packageName, userId);
+ try {
+ return mPackageManagerInternal.isPackageStopped(packageName, userId);
+ } catch (IllegalArgumentException e) {
+ Log.d(TAG, "Couldn't determine stopped state for unknown package: " + packageName);
+ }
}
return false;
}