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
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user