diff options
author | Brian Carlstrom <bdc@google.com> | 2011-06-24 14:26:46 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2011-06-26 13:23:35 -0700 |
commit | 6d85fab73e2c0359968fc6580594689940f5dabc (patch) | |
tree | b922ed220cba25fc7f273c614c93fb5d6e9c938a /src | |
parent | f7b45bc4344aec44506ac0fa0a1517148ba8a2cb (diff) | |
download | packages_apps_Browser-6d85fab73e2c0359968fc6580594689940f5dabc.zip packages_apps_Browser-6d85fab73e2c0359968fc6580594689940f5dabc.tar.gz packages_apps_Browser-6d85fab73e2c0359968fc6580594689940f5dabc.tar.bz2 |
Replace KeyChainActivity placeholder UI with more polished dialog (2 of 5)
frameworks/base
Extended KeyChain.chooserPrivateKeyAlias to allow caller to supply
preferred choice to be selected in chooser. This allows Email
settings to highlight the current choice when allowing user to
change settings.
keystore/java/android/security/KeyChain.java
api/current.txt
Implemented KeyChain functionality to pass host and port
information to KeyChainActivity for display.
keystore/java/android/security/KeyChain.java
KeyChain now sends a PendingIntent as part of the Intent it sends
to the KeyChainActivity which can be used to identify the caller
in reliable way.
keystore/java/android/security/KeyChain.java
Moved .pfx/.p12/.cer/.crt constants to Credentials for reuse.
Added Credentials.install variant with no value for use from KeyChainActivity
keystore/java/android/security/Credentials.java
packages/apps/CertInstaller
Source of extension constants now in Credentials
src/com/android/certinstaller/CertFile.java
packages/apps/Browser
Have browser supply host and port information to KeyChain.choosePrivateKeyAlias
Tracking KeyChain.choosePrivateKeyAlias API change
src/com/android/browser/Tab.java
packages/apps/Email
Tracking KeyChain.choosePrivateKeyAlias API change
src/com/android/email/view/CertificateSelector.java
packages/apps/KeyChain
KeyChain now depends on bouncycastle X509Name for formatting
X500Principals, since the 4 X500Principal formatting options could
not format emailAddress attributes in a human readable way and its
the most important attribute to display for client certificates in
most cases.
Android.mk
Changing the UI to a dialog, make the activity style transparent.
AndroidManifest.xml
res/values/styles.xml
Layout for chooser dialog
res/layout/cert_chooser.xml
Layout for list items in chooser
res/layout/cert_item.xml
New resources for dialog including comments for translators.
res/values/strings.xml
New dialog based KeyChainActivity. Now also shows requesting app
and requesting server. Now can preselect a specified alias. New
link directly to CertInstaller.
src/com/android/keychain/KeyChainActivity.java
Fix KeyChainTestActivity to work with TestKeyStore changes that
were causing network activity on the UI to look up the name of
localhost. Also track KeyChain.choosePrivateKeyAlias API change.
tests/src/com/android/keychain/tests/KeyChainTestActivity.java
Change-Id: I3a5c45bfec05b16d4d9b7e0d6bb4220be5159fe7
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/Tab.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index bc5868f..c78b562 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -799,6 +799,22 @@ class Tab { handler.ignore(); return; } + int colon = host_and_port.lastIndexOf(':'); + String host; + int port; + if (colon == -1) { + host = host_and_port; + port = -1; + } else { + String portString = host_and_port.substring(colon + 1); + try { + port = Integer.parseInt(portString); + host = host_and_port.substring(0, colon); + } catch (NumberFormatException e) { + host = host_and_port; + port = -1; + } + } KeyChain.choosePrivateKeyAlias(mActivity, new KeyChainAliasCallback() { @Override public void alias(String alias) { if (alias == null) { @@ -807,7 +823,7 @@ class Tab { } new KeyChainLookup(mActivity, handler, alias).execute(); } - }, null, null, null, -1); + }, null, null, host, port, null); } /** |