summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/content/pm/RegisteredServicesCache.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java
index 82663849f316..74da62c85ed2 100644
--- a/core/java/android/content/pm/RegisteredServicesCache.java
+++ b/core/java/android/content/pm/RegisteredServicesCache.java
@@ -527,13 +527,14 @@ public abstract class RegisteredServicesCache<V> {
lastUpdateTime = packageInfo.lastUpdateTime;
} catch (NameNotFoundException | SecurityException e) {
Slog.d(TAG, "Fail to get the PackageInfo in generateServicesMap: " + e);
- continue;
}
- ServiceInfo<V> serviceInfo = getServiceInfoFromServiceCache(componentName,
- lastUpdateTime);
- if (serviceInfo != null) {
- serviceInfos.add(serviceInfo);
- continue;
+ if (lastUpdateTime >= 0) {
+ ServiceInfo<V> serviceInfo = getServiceInfoFromServiceCache(componentName,
+ lastUpdateTime);
+ if (serviceInfo != null) {
+ serviceInfos.add(serviceInfo);
+ continue;
+ }
}
}
try {