summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/SystemUIApplication.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/startable/Dependencies.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java2
3 files changed, 5 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index ea8fe59d3c89..fb88f0e4e093 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -300,7 +300,7 @@ public class SystemUIApplication extends Application implements
Class<?> cls = entry.getKey();
Dependencies dep = cls.getAnnotation(Dependencies.class);
- Class<? extends CoreStartable>[] deps = (dep == null ? null : dep.value());
+ Class<?>[] deps = (dep == null ? null : dep.value());
if (deps == null || startedStartables.containsAll(Arrays.asList(deps))) {
String clsName = cls.getName();
int i = serviceIndex; // Copied to make lambda happy.
@@ -324,7 +324,7 @@ public class SystemUIApplication extends Application implements
Map.Entry<Class<?>, Provider<CoreStartable>> entry = nextQueue.removeFirst();
Class<?> cls = entry.getKey();
Dependencies dep = cls.getAnnotation(Dependencies.class);
- Class<? extends CoreStartable>[] deps = (dep == null ? null : dep.value());
+ Class<?>[] deps = (dep == null ? null : dep.value());
StringJoiner stringJoiner = new StringJoiner(", ");
for (int i = 0; deps != null && i < deps.length; i++) {
if (!startedStartables.contains(deps[i])) {
diff --git a/packages/SystemUI/src/com/android/systemui/startable/Dependencies.kt b/packages/SystemUI/src/com/android/systemui/startable/Dependencies.kt
index 5e57f1d1a11f..8eed0975579d 100644
--- a/packages/SystemUI/src/com/android/systemui/startable/Dependencies.kt
+++ b/packages/SystemUI/src/com/android/systemui/startable/Dependencies.kt
@@ -27,4 +27,4 @@ import kotlin.reflect.KClass
@MustBeDocumented
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
-annotation class Dependencies(vararg val value: KClass<out CoreStartable> = [])
+annotation class Dependencies(vararg val value: KClass<*> = [])
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java b/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java
index 8104755b5e7b..d2fe20d9c50c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java
@@ -23,6 +23,7 @@ import android.view.View;
import com.android.systemui.CoreStartable;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.startable.Dependencies;
import com.android.systemui.statusbar.phone.CentralSurfaces;
import java.lang.annotation.Retention;
@@ -30,6 +31,7 @@ import java.lang.annotation.Retention;
/**
* Sends updates to {@link StateListener}s about changes to the status bar state and dozing state
*/
+@Dependencies(CentralSurfaces.class)
public interface SysuiStatusBarStateController extends StatusBarStateController, CoreStartable {
// TODO: b/115739177 (remove this explicit ordering if we can)