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

Commit a358a92a authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "Disable FaceAuthScreenBrightnessController"

parents b0f1c525 64d9b345
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -64,7 +64,8 @@ open class FaceAuthScreenBrightnessController(
    private val globalSettings: GlobalSettings,
    private val systemSettings: SystemSettings,
    private val mainHandler: Handler,
    private val dumpManager: DumpManager
    private val dumpManager: DumpManager,
    private val enabled: Boolean
) : Dumpable {

    private var userDefinedBrightness: Float = 1f
@@ -86,7 +87,7 @@ open class FaceAuthScreenBrightnessController(
                return
            }
            // TODO enable only when receiving a low-light error
            overridingBrightness = running
            overridingBrightness = if (enabled) running else false
        }
    }
    private lateinit var whiteOverlay: View
@@ -188,6 +189,7 @@ open class FaceAuthScreenBrightnessController(
            println("brightnessAnimationDuration: $brightnessAnimationDuration")
            println("maxScreenBrightness: $maxScreenBrightness")
            println("userDefinedBrightness: $userDefinedBrightness")
            println("enabled: $enabled")
        }
    }
}
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -142,8 +142,9 @@ public class KeyguardModule {
            return Optional.empty();
        }

        // currently disabled (doesn't ramp up brightness or use scrim) see b/175918367
        return Optional.of(new FaceAuthScreenBrightnessController(
                notificationShadeWindowController, keyguardUpdateMonitor, resources,
                globalSetting, systemSettings, handler, dumpManager));
                globalSetting, systemSettings, handler, dumpManager, false));
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class FaceAuthScreenBrightnessControllerTest : SysuiTestCase() {
        MockitoAnnotations.initMocks(this)
        faceAuthScreenBrightnessController = object : FaceAuthScreenBrightnessController(
                notificationShadeWindowController, keyguardUpdateMonitor, resources, globalSettings,
                systemSettings, mainHandler, dumpManager) {
                systemSettings, mainHandler, dumpManager, true) {
            override fun createAnimator(start: Float, end: Float) = animator
        }
        `when`(systemSettings.getFloat(eq(SCREEN_BRIGHTNESS_FLOAT))).thenReturn(INITIAL_BRIGHTNESS)