summaryrefslogtreecommitdiff
path: root/services/java/com
diff options
context:
space:
mode:
authorMakoto Onuki <omakoto@google.com>2020-02-18 12:38:21 -0800
committerMakoto Onuki <omakoto@google.com>2020-04-01 17:27:58 -0700
commita455e5e28160e29d76b84278e28bdd7cb14f538b (patch)
treefebd7a818abbedd7d3eddc83d02170835906e5c3 /services/java/com
parentc068acb6aeb3d86226f8eaccad7ddee8d4dfd8db (diff)
Add WTF when a system server wrapper can't be found
2nd try -- enable it only within the system server. This is to detect someone trying to access system services too early during a boot. Bug: 149406139 Test: Boot with "adb logcat | grep -w SystemServiceRegistry" and make sure no wtf is logged Change-Id: I64c6776cedaeb534d98621db2955d585e6846b8d
Diffstat (limited to 'services/java/com')
-rw-r--r--services/java/com/android/server/SystemServer.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 1939313ff59b..2a914ecf4db6 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -30,6 +30,7 @@ import android.annotation.StringRes;
import android.app.ActivityThread;
import android.app.AppCompatCallbacks;
import android.app.INotificationManager;
+import android.app.SystemServiceRegistry;
import android.app.usage.UsageStatsManagerInternal;
import android.content.ContentResolver;
import android.content.Context;
@@ -513,6 +514,8 @@ public final class SystemServer {
Looper.getMainLooper().setSlowLogThresholdMs(
SLOW_DISPATCH_THRESHOLD_MS, SLOW_DELIVERY_THRESHOLD_MS);
+ SystemServiceRegistry.sEnableServiceNotFoundWtf = true;
+
// Initialize native services.
System.loadLibrary("android_servers");