Commit Graph

17 Commits

Author SHA1 Message Date
Eric Biggers
ff16ec8542 Use StorageManager.isFileEncrypted() instead of deprecated methods
Since emulated FBE is no longer supported, isFileEncryptedNativeOnly()
and isFileEncryptedNativeOrEmulated() are the same as the new method
isFileEncrypted().  Replace all calls to these deprecated methods in
this repository with isFileEncrypted().

Bug: 232458753
Change-Id: I95beea86ef771396c2e08f2d6a643fdc629ad89f
2022-06-10 17:42:38 +00:00
Arc Wang
192fd24f26 Cleanup Storage Settings
Bug: 183078080
Test: make
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.deviceinfo
      make RunSettingsRoboTests
      ROBOTEST_FILTER=com.android.settings.deviceinfo.storage
      atest com.android.settings.deviceinfo
      atest com.android.settings.deviceinfo.storage
Change-Id: I901f5f7999ea94dafb72a2517a11e2ff1fd51b42
2021-04-14 21:37:46 +08:00
Kevin Chyn
7b0867c6d3 4/n: Remove challenge from choose/confirm, use new path
Biometric enrollment will not request a Gatekeeper HAT during
initial credential setup or credential confirmation anymore.
Instead, it is broken down into the following steps now.

Bug: 161765592

1) Request credential setup / confirmation to return a
   Gatekeeper Password
2) Biometric enrollment will generate a challenge
3) Biometric enrollment will request LockSettingsService to
   verify(GatekeeperPassword, challenge), and upon verification,
   the Gatekeeper HAT will be returned.

Since both LockSettingsService and Biometric enroll/settings
make use of biometric challenges, this allows us to make the
challenge ownership/lifecycle clear (vs. previously, where
LockSettingsService has no idea who the challenge belongs to).

Exempt-From-Owner-Approval:For files not owned by our team,
(StorageWizard), this change is just a method rename

Test: RunSettingsRoboTests

Run the following on face/fingerprint devices
Test: Remove credential
      adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Set up credential + fingerprint
Test: Remove credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ChooseLock* logic in FingerprintSettings
Test: Set up credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ConfirmLock* logic in FingerprintSettings
Test: Remove device credential, enroll fingerprint/face. Succeeds.
      This tests the ChooseLock* returning SP path from
      BiometricEnrollIntro
Test: With credential and fingerprint/face enrolled, go to
      fingerprint/face settings and enroll. This tests the
      ConfirmLock* path in Fingerprint/FaceSettings
Test: Remove device credential, enroll credential-only, enroll
      fingerprint/face separately. Succeeds. This tests the
      ConfirmLock* returning SP path in BiometricEnrollIntro
Test: In SUW, set up credential, then biometric. This tests
      the ChooseLock* path in SUW
Test: In SUW, set up credential, go back, then set up biometric.
      This tests the ConfirmLock* path in SUW

Change-Id: Idf6fcb43f7497323d089eb9c37125294e7a7f5dc
2020-08-07 12:49:15 -07:00
Edgar Wang
8829e515ca Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: Ibe64a68d7bddf84780dfac33555c097ff55c97a8
2020-07-30 12:54:27 +08:00
Kevin Chyn
b13bc50542 1/n: Make ChooseLockSettingsHelper into a builder
The multitude of slightly different launchConfirmationActivity(*)
methods are a big unsustainable pyramid. It's too difficult to
read, too difficult to track which clients are interested in which
parameters, and too difficult to add new parameters, since we need to

1) Read through all of them and find one that's the closest
2) Try not to affect other callers, so potentially add yet another
3) Modify the internal paths, which all basically call each other
   until it reaches the biggest launchConfirmationActivity which
   has ALL of the parameters

This change should have no behavioral change.

Note: CredentialStorage doesn't need returnCredentials anymore as of
      ag/6073449

Test: make -j56 RunSettingsRoboTests
Test: Manually traced code paths for each invocation. A few hidden
      dependencies (such as explicitly setting challenge=0 with
      hasChallenge=true) were found. Left them the way they were in
      case they were intended
Test: Enroll face, fingerprint
Test: Enable developer options
Test: Change to PIN, Pattern, Password, then back to PIN (so each
      type requests confirmation)
Test: adb shell am start -a android.app.action.CONFIRM_DEVICE_CREDENTIAL,
      authenticate
Test: adb shell am start -a android.app.action.CONFIRM_FRP_CREDENTIAL
      (shows confirm credential screen)
Fixes: 138453993

Change-Id: Ic82ef3c3ac2e14d624281921f2d816bcdacbd82b
2020-07-24 11:13:13 -07:00
JeiFeng Lee
7bc5f91289 [PATCH] Buttons in storage settings
Due to changes in layout of storage wizard base,
2 extra buttons are shown on progress screen while formatting SD card
and also on other screens which have storage wizard base as their super class.
Hence when these buttons were clicked unsupported exception takes place.
Hide these unnecessary next/back buttons from all screen so that user cannot click these.

Fixes: 131779469
Test: manual
Change-Id: I235a180627e68bbb38f4ed4e7ac58ae38838c8d7
Signed-off-by: JeiFeng Lee <linger.lee@mediatek.com>
2019-05-07 09:14:40 +08: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
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Jeff Sharkey
2af67a9302 Update storage wizard to latest UX mocks.
Mostly shuffling around strings and layouts.  Slow device warning is
now a full-screen activity, and format warning is now a dialog.

Bug: 76097999
Test: atest com.android.settings.ui.StorageWizardTest
Change-Id: Ifd74e3b1389f0cc9590f6a6a2cd49671f3bbc746
2018-04-08 20:06:27 -06: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
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Daichi Hirono
fba2fd8375 Use 'setup' header illust before selecting storage type.
Previously the storage setup wizard shows 'internal' header illust before user
selects storage type.  The CL turns the initial illust into 'setup' header
illust.

BUG=22211635

Change-Id: Ie429a6197d210e0bd1ef8d0af6abb6f83295ac50
2015-07-02 15:38:39 +09:00
Makoto Onuki
302b77f425 Don't crash on NameNotFoundException
Just finish().

Bug 20672468

Change-Id: Ic600e060990b7e3bc3e98bda63d0f4c9e530fb94
2015-06-17 10:22:28 -07:00
Jeff Sharkey
8e987d9bfb Finish storage wizard theming.
Storage wizard screens now have updated assets from UX, and various
assets are tinted consistently.  We're using our own navigation bar
and wholesale replacing the layout from upstream.

Fix text colors in night mode.  Tell SystemUI when we're finished
with the wizard flow.

Bug: 21830731
Change-Id: Ic8d09cc152bfb4dcc6089b5c61d28cbdd4be3ee9
2015-06-16 15:28:49 -07:00
Makoto Onuki
1d37d0f7fb Add simple null checks to StorageWizard*, also listen to...
the disk destroyed event.

Bug 21336042

Change-Id: I9f53501a6122a4a9046774e3c4c08b5d6d6f8552
2015-06-12 16:28:18 -07:00
Jeff Sharkey
954d8dad5e Migrate package movement to use new API.
We now kick off the move immediately, and pass along the "ID" of the
move in progress.  This allows the progress activity to be completely
destroyed and recreated without kicking off a second conflicting move
operation.

Also uses new cleaner movement API that accepts direct VolumeInfo.

Bug: 19993667
Change-Id: I28bc268fcb42dfc9152020b16ef7058d63157597
2015-04-23 20:11:48 -07:00
Jeff Sharkey
1f4efd7360 Move packages between candidate volumes.
We now allow moving packages between all possible candidate volumes,
as determined by the framework.  Moving now jumps through wizard to
help user understand what's going on.

Bug: 19993667
Change-Id: I5416ed2865f400b1d718c68a3f0e033080fefa0e
2015-04-15 22:14:09 -07:00