Merge "Avoid SettingNotFoundException"
This commit is contained in:
@@ -177,7 +177,7 @@ open class FaceAuthScreenBrightnessController(
|
||||
userDefinedBrightness = systemSettings.getFloat(SCREEN_BRIGHTNESS_FLOAT)
|
||||
}
|
||||
})
|
||||
userDefinedBrightness = systemSettings.getFloat(SCREEN_BRIGHTNESS_FLOAT)
|
||||
userDefinedBrightness = systemSettings.getFloat(SCREEN_BRIGHTNESS_FLOAT, 1f)
|
||||
}
|
||||
|
||||
override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
|
||||
|
||||
@@ -87,6 +87,8 @@ class FaceAuthScreenBrightnessControllerTest : SysuiTestCase() {
|
||||
override fun createAnimator(start: Float, end: Float) = animator
|
||||
}
|
||||
`when`(systemSettings.getFloat(eq(SCREEN_BRIGHTNESS_FLOAT))).thenReturn(INITIAL_BRIGHTNESS)
|
||||
`when`(systemSettings.getFloat(eq(SCREEN_BRIGHTNESS_FLOAT), eq(1f)))
|
||||
.thenReturn(INITIAL_BRIGHTNESS)
|
||||
faceAuthScreenBrightnessController.attach(whiteOverlay)
|
||||
verify(keyguardUpdateMonitor).registerCallback(capture(keyguardUpdateCallback))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user