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

Commit 7b65ea8b authored by Ale Nijamkin's avatar Ale Nijamkin Committed by Android (Google) Code Review
Browse files

Merge changes I15b67961,I98ad3af3 into main

* changes:
  [flexiglass] CentralSurfaces is a dep of StatusBarStateController.
  Changes CoreStartable Dependencies to use Class.
parents 147b446f 9a2e20a9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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])) {
+1 −1
Original line number Diff line number Diff line
@@ -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<*> = [])
+2 −0
Original line number Diff line number Diff line
@@ -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)