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

Commit 730f01a6 authored by Dave Mankoff's avatar Dave Mankoff
Browse files

Ensure component helper is set before resolving activities.

Bug: 141550642
Change-Id: Id7fe7a9098eaf0947f94a2250e1ac51eb9dcb63f
Test: atest SystemUITests
parent c022a8d1
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;