Commit Graph

24 Commits

Author SHA1 Message Date
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Janis Danisevskis
b705e1a691 Make Settings aware of legacy user keys with secret key prefix
Secret keys are not longer identifiable by their alias prefix.
So now we call getKeyCharacteristics and check the algorithm of the
key.

Bug: 63931634
Test: Manually installed a key and checked that it is still dispayed
      correctly.
Change-Id: I55a4e46434618cb52ceb9456f184e004165872fd
2017-12-15 13:46:27 -08:00
Doris Ling
4a01283309 Remove the feature flag for using new title.
- remove all code that check for the feature flag, and use the new logic
by default.

Change-Id: I7fbe60da84c1c0f35e7241402a71d2bc4cd300e6
Fixes: 64564191
Test: make RunSettingsRoboTests
2017-11-13 17:58:13 -08:00
Doris Ling
ed4685fafb Update activity titles for fragments without preference screen.
1. Move getPreferenceScreenResId() from individual subclass to
InstrumentedPreferenceFragment.

2. Removed InstrumentedPreferenceFragment.getTitle() and let the
preference fragments that do not have preference screen set the activity
title directly instead.

3. Removed OptionsMenuFragment as all it does is call
setHasOptionMenu().
- changed subclasses of OptionsMenuFragment to extend from
InstrumentedPreferenceFragment directly.
- none of the exisitng subclasses actually implements the option menu
related methods to provide any option menu. So, the setHasOptionMenu()
call is not added to the subclasses.

4. Update Languages preference title.
- launch the fragment from the preference controller instead of from the
default handling, as we need the title res id at launch time to get it
work properly when retrieving the title from back stack.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Ibecdcab32cbaed8bf604ec5ebe0a926b4e489a7d
2017-10-26 12:01:06 -07:00
Doris Ling
03a3b518de Update preference screen title.
- Add missing title to preference screen xml so that they will be used to
set the activity title when the fragment is launched.
- Also updated some incorrect preference screen titles.
- Overrides getTitle() in preference fragments that do not use the
preference screen xml.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Id72d5ddf18f0962bc484de8bbd847a2e55d6371e
2017-10-25 11:02:07 -07:00
Robin Lee
ccaf9c91fc UserCredentialsSettings: that fresh new blank look
Less obviously easy than it looks because we want to make it a
SettingsPreferenceFragment for consistency with the other blank
fragment implementations.

Fix: 30878596
Test: make RunSettingsRoboTests
Test: # open up Settings and have a look, uninstall cert, reinstall cert
Change-Id: Ifbe3132475c3104d76589a50dec3f436b9548585
2017-03-24 14:57:13 +00:00
Rubin Xu
52221d80d2 Do not show key entries used for user authentication flow
Bug: 33126414
Test: Enable new authentication flow; go to user credentials in Settings
      observe no entries related to user authentication are shown.
Change-Id: I62e5796cc73213b23ca7809a77082350a883fbee
2017-02-13 14:06:17 +00:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
1e516287bd Add visibility metrics to dialogs.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Change-Id: I199d2e1b2cb8588a562b46bb8128d8ece24952f0
2016-09-19 17:34:12 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Robin Lee
e68d957777 Include wifi certificates in settings
Deleting wifi certificates isn't supported yet since cascading the
removal back into wifi configs will need some easy way of enumerating
wifi configs first.

Bug: 29208062
Change-Id: I2d9d1ea7e0974701009bfa6ea162b8bc80806639
2016-07-25 15:35:08 +01:00
TreeHugger Robot
9298f8c604 Merge "Announce user credential deletions" 2016-07-07 16:54:31 +00:00
Ricky Wai
9579274cda Hide work profile key in user credentials screen
Bug: 28878708
Change-Id: Ic9733ea973e1cc37028cb5f740969b5e24fb5aef
2016-05-25 13:11:24 +00:00
Robin Lee
11fd5506ae Announce user credential deletions
Change-Id: I08c3d022c37b5c5fb9f2e996fcbe131dffce4ba0
Fix: 26352550
2016-05-16 14:45:44 +00:00
Robin Lee
f8e2dbf2d2 Guard double-showing of user credentials dialog
Only create & show the dialogfragment if it does not already exist.

Bug: 28058930
Change-Id: Ia48cc8a5fd60a12c3beb6c9263036a449cf8d67c
2016-04-07 13:20:21 +01:00
Robin Lee
4d29ab3145 Merge "DISALLOW_CONFIG_CREDENTIALS blocks user credentials" into nyc-dev 2016-03-31 18:44:21 +00:00
Robin Lee
c421db78f0 DISALLOW_CONFIG_CREDENTIALS blocks user credentials
All settings preferences related to credentials of any kind should be
stopped by this user restriction.

Bug: 26879958
Change-Id: I983c6e58081bd4022bb006942499cba4b74954e7
2016-03-31 18:45:43 +01:00
Udam Saini
0708d9e119 Fixes back button on action bar on some fragments.
SettingsPreferenceFragment has this already set so that the drawer
layout will work when the menu doesn't exist. However, some fragments
are not preference fragments, and we need to set setHasOptionsMenu
manually.

bug:27879503
Change-Id: I6faadeb56dab00af611ac413109800822038c66d
2016-03-29 10:29:14 -07:00
Robin Lee
da7bc51615 Use KeyChain instead of Credentials to delete certs
Credentials is a bit too low-level. KeyChain will call into the same API
but also arrange deletion of grants, send out STORAGE_CHANGED broadcast
and anything else that might be needed in future.

Bug: 27335182
Change-Id: I764ffa3c5539ddec2b9a776bd3fec6a78a043248
2016-02-24 18:58:31 +00:00
Robin Lee
b70b3d86c9 Use MetricsEvent.USER_CREDENTIALS
Bug: 22541933
Change-Id: I0f4bc76933ec04d3e9146a354ea2e1feee1d8e0a
2016-02-01 12:59:15 +00:00
Robin Lee
e26804208c Test: parcel marshalling for user credentials page
Unit test to verify that the internal Credential that gets passed to
dialogs for removing said credential is actually a valid Parcelable
object, since it's hard to provoke a marshal/unmarshal in real-world
usage (but not impossible).

Bug: 22541933
Change-Id: I780ca2d7b01fc6081b9ea8b2810cfc97f0433a86
2016-01-25 12:27:31 +00:00
Robin Lee
04046a1976 Convert credential view to DialogFragment
Bug: 26352310
Change-Id: Ic6af37c893eec5a83e198b9f23ebd766e88e0109
2016-01-22 17:36:17 +00:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Robin Lee
baefdcf9eb Show installed user keys in Security Settings
This makes removing a particular keyset possible without deleting the
whole keystore along with it.

Bug: 22541933
Change-Id: I248803cb27efdd1695438dfc82951887dc579f99
2015-08-26 16:22:19 +01:00