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

Commit 64d9b345 authored by Beverly's avatar Beverly
Browse files

Disable FaceAuthScreenBrightnessController

Temporary change so the ML team can create a baseline read on
low-light performance without additional screen brightness
ramping + additional scrims.

Test: manual
Bug: 175918367
Change-Id: I542d80c037cffc99a2abea3f44fdbd7d732a2f3d
parent 1c82ef49
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)