summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-09-26 14:18:12 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-09-26 14:18:12 +0000
commit7ff0acc02951e73920ad97094d78f02493f965e3 (patch)
tree03db10fd86cadf7f49ae8926a41a4214f8ce1c68
parent09aea812c06c975693a459318e1e8d393c32bf6a (diff)
parent730f01a61994042c1db5f14a8683583edcfd9e04 (diff)
Merge "Ensure component helper is set before resolving activities."
-rw-r--r--packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java b/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java
index 2c8324cafca0..aa13fa834f56 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java
@@ -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;