Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
97d3fd46
Commit
97d3fd46
authored
8 months ago
by
Oliver Scott
Committed by
Dhina17
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fixup! SystemUI: Restore 14 QPR1 FingerprintInteractiveToAuth handling
Change-Id: I2804e1c49ba03e77180801c9fa6dacdd2eb233c9
parent
f6b10044
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/FakeFingerprintInteractiveToAuthProvider.kt
+27
-1
27 additions, 1 deletion
...ui/biometrics/FakeFingerprintInteractiveToAuthProvider.kt
with
27 additions
and
1 deletion
packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/FakeFingerprintInteractiveToAuthProvider.kt
+
27
−
1
View file @
97d3fd46
...
...
@@ -16,15 +16,41 @@
package
com.android.systemui.biometrics
import
android.content.Context
import
android.hardware.biometrics.common.AuthenticateReason
import
android.provider.Settings
import
com.android.internal.R
import
kotlinx.coroutines.flow.MutableStateFlow
import
org.mockito.Mockito
class
FakeFingerprintInteractiveToAuthProvider
:
FingerprintInteractiveToAuthProvider
{
override
val
enabledForCurrentUser
:
MutableStateFlow
<
Boolean
>
=
MutableStateFlow
(
false
)
private
val
mockContext
=
Mockito
.
mock
(
Context
::
class
.
java
)
private
val
defaultValue
=
if
(
mockContext
.
resources
.
getBoolean
(
R
.
bool
.
config_fingerprintWakeAndUnlock
))
{
1
}
else
{
0
}
private
val
userIdToExtension
=
mutableMapOf
<
Int
,
AuthenticateReason
.
Vendor
>()
override
fun
getVendorExtension
(
userId
:
Int
):
AuthenticateReason
.
Vendor
?
=
userIdToExtension
[
userId
]
userIdToExtension
[
userId
]
override
fun
isEnabled
(
userId
:
Int
):
Boolean
{
var
value
=
Settings
.
Secure
.
getIntForUser
(
mockContext
.
contentResolver
,
Settings
.
Secure
.
SFPS_PERFORMANT_AUTH_ENABLED
,
-
1
,
userId
,
)
if
(
value
==
-
1
)
{
value
=
defaultValue
}
return
value
==
0
}
fun
setVendorExtension
(
userId
:
Int
,
extension
:
AuthenticateReason
.
Vendor
)
{
userIdToExtension
[
userId
]
=
extension
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment