Commit Graph

3639 Commits

Author SHA1 Message Date
Brian Carlstrom
d4023b7cca Integrating keystore with keyguard (Part 4 of 4)
Summary:

frameworks/base
  keystore rewrite
  keyguard integration with keystore on keyguard entry or keyguard change
  KeyStore API simplification

packages/apps/Settings
  Removed com.android.credentials.SET_PASSWORD intent support
  Added keyguard requirement for keystore use

packages/apps/CertInstaller
  Tracking KeyStore API changes
  Fix for NPE in CertInstaller when certificate lacks basic constraints

packages/apps/KeyChain
  Tracking KeyStore API changes

Details:

frameworks/base

   Move keystore from C to C++ while rewriting password
   implementation. Removed global variables. Added many comments.

	cmds/keystore/Android.mk
	cmds/keystore/keystore.h
	cmds/keystore/keystore.c => cmds/keystore/keystore.cpp
	cmds/keystore/keystore_cli.c => cmds/keystore/keystore_cli.cpp

   Changed saveLockPattern and saveLockPassword to notify the keystore
   on changes so that the keystore master key can be reencrypted when
   the keyguard changes.

	core/java/com/android/internal/widget/LockPatternUtils.java

   Changed unlock screens to pass values for keystore unlock or initialization

	policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
	policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java

   KeyStore API changes
   - renamed test() to state(), which now return a State enum
   - made APIs with byte[] key arguments private
   - added new KeyStore.isEmpty used to determine if a keyguard is required

	keystore/java/android/security/KeyStore.java

   In addition to tracking KeyStore API changes, added new testIsEmpty
   and improved some existing tests to validate expect values.

	keystore/tests/src/android/security/KeyStoreTest.java

packages/apps/Settings

    Removing com.android.credentials.SET_PASSWORD intent with the
    removal of the ability to set an explicit keystore password now
    that the keyguard value is used. Changed to ensure keyguard is
    enabled for keystore install or unlock. Cleaned up interwoven
    dialog handing into discrete dialog helper classes.

	AndroidManifest.xml
	src/com/android/settings/CredentialStorage.java

    Remove layout for entering new password

	res/layout/credentials_dialog.xml

    Remove enable credentials checkbox

	res/xml/security_settings_misc.xml
	src/com/android/settings/SecuritySettings.java

    Added ability to specify minimum quality key to ChooseLockGeneric
    Activity. Used by CredentialStorage, but could also be used by
    CryptKeeperSettings. Changed ChooseLockGeneric to understand
    minimum quality for keystore in addition to DPM and device
    encryption.

	src/com/android/settings/ChooseLockGeneric.java

    Changed to use getActivePasswordQuality from
    getKeyguardStoredPasswordQuality based on experience in
    CredentialStorage. Removed bogus class javadoc.

	src/com/android/settings/CryptKeeperSettings.java

    Tracking KeyStore API changes

	src/com/android/settings/vpn/VpnSettings.java
	src/com/android/settings/wifi/WifiSettings.java

   Removing now unused string resources

	res/values-af/strings.xml
	res/values-am/strings.xml
	res/values-ar/strings.xml
	res/values-bg/strings.xml
	res/values-ca/strings.xml
	res/values-cs/strings.xml
	res/values-da/strings.xml
	res/values-de/strings.xml
	res/values-el/strings.xml
	res/values-en-rGB/strings.xml
	res/values-es-rUS/strings.xml
	res/values-es/strings.xml
	res/values-fa/strings.xml
	res/values-fi/strings.xml
	res/values-fr/strings.xml
	res/values-hr/strings.xml
	res/values-hu/strings.xml
	res/values-in/strings.xml
	res/values-it/strings.xml
	res/values-iw/strings.xml
	res/values-ja/strings.xml
	res/values-ko/strings.xml
	res/values-lt/strings.xml
	res/values-lv/strings.xml
	res/values-ms/strings.xml
	res/values-nb/strings.xml
	res/values-nl/strings.xml
	res/values-pl/strings.xml
	res/values-pt-rPT/strings.xml
	res/values-pt/strings.xml
	res/values-rm/strings.xml
	res/values-ro/strings.xml
	res/values-ru/strings.xml
	res/values-sk/strings.xml
	res/values-sl/strings.xml
	res/values-sr/strings.xml
	res/values-sv/strings.xml
	res/values-sw/strings.xml
	res/values-th/strings.xml
	res/values-tl/strings.xml
	res/values-tr/strings.xml
	res/values-uk/strings.xml
	res/values-vi/strings.xml
	res/values-zh-rCN/strings.xml
	res/values-zh-rTW/strings.xml
	res/values-zu/strings.xml
	res/values/strings.xml

packages/apps/CertInstaller

  Tracking KeyStore API changes
	src/com/android/certinstaller/CertInstaller.java

  Fix for NPE in CertInstaller when certificate lacks basic constraints
	src/com/android/certinstaller/CredentialHelper.java

packages/apps/KeyChain

  Tracking KeyStore API changes
	src/com/android/keychain/KeyChainActivity.java
	src/com/android/keychain/KeyChainService.java
	support/src/com/android/keychain/tests/support/IKeyChainServiceTestSupport.aidl
	support/src/com/android/keychain/tests/support/KeyChainServiceTestSupport.java
	tests/src/com/android/keychain/tests/KeyChainServiceTest.java

Change-Id: I80533bf8986a92b0b99cd5fb1c4943e0f23fc1c8
2011-06-01 10:47:42 -07:00
Adam Powell
f5b25a9eda am 7d4e88b3: am 57218b5a: am 3c110e50: Fix account type selector for adding accounts to match holo layout guidelines.
* commit '7d4e88b3d4f4f5b17a93f3be8fe19b65df45b0d7':
  Fix account type selector for adding accounts to match holo layout guidelines.
2011-05-31 16:02:30 -07:00
Jim Miller
49b20cb5f4 am c78f8769: am fbc72cd6: am fd8f7f12: Merge "Fix 4462497: Make ownerinfo preference layout more dynamic" into honeycomb-mr2
* commit 'c78f87694ddff4badfc1953821250eb68d237330':
  Fix 4462497: Make ownerinfo preference layout more dynamic
2011-05-31 16:01:17 -07:00
Amith Yamasani
1f7014a25a Merge "Reduce padding to the left of progress category to match framework changes." into honeycomb-mr2 2011-05-27 14:49:21 -07:00
Amith Yamasani
e7da064e4f Reduce padding to the left of progress category to match framework changes.
Otherwise the WIFI/BT device names don't align with the header.

Change-Id: Ibd10cb7bb38c80a90ef895e2bdb1083b833a2824
2011-05-27 14:31:28 -07:00
Svetoslav Ganov
6f0b4d8143 Accessibility service specific settings.
This is the settings part of the change for adding
support for accessibility service specific settings.

1. Added the first cut of a SettingsCheckBoxPreference
   that is a CheckBoxPreference that optionally takes
   an intent to be lauched as settings of the item
   represented by the preference.

2. Updated the AccessibilitySettigns to use the
   SettingsCheckBoxPreference.

Change-Id: If44262b8965c65620c6b8c252f8ef356eb0d95cf
2011-05-27 13:24:31 -07:00
Daniel Sandler
a862f2b14b Merge "Dream (screensaver) settings." 2011-05-26 20:27:55 -07:00
Amith Yamasani
61154c1c86 am f7d58032: am 6246d459: am e9f5a297: Merge "Fix blank Battery Use screen due to changes in framework." into honeycomb-mr2
* commit 'f7d58032cd9dc7bc553ae47cd7a8166c6afc23d0':
  Fix blank Battery Use screen due to changes in framework.
2011-05-26 11:41:41 -07:00
Daniel Sandler
2943cfa606 Dream (screensaver) settings.
Depends on change Ied691856 for
Settings.Secure.DREAM_TIMEOUT and
Settings.Secure.DREAM_COMPONENT.

Change-Id: Ib6f74b74036e12637efb891b97e459a4e33444e7
2011-05-26 11:32:06 -04:00
Dianne Hackborn
aef746c45f Implement new manage apps UI for compat mode.
Change-Id: Ia8db7f534b7294fbbb34e0acdedab3a96cea59e9
2011-05-26 01:06:11 -07:00
Amith Yamasani
ba61aaaaa3 am 0fbaacaa: am 138a695f: am cfd524f0: Visual adjustments for smaller tablets.
* commit '0fbaacaa9b29401a4191ca85dccfe68660928a11':
  Visual adjustments for smaller tablets.
2011-05-25 21:28:22 -07:00
Adam Powell
3c110e500d Fix account type selector for adding accounts to match holo layout
guidelines.

Change-Id: I0cb2f2655e878de65b25c46e2b852bad6e1a99ad
2011-05-25 17:46:30 -07:00
Jim Miller
fd8f7f120d Merge "Fix 4462497: Make ownerinfo preference layout more dynamic" into honeycomb-mr2 2011-05-25 16:06:17 -07:00
Jim Miller
b633cea58b Fix 4462497: Make ownerinfo preference layout more dynamic
This fixes a bug where the EditText of OwnerInfo was partially
off-screen in portrait mode on 7" devices.

Change-Id: I8ba985ac6ce88bb42209a8a7f8acc5b4476fe8f2
2011-05-25 14:56:00 -07:00
Amith Yamasani
84272f1aa8 Fix blank Battery Use screen due to changes in framework.
Changes in the framework to increase horizontal space for preferences
that don't have a "widget" caused BatteryUse preference to go blank.
Removed the widget_frame id from the layout file.

Change-Id: Ib67227eb3a7ae4019b22d9b89040f72aff63b605
2011-05-25 12:57:04 -07:00
Amith Yamasani
cfd524f07a Visual adjustments for smaller tablets.
Make the Manage Apps tab indicators horizontally scrollable.
Use medium font size for user dictionary.

Bug: 4462313

Change-Id: Iba44e758715c0187ea17ed072794b8596dee0e54
2011-05-24 15:49:34 -07:00
Gilles Debunne
783be0a24f Fixes in UsageBarPreference
The widget layout that was used resulted in a clipped usage bar.
It also had a 6dip left offset inherited from the default layout
which adds margin after the text (even if the text is empty here).
Used a custom layout for the whole preference to fix this issue.

Other fixes in the drawing code to prevent accumulative rounding
issues.

Change-Id: Ief9bf85260345355615c9670624d86f0893eb2d2
2011-05-06 14:12:15 -07:00
Jim Miller
74b1e0a733 Fix 4283049: Restore continue/cancel buttons in LockScreen Settings
This fixes a bug where the continue/cancel buttons were missing
from LockScreen settings in landscape mode.

The change also includes a minor change to enable using the IME enter
key to proceed to the next step.

Change-Id: I2dca0b40e38a128cc0aa637f573da01e779edb73
2011-04-15 18:52:31 -07:00
Jim Miller
30cf12cc17 Fix LockScreen Settings on phones.
Change-Id: Ibbb0bcb4f34ba442d9ec678277718d3141f9d807
2011-03-30 21:16:48 -07:00
Daisuke Miyakawa
6eb9979910 Use consistent indent
Not all indents but just relevant ones are fixed.

Change-Id: I042f3f70b4ede1e4cc90136b99005d4c4d455de9
2011-03-07 19:26:06 -08:00
Daisuke Miyakawa
f82efaedce Fix layout for wifi setup xl
- use 56dip instead of 48dip for TableRow's height
- enclose some Views to accomodate them well
  in TableRow
- use center_vertical instead of bottom to show
  TextView. Bottom texts looks weird with wider height.

Change-Id: I9c544cb4f2532e8ceb84a746fc22223ca1dce58c
2011-03-07 17:58:01 -08:00
Daisuke Miyakawa
d85ce3c9ea Put SSID field first.
Bug: 3508455
Change-Id: I1626562d235947cd662a3eb9579f93b6ebc6ab56
2011-03-03 20:08:09 -08:00
Irfan Sheriff
00615cf5dc DO NOT MERGE Proxy and IP fixes
Fix dual display of IP addresses for static IP
Fix inputType for proxy and IP fields
Add hint texts for IP fields

Change-Id: I5b556a07c2a5b69ecec959c933f2872e70496946
2011-03-03 15:01:07 -08:00
Vasu Nori
4602996430 Merge "bug:3321005 make Settings --> Storage screen display little less ugly" 2011-03-02 17:52:42 -08:00
Vasu Nori
340e85d1d0 bug:3321005 make Settings --> Storage screen display little less ugly
I have implemented most of what the UX designer proposed. except these
1. Percentage Bar chart left padding should be 16dip
2. Percentage Bar chart and Total Space preferences should be combined into
   one singne ViewGroup or something. and "total Space" shoudl be aligned
   on the right border

Change-Id: I9b238eaa561c9837b47b9955e7d718d92543ca34
2011-03-02 17:26:53 -08:00
Irfan Sheriff
086147c869 add proxy hint texts
also, a minor fix for soft access point hint text

Change-Id: Ib8facba1c252e6b7a8f29eb5792149943c0e15f0
2011-03-02 15:42:27 -08:00
Daisuke Miyakawa
d1c22a1b56 Show more graceful screens for "add network" flow
- use TableLayout instead of RelativeLayout for
  wifi configuration to align each columns appropriately.
- split @id/type field into two fields in SetupWizard

Bug: 3403168
Change-Id: I37f2c60ce1b0473af7d20dee1775e9893d2abade
2011-03-02 13:05:14 -08:00
Vasu Nori
21809740f2 display amount of storage on /sdcard by downloads, music etc
when music storage usage is clicked on, show music app
when downloads storage usage is clicked on, show download app
when pic/videos storage usage is clicked on, show gallery app

Change-Id: Ia1c341013e550acb537e6f8a4f4558030888cc45
2011-02-18 12:05:13 -08:00
Irfan Sheriff
f11033f7ab Merge "Re-enable wifi proxy UI" 2011-02-10 14:56:52 -08:00
Irfan Sheriff
d9c7dcf0e4 Re-enable wifi proxy UI
- Add text to warn users about support
- Move proxy above IP settings based on UI recommendations

Bug: 3328410
Change-Id: I3b5aafd32b16adfcd2fadb572ebb2694afdeccbb
2011-02-10 10:21:54 -08:00
Daisuke Miyakawa
35eae7ccc7 Clean up XL Wifi setup and fix misc problems.
- Introduce screen state, which suppress inconsistent
  UI shown in 3378805.
- Introduce initSecurityFields(), which will reduce hook
  inside WifiConfigController#showSecurityfields()
- fix layout for eap-not-supported case with "add network"
  flow.

Bug: 3378805
Bug: 3403168
Change-Id: I52895570809095d9baceac5f84665572188ecefd
2011-02-09 12:23:28 -08:00
Jim Miller
78713aed9e Fix 3419077: implement new volume control in Settings.
Change-Id: Ia4b803315382d59ae231c26187afaceb69397952
2011-02-03 18:20:23 -08:00
Andy Stadler
13d62049f7 More CryptKeeper UI work.
* Implemented failure case.
* More pixel perfect
* Remove the animation
* Display the encroid on the blank screen
* Remove the back button.
* Fix portrait mode screens

Bug: 3384231
Bug: 3394103
Bug: 3388721
Bug: 3381450
Bug: 3406278
Bug: 3351832
Change-Id: Ib763c8b577198deb45255acc767bc6d5409efc0c
2011-01-31 19:21:37 -08:00
Andy Stadler
8dbcb888ec Improvements to enable encryption steps
* Don't crash when user has pattern lock
* Updated text for final confirmation screen
* Show power & battery level warning text
* Updated layout for both confirmation screens (cleaned up margins,
  removed hardcoded text sizes, made settings & confirm consistent).
* Added comments for translators to all cryptkeeper strings

Bug: 3383190
Bug: 3383292
Bug: 3405707
Change-Id: I1adcdd963a549eb6541662ff941d245db5563710
2011-01-30 16:25:38 -08:00
Justin Ho
6db0f05a8d Deprecating old Settings icon completely
Updating to new Settings launcher icon
Bug: 3362749

Change-Id: I4d33650b68aac3aa9ddd56d2acab614f80266840
2011-01-29 13:19:05 -08:00
Daisuke Miyakawa
7893447987 Enlarge texts and fit the other elements
Basically set text size to 18sp and change layouts
along with the new design.

- Add custom list item xml for Wi-Fi security field
  rename existing "custom_list_item.xml" to appropriate
  name so that we won't be confused with their naming.
- Use the custom xml just in SetupWizard.

Bug: 3364731
Change-Id: I014903277a03c359ea193dd0f0a37c84ade19fa1
2011-01-28 14:22:48 -08:00
Jake Hamby
3d1fd57e30 Increase size of BT profile icons and decrease alpha for inactive profiles
Increase the size of the Bluetooth profile icons from 20dp to 30dp.
Decrease the alpha for disabled profile icons to 50% of theme default.

Bug: 3400851
Change-Id: Ieb5ecb01ccbd7185d383828e0d9c9f78525ee0c4
2011-01-27 18:33:17 -08:00
Amith Yamasani
03b58dff82 Use expander assets for bluetooth profile preference.
Also adjust some padding and set correct highlight background.

Bug: 3383060
Change-Id: I5a4abe98c49efd156523085418958b69df6c8d85
2011-01-25 17:20:43 -08:00
Jason parks
af6d7cf23c Merge "More UI tweaks." into honeycomb 2011-01-25 06:39:06 -08:00
Jason parks
f1dbf55819 More UI tweaks.
* Grab a full wakelock while encrypting.
* Fix a bug with failed attempts.
* Add a custom theme to animate the screen to black.
* Fix the keyboard to be displayed properly in landscape and portrait.

Change-Id: Icc2d813ce1780588eb3b16f5204c3c60cae5236f
2011-01-25 08:38:17 -06:00
Amith Yamasani
48e031c710 Merge "Tabletize Device administrator screen and fix the layout for DeviceAdminAdd." into honeycomb 2011-01-24 20:43:05 -08:00
Amith Yamasani
a1d0184166 Tabletize Device administrator screen and fix the layout for DeviceAdminAdd.
Bug: 3376986

Convert the DeviceAdminSettings screen to a fragment, remove fat titlebar.
Convert the DeviceAdminAdd screen to layout nicely in the new holo DialogWhenLarge
style.

Change-Id: I20a9d16aed135a2178969dfff807075b0b79237c
2011-01-24 16:24:55 -08:00
Justin Ho
146249ad93 Updating Bluetooth preference page to use different configuration icon
Change-Id: Ie5bf105e5522fb2a876c51c9407f02f2a3974631
2011-01-24 09:41:57 -08:00
Jim Miller
3752ef7847 Fix 3315488: Wrap OwnerInfo layout in a ScrollView
Change-Id: I5fc5a66c1a09ff4e45137469fee1b6de6b45c7a0
2011-01-23 18:14:13 -08:00
Jason parks
43775c7f9b Merge "More work on the CryptKeeper." into honeycomb 2011-01-20 15:58:02 -08:00
Chia-chi Yeh
91d65a20af Extract credential storage dialogs to a new activity.
Since now SecuritySettings is a fragment, not an activity, reacting
to intents is not easier anymore. The new activity is transparent,
and it works just like a dialog. This change also refactor'ed
SecuritySettings by moving some preference construction into
security_settings_misc.xml.

Bug: 3120992
Bug: 2117436
Change-Id: I8bd3fc7faa2a31d100b8d67310f9266260cfc31d
2011-01-20 19:45:04 +08:00
Daisuke Miyakawa
a30013fad4 UI fix for wifi setup in xl
- Show "connecting" and "connected" text
- Modify layout for "Add network"

Bug: 3347865
Change-Id: I9c9b33b9033e7fb4f885717f00507c1360400725
2011-01-18 20:29:47 -08:00
Kenny Root
3785e390d2 Don't show separate option for erasing USB storage
On devices with emulated USB storage or SD card, factory reset will wipe
all data from that area. Given that, it doesn't make sense to show a
different option for wiping USB storage.

Bug: 3242568
Change-Id: I257bdde06141f14381c8c09ce6a42c18d7080efd
2011-01-18 15:14:32 -08:00
Jason parks
ec5a45e79c More work on the CryptKeeper.
* There is now a 30 seconds delay after 10 failed password attempts.
* The device is factory reset after 30 failed password attempts.
* Implemented the progress UI for inplace encryption.

Change-Id: Ie830b03f9c84a117ee3048086275d6049907fa3c
2011-01-18 15:28:53 -06:00
Daisuke Miyakawa
18d6fe1a3d Widen default password field length in Wifi setup
Current password field doesn't show 26 characters which is
usual in some wifi devices.

Change-Id: Ifaf40f9174346451ae49f5f2ab0368326d7a9906
2011-01-18 10:06:31 -08:00