diff options
| author | Makoto Onuki <omakoto@google.com> | 2018-05-07 14:43:05 -0700 |
|---|---|---|
| committer | Makoto Onuki <omakoto@google.com> | 2018-05-08 10:01:16 -0700 |
| commit | 4589565b63a116cb8d72b2dfbc6c53bb07caa6ea (patch) | |
| tree | 944e115557c5d62985094ab5ca72111cabe23e4f /core/java | |
| parent | f450a7266bab285066d9f26445d4529a0f843d38 (diff) | |
Pre-cache more system servers
Bug: 78792330
Test: Boot system
Change-Id: Id65d9f7d9a697e3c85b410e5da4028a712e4347a
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index a183f735d74a..0ae4b7d3df66 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -857,6 +857,27 @@ public final class ActivityThread extends ClientTransactionHandler { String buildSerial, boolean autofillCompatibilityEnabled) { if (services != null) { + if (false) { + // Test code to make sure the app could see the passed-in services. + for (Object oname : services.keySet()) { + if (services.get(oname) == null) { + continue; // AM just passed in a null service. + } + String name = (String) oname; + + // See b/79378449 about the following exemption. + switch (name) { + case "package": + case Context.WINDOW_SERVICE: + continue; + } + + if (ServiceManager.getService(name) == null) { + Log.wtf(TAG, "Service " + name + " should be accessible by this app"); + } + } + } + // Setup the service cache in the ServiceManager ServiceManager.initServiceCache(services); } |
