Commit Graph

22 Commits

Author SHA1 Message Date
Jason Chang
8f0c731fce Change SUW theme style for Fingerprint and Face enrollment flow (3/n)
Apply SUW theme style for Fingerprint and Face enrollment flow

Flag: EXEMPT Using setup library's flag

Bug: 346562327

Test: manually build and perform a visual inspection.
Change-Id: Ia6c4c3dbc78f9ad82b7f503d39e883480b09a92d
2024-10-31 20:11:01 +00:00
Rubin Xu
8e9d78ff91 Delay gargabe collection during onDestroy()
Allow the activity object to become unreachable before
iniating a gargabe collection to sanitize memory.

Bug: 189315376
Test: add device lock, confirm device lock in Settings,
      then a memory dump and search for password shards.
Change-Id: I807d74628e1355814807855ad309d86ca1fb38a1
2021-07-02 14:32:03 +01:00
Matt Pietal
558ace6aca SUW - Apply theme to FRP PIN pages
It is safe to always attempt to copy SUW intent extras, as they will
only be applied if they exist.

Fixes: 171950236
Fixes: 181212237
Fixes: 183711331
Test: SUW FRP verify, settings confirm existing PIN
Change-Id: I6d35683abdc864aea7b1ed0190d6776a75b3e116
2021-04-28 13:29:29 -04:00
Mill Chen
82777ba0c0 Disable toolbar title of screen lock pages
After applying collapsing toolbar in the Settings app, the toolbar title
will be shown in every subsetting pages. However some pages in the
security category don't need the title, like set screen lock page and
lock screen page. This CL is to disable these titles through overriding
isToolbarEnabled method.

Bug: 176883575
Test: manual test and visual verified
1) Navigate to Settings -> Security -> Screen lock ->
Pattern/PIN/Password
2) Observe and check if there is a duplicated title.

Change-Id: I6dfa4fbe1b5e2ac3582804ba1e125196f3bdba6c
2021-01-11 18:31:54 +08:00
pihuei
55fb2b745d Use system day/night to switch theme instead of from intent extra.
Use value-night to give theme instead of directly from intent extra when Setup day/nNight mode enabled and in Setup flow

Before:
<vision settings>
https://hsv.googleplex.com/4837266235064320
<wifi dialog>
https://hsv.googleplex.com/5687053981319168
<lock screen with disabling button>
https://hsv.googleplex.com/4843506419892224
<lock screen with enabling button>
https://hsv.googleplex.com/5650348922372096
<fingerprint intro>
https://hsv.googleplex.com/5133769046491136
<fingerprint touch>
https://hsv.googleplex.com/5681937198874624
<fingerprint left touch>
https://hsv.googleplex.com/5767441676238848
<squeeze release>
https://hsv.googleplex.com/6632476812247040

After:
<vision settings>
https://hsv.googleplex.com/6213298875793408
<wifi dialog>
https://hsv.googleplex.com/6025790804197376
<lock screen with disabling button>
https://hsv.googleplex.com/5747461219942400
<lock screen with enabling button>
https://hsv.googleplex.com/5766700781797376
<fingerprint intro>
https://hsv.googleplex.com/6751334529236992
<fingerprint touch>
https://hsv.googleplex.com/5625963293442048
<fingerprint left touch>
https://hsv.googleplex.com/4518139360444416
<squeeze release>
https://hsv.googleplex.com/5220720579706880

Bug: 169734655
Test: robo test
Change-Id: I4aab843e28a932c7b823f36f1d8df1e5b2341f4e
2020-11-05 05:09:14 +00:00
Rubin Xu
670a30e766 Remove password shards from memory
Force a garbage collection and zeroize some fields after Activity finishes

Test: Goes through password change flow, then grab a heap dump via
      adb shell 'am dumpheap $(pidof com.android.settings)
      /data/local/tmp/settings.hprof'
      And grep for password in the dump
Bug: 144537463
Change-Id: Idd0a04ada98900aeb2a6d20bb1270a4a4aec2cfd
2020-06-12 15:56:04 +01:00
Alex Johnston
7868acfa74 Update work profile lock in Settings to latest spec
* Updated FrameLayout of work profile lock in Settings to use GlifLayout
* Removed old background image of work profile lock
* Updated text for PIN, password and pattern
* Added enterprise logo to work profile lock

Bug: 141290838
Test: Manual testing
      atest com.android.settings.password

Change-Id: Ie09974857b6c76a182a8075b9e1964a2e0af0de9
2020-01-07 14:15:28 +00:00
joshmccloskey
3786016993 Removed old settings device credential logic.
Bug: 140128468
Test: Verified with biometricpromptdemo that confirm device credential
still works correctly.
Change-Id: I0f608ba1256c696317402f56549452bf6933066b
2019-09-18 15:57:22 -07:00
Kevin Chyn
e27a304b97 Add ability to finish() ConfirmDeviceCredential if it loses foreground
If user enters face settings but does not enter the password, then
turns off the screen, it's possible the challenge is invalidated. Instead,
we should finish() the device credential screen as well as FaceSettings.

This prevents
1) The user from being prompted for credential with lack of context
2) Credential returning a HAT that wraps an invalidated challenge

The user will be returned to the security settings screen, where they
have more context and can decide if they want to enter face settings again.

Fixes: 138273242

Test: 1) Open face settings, do not enter password
      2) Press power button
      3) Unlock keyguard
      4) User is not presented with credential screen
Test: Go through SUW, turning on/off the screen at various security
      screens. Able to enroll successfully

Change-Id: I3c3d4600138012821bb0eea7d2927df00011cdb0
2019-07-26 16:42:14 -07:00
Fan Zhang
9db66a562c Clean up before making all setting page render edge-to-edge
These classes are casting view to LinearLayout unnecessarily. Later we
might change the root view away from LinearLayout. The cast will cause
crash.

Bug: 132182711
Test: go through SUW.
Change-Id: Iea31882f8edea0c87ef8e95b4da9b6bffa8ea7d0
2019-05-10 21:27:05 +00:00
Kevin Chyn
eeca918ac7 ConfirmDeviceCredential should respond to cancel when launched through BP
Fixes: 128747871

Test: BiometricPrompt launched by ConfirmDeviceCredential is canceled
Test: ConfirmLock* can also now be canceled
Test: No effect on non-biometric related paths

Change-Id: I237de136e63d523fece87fad7a93f4ecd66d800b
2019-04-04 17:22:23 +00:00
Rubin Xu
654a78b56e Do no crash when profile is deleted
Catch the exception and finish the activity.

Change-Id: I45deec32fd49119ab7943a941158bca82b63c432
Fix: 122823738
Test: manual
2019-03-22 15:06:56 +00:00
Kevin Chyn
e56df8877a CDCA is plumbed through BP
CDCA can be invoked with a bundle extra originating from BiometricService.
This allows us to add/forward new BP builder options to CDCA without having
duplicate API each time.

Bug: 111461540
Test: test app, receives correct callbacks
Test: CDC still works

Change-Id: Ia2080d161abba87949338176b34cdf440ed4ed53
2019-01-25 18:13:38 -08:00
Kevin Chyn
b3ee23154d 3/n: Make CDCA transparent and add BiometricPrompt
ConfirmDeviceCredentials now uses BiometricPrompt instead of
FingerprintManager

Bug: 111461540

Test: FRP does not display BiometricPrompt (as expected)
      adb shell settings put global device_provisioned 0 && adb shell am start -a android.app.action.CONFIRM_FRP_CREDENTIAL
Test: Using KeyguardManager API to launch, all corner cases seem OK
Test: Tested with work profile + one lock enabled/disabled, seems OK
Test: Enroll normal FP but not work FP, BiometricPromptDemo for both works
      OK
Test: Test CC on work version of BPD, then BP on normal version of BPD,
      both accept correct FP's (no regression from P)

Change-Id: Iacdaf76ab76971850212dc79513bfa3f4b89eb9a
2018-11-01 15:14:04 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Maurice Lam
3e3b8a9618 Make GLIF theme default for confirm lock screen
Use GLIF theme as the default for confirm lock screen, even for
"external" launches of the screen. Renamed the theme from "internal"
to "normal" to reflect this change.
Dark theme code will be cleaned up later.

Test: Existing tests pass
Bug: 62573742
Change-Id: I86958eb3a440d7274807f1cf453c3e53c16c23e7
2018-03-21 18:21:04 -07:00
Jeff Sharkey
219ec91e1a Unlock all users before moving or migrating.
When moving apps or shared storage between storage media on FBE
devices, we need all users to be unlocked to successfully move
the data.  This change asks the user to enter the credentials for
any locked users as part of the moving/migration wizard flows.

To do this we relax Utils.enforceSameOwner() to let us prompt for the
credentials of unrelated users, but we carefully only extend this
capability to callers interacting with the "internal" activities,
which require the MANAGE_USERS permission.

Test: builds, boots, users are unlocked before moving
Bug: 29923055, 25861755
Change-Id: Ifaeb2557c4f8c4354e1d380eaa0e413768ee239f
2017-12-19 15:07:05 -07:00
Fan Zhang
6d479d99a9 Misc fixes for settings
- Set device credential's Window flag to be SECURE. This prevents
  showing any pattern/pin in recent list.
- Disable tap sound on entity header

Fixes: 64339515
Fixes: 64413598
Test: visual
Test: runtest --path \
      tests/app/src/com/android/settings/password/ChooseLockGenericTest.java
2017-08-08 10:34:03 -07:00
Maurice Lam
846172564e Make confirm lock screen use the right theme
Test: cd tests/robotests && mma
Bug: 62348472
Change-Id: Ie05c2e6adba8450a1092f0fefcad6b003398de7d
2017-06-16 13:02:36 -07:00
Maurice Lam
2eb170cd6f Clean up choose lock intent creation
Consolidated the many variants of ChooseLock*.createIntent, so that
it will take the same set of arguments.

Also modified SetupChooseLock*.createIntent to modifyIntentForSetup,
which will take the intent created by ChooseLock* and modify it for
use with setup.

Test: cd tests/robotests && mma
Change-Id: I5ff033f459c33ec9980872a536b3996d89f2bbbb
2017-05-12 15:35:20 -07:00