From 9ee4f596b6b38ecd38b5cc9d0fb68f3c0d089230 Mon Sep 17 00:00:00 2001 From: Dave Mankoff Date: Thu, 12 Sep 2019 16:41:43 -0400 Subject: [PATCH] RESTRICT AUTOMERGE Remove the possibility of an NPE that is being seen in master. This code is not actually doing anything useful in QPR1, so best to simply remove it. Bug: 140950258 Test: manual Change-Id: I53abdef77a93ad854935f79e431d9861b40c2427 --- .../systemui/SystemUIAppComponentFactory.java | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java b/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java index 00ae992957687..8cb594867b449 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java +++ b/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java @@ -17,8 +17,6 @@ package com.android.systemui; import android.app.Application; -import android.app.Service; -import android.content.Intent; import androidx.core.app.CoreComponentFactory; @@ -52,25 +50,4 @@ public class SystemUIAppComponentFactory extends CoreComponentFactory { return app; } - - @Override - public Service instantiateService(ClassLoader cl, String className, Intent intent) - throws InstantiationException, IllegalAccessException, ClassNotFoundException { - Service service = mComponentHelper.resolve(className); - if (service != null) { - return checkCompatWrapper(service); - } - return super.instantiateService(cl, className, intent); - } - - static T checkCompatWrapper(T obj) { - if (obj instanceof CompatWrapped) { - T wrapper = (T) ((CompatWrapped) obj).getWrapper(); - if (wrapper != null) { - return wrapper; - } - } - - return obj; - } }