Commit Graph

10 Commits

Author SHA1 Message Date
Chaohui Wang
3ce806d870 Fix scrolling position not kept in Trusted Credentials
For example when changing display states.

Save view states to solve this issue.
 - Save current tab. (System / User)
 - Save group expanded state. (Personal / Work)
 - Save scrolling position of each group.

Also updated to ViewPager2 and updated the styles.

Bug: 204839552
Test: manual
Change-Id: Ibeda50b50e7dfd2ba071b75fe2aa88ef560f4c88
2022-04-15 10:12:36 +08:00
Philip P. Moltmann
035ea3b0d1 Use new RestrictedLockUtils API
This is made necessary by changes to the SystemAPI the lib relies on.

Test: RunSettingsRoboTests
Bug: 116798569
Change-Id: I2812ce9e58e3fb15a5579ddc10cd0edf33d0ed44
2018-10-09 12:39:19 -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
41ab6b4bf8 Migrate all AlertDialogs to AndroidX version
This CL only changed AlertDialog imports.
So, reviewer can review it easily.

Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
2018-07-20 11:32:13 +08:00
Robin Lee
bed8559a20 Enable the switch in TrustedCredentialsSettings
And match the behaviour of the dialog button that does the same thing,
so it only asks for confirmation when something is being irrevocably
deleted.

The dialog button should not be removed as it's used by system services
that deeplink to a specific cert to give the option of reviewing,
removing, or trusting it.

Bug: 31159682
Change-Id: I4fb3f38f8ab0e80e5c2dca0fc3d6d3bd4db26bb6
2016-09-02 11:03:32 +01:00
Victor Chang
71d1fed0e7 Show different strings when PO/DO user approves a cert
1. This is confusing for restricted users who don't have any options other
than 'Trust'.
2. show dialog title of "Check certificate" instead of "Trust or remove certificate"

The change only applies to ProfileOwner and DeviceOwner case

Fix: 28875819
Change-Id: I3f7dc8f3dcac75b4d99814cbc9af67433676a8c7
2016-05-31 22:43:09 +01:00
Victor Chang
45ca906e27 Trust the certificate after unlocking screenlock
When trust button is clicked, if ConfirmCredential (CC) is shown,
and user successfully unlock CC, trust the cert immediately

Bug: 28752364
Change-Id: Ied4aeda59a668a9dd2bf079a385b1fecd8eabb9e
2016-05-23 20:11:18 +01:00
Victor Chang
01f4dbcc1c Fix ConfirmCredential is not presented before trusting cert installed by PO/DO
- Show ConfirmCredential in TrustedCredentialsSettings when Trust button is clicked
  for the very first time since the activity launched
- Warning activity (work mode off, crpyto-aware) should not be shown when the activity is started. Also fixed it here.

Bug: 28619980
Change-Id: I084b70883c087376e437a9ad3238d7c3313a0a17
2016-05-11 15:05:21 +01:00
Victor Chang
f2e02db61e Disable trust button when no screenlock is set
Remove button is still allowed as it has been allowed in MNC
(Trust button is new in NYC)

Bug: 28161447
Change-Id: I8df73e1008c2e805f4d0b2ec68d8a4aa3bf75aba
2016-04-21 16:14:09 +01:00
Victor Chang
d7d0e1b6b0 CertDialog supports multiple certs
- Allow user to trust multiple certs in chain in one AlertDialog
- The animation is similar to GrantPermissionsViewHandlerImpl.
  - Fadeout current, Slide-in next cert from the right.
  - Not animate scale as the CustomeView in AlertDialog matchParent
- Refactor CertDialogBuilder into a separate class
- The change for config multiple cert into the dialog is another CL

note: For single cert case when user taps on a system/user cert,
no change is visible to user after this change

Bug: 18224038
Change-Id: I09ee8f683031c800830af4001582882d61cd4974
2016-04-12 16:09:30 +01:00