From 2f456040b88162978a8c9ac6ce511fa2b62909bd Mon Sep 17 00:00:00 2001 From: rockyfang Date: Thu, 14 Jul 2022 01:00:58 +0000 Subject: [PATCH] Skip WTF log for missing CONTEXTHUB_SERVICE Wtf dump will record unnecessary log if device does not support ContextHubMangager and impacting the performance in low RAM device. Adding CONTEXTHUB_SERVICE in the switch statement creates a exception to not log it. Fixes: 236768432 Test: TreeHugger test Change-Id: I724f7b1e1c7aa30f37d578ca302c3f57a5187075 --- core/java/android/app/SystemServiceRegistry.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java index 6615374f71eca..36e1eee79d350 100644 --- a/core/java/android/app/SystemServiceRegistry.java +++ b/core/java/android/app/SystemServiceRegistry.java @@ -1606,6 +1606,7 @@ public final class SystemServiceRegistry { case Context.APP_PREDICTION_SERVICE: case Context.INCREMENTAL_SERVICE: case Context.ETHERNET_SERVICE: + case Context.CONTEXTHUB_SERVICE: return null; } Slog.wtf(TAG, "Manager wrapper not available: " + name);