Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ff0acc0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensure component helper is set before resolving activities."

parents 09aea812 730f01a6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -92,6 +92,12 @@ public class SystemUIAppComponentFactory extends AppComponentFactory {
    public Activity instantiateActivityCompat(@NonNull ClassLoader cl, @NonNull String className,
            @Nullable Intent intent)
            throws InstantiationException, IllegalAccessException, ClassNotFoundException {
        if (mComponentHelper == null) {
            // This shouldn't happen, but is seen on occasion.
            // Bug filed against framework to take a look: http://b/141008541
            SystemUIFactory.getInstance().getRootComponent().inject(
                    SystemUIAppComponentFactory.this);
        }
        Activity activity = mComponentHelper.resolveActivity(className);
        if (activity != null) {
            return activity;