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

Skip to content
Commit dde01370 authored by Hao Dong's avatar Hao Dong
Browse files

Fix default logo is wrong for some apps.

1. Use the new api setComponentNameForConfirmDeviceCredentialActivity()
   to set component name for ConfirmDeviceCredentialActivity to the
   calling activity's info.
   This solves the issue that when
   KeyguardManager.createConfirmDeviceCredentialIntent() is used, the
   top activity will be ConfirmDeviceCredentialActivity, and logo will
   be settings logo.

2. Update getting logo logic. Current order is:
   a. Check componentNameForConfirmDeviceCredentialActivity, if it's not
   null, use componentNameForConfirmDeviceCredentialActivity.
   b. Check top activity is the same as opPackageName, if so, use top
   activity.
   c. Check allowBackgroundAuthentication or isSystem, if so, use
   opPackageName.

   d. Check whether it's one of
   biometric_dialog_package_names_for_logo_with_overrides, if so, use
   IconProvider.getIcon() to get the logo with overrides; Otherwise use
   packageManager.getApplicationIcon() to get default logo.

3. Rename contains*Configurations() to requires*Permission() and add
   tests.

Test: atest PromptViewModelTest
Test: atest PromptSelectorInteractorImplTest
Test: atest AuthServiceTest
Flag: ACONFIG android.hardware.biometrics.custom_biometric_prompt NEXTFOOD
Bug: 337082634
Bug: 336403662

Change-Id: I87b9760cf55552c388902443f47ddcdd8786e010
parent a1de1721
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment