Loading packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java +14 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ import android.app.Service; import android.content.ContentProvider; import android.content.Context; import android.content.Intent; import android.os.Process; import android.util.Log; import androidx.annotation.NonNull; import androidx.core.app.AppComponentFactory; Loading @@ -38,6 +40,7 @@ import javax.inject.Inject; */ public class SystemUIAppComponentFactory extends AppComponentFactory { private static final String TAG = "AppComponentFactory"; @Inject public ContextComponentHelper mComponentHelper; Loading @@ -57,6 +60,9 @@ public class SystemUIAppComponentFactory extends AppComponentFactory { SystemUIFactory.createFromConfig(context); SystemUIFactory.getInstance().getRootComponent().inject( SystemUIAppComponentFactory.this); Log.d(TAG, "Initialized during Application creation in Process " + Process.myPid() + ", Thread " + Process.myTid()); Log.d(TAG, "mComponentHelper: " + mComponentHelper); } ); } Loading @@ -77,6 +83,8 @@ public class SystemUIAppComponentFactory extends AppComponentFactory { SystemUIFactory.createFromConfig(context); SystemUIFactory.getInstance().getRootComponent().inject( contentProvider); Log.d(TAG, "Initialized during ContentProvider creation in Process " + Process.myPid() + ", Thread " + Process.myTid()); } ); } Loading @@ -89,6 +97,12 @@ public class SystemUIAppComponentFactory extends AppComponentFactory { public Service instantiateServiceCompat( @NonNull ClassLoader cl, @NonNull String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException { if (mComponentHelper == null) { // Everything is about to crash if this is true, but that is inevitable. We either crash // here or crash lower in the stack. Better to crash early! Log.wtf(TAG, "Uninitialized mComponentHelper in Process" + Process.myPid() + ", Thread " + Process.myTid()); } Service service = mComponentHelper.resolveService(className); if (service != null) { return service; Loading Loading
packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java +14 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ import android.app.Service; import android.content.ContentProvider; import android.content.Context; import android.content.Intent; import android.os.Process; import android.util.Log; import androidx.annotation.NonNull; import androidx.core.app.AppComponentFactory; Loading @@ -38,6 +40,7 @@ import javax.inject.Inject; */ public class SystemUIAppComponentFactory extends AppComponentFactory { private static final String TAG = "AppComponentFactory"; @Inject public ContextComponentHelper mComponentHelper; Loading @@ -57,6 +60,9 @@ public class SystemUIAppComponentFactory extends AppComponentFactory { SystemUIFactory.createFromConfig(context); SystemUIFactory.getInstance().getRootComponent().inject( SystemUIAppComponentFactory.this); Log.d(TAG, "Initialized during Application creation in Process " + Process.myPid() + ", Thread " + Process.myTid()); Log.d(TAG, "mComponentHelper: " + mComponentHelper); } ); } Loading @@ -77,6 +83,8 @@ public class SystemUIAppComponentFactory extends AppComponentFactory { SystemUIFactory.createFromConfig(context); SystemUIFactory.getInstance().getRootComponent().inject( contentProvider); Log.d(TAG, "Initialized during ContentProvider creation in Process " + Process.myPid() + ", Thread " + Process.myTid()); } ); } Loading @@ -89,6 +97,12 @@ public class SystemUIAppComponentFactory extends AppComponentFactory { public Service instantiateServiceCompat( @NonNull ClassLoader cl, @NonNull String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException { if (mComponentHelper == null) { // Everything is about to crash if this is true, but that is inevitable. We either crash // here or crash lower in the stack. Better to crash early! Log.wtf(TAG, "Uninitialized mComponentHelper in Process" + Process.myPid() + ", Thread " + Process.myTid()); } Service service = mComponentHelper.resolveService(className); if (service != null) { return service; Loading