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

Commit 221597ac authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Misc baseline support for SysUI.

SysUI code relies on the straightforward Singleton, DisplayInfo,
and PinResult classes, and working around them in SysUI would be
quite disruptive, so this change supports them under Ravenwood,
along with tests to confirm their behavior.

Bug: 319647875
Test: atest FrameworksCoreTestsRavenwood
Change-Id: Iea091bb09f6df9f8b23593871a805646a215ac0a
parent 63ab1df3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.compat.annotation.UnsupportedAppUsage;
 *
 * @hide
 */
@android.ravenwood.annotation.RavenwoodKeepWholeClass
public abstract class Singleton<T> {

    @UnsupportedAppUsage
+2 −0
Original line number Diff line number Diff line
@@ -2079,6 +2079,7 @@ public final class Display {
     *
     * @see Display#getSupportedModes()
     */
    @android.ravenwood.annotation.RavenwoodKeepWholeClass
    public static final class Mode implements Parcelable {
        /**
         * @hide
@@ -2467,6 +2468,7 @@ public final class Display {
     * <p>You can get an instance for a given {@link Display} object with
     * {@link Display#getHdrCapabilities getHdrCapabilities()}.
     */
    @android.ravenwood.annotation.RavenwoodKeepWholeClass
    public static final class HdrCapabilities implements Parcelable {
        /**
         * Invalid luminance value.
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import java.util.Objects;
 * Describes the characteristics of a particular logical display.
 * @hide
 */
@android.ravenwood.annotation.RavenwoodKeepWholeClass
public final class DisplayInfo implements Parcelable {
    /**
     * The surface flinger layer stack associated with this logical display.
+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import java.io.PrintWriter;
 * (new) system for storing the brightness. It has methods to convert between the two and also
 * observes for when one of the settings is changed and syncs this with the other.
 */
@android.ravenwood.annotation.RavenwoodKeepPartialClass
public class BrightnessSynchronizer {
    private static final String TAG = "BrightnessSynchronizer";

@@ -282,6 +283,7 @@ public class BrightnessSynchronizer {
     * @param b second float to compare
     * @return whether the two values are within a small enough tolerance value
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public static boolean floatEquals(float a, float b) {
        if (a == b) {
            return true;
+2 −0
Original line number Diff line number Diff line
@@ -211,7 +211,9 @@ android_ravenwood_test {
    srcs: [
        "src/android/database/CursorWindowTest.java",
        "src/android/os/**/*.java",
        "src/android/telephony/PinResultTest.java",
        "src/android/util/**/*.java",
        "src/android/view/DisplayInfoTest.java",
        "src/com/android/internal/logging/**/*.java",
        "src/com/android/internal/os/**/*.java",
        "src/com/android/internal/util/**/*.java",
Loading