summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2011-05-26 09:30:26 -0700
committerBrian Carlstrom <bdc@google.com>2011-05-26 09:30:26 -0700
commit2a85883088558f87a0eb4a88bd5531401396f5b4 (patch)
treeb2c69a962bbbc9b1b7be5a33e0f1306685055c65 /src/com
parentbb04f703be50794c41e453e82c70e354a545ea54 (diff)
downloadandroid_packages_apps_KeyChain-2a85883088558f87a0eb4a88bd5531401396f5b4.tar.gz
android_packages_apps_KeyChain-2a85883088558f87a0eb4a88bd5531401396f5b4.tar.bz2
android_packages_apps_KeyChain-2a85883088558f87a0eb4a88bd5531401396f5b4.zip
Defend KeyChainActivity again callback exceptions.
Also remove some unnecessary throws in the KeyChainService Change-Id: I1779229957a2e700effca33e15cea2e71e73b281
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/keychain/KeyChainActivity.java5
-rw-r--r--src/com/android/keychain/KeyChainService.java10
2 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/keychain/KeyChainActivity.java b/src/com/android/keychain/KeyChainActivity.java
index 552a73a..aa60e41 100644
--- a/src/com/android/keychain/KeyChainActivity.java
+++ b/src/com/android/keychain/KeyChainActivity.java
@@ -143,7 +143,10 @@ public class KeyChainActivity extends ListActivity {
if (keyChainAliasResponse != null) {
try {
keyChainAliasResponse.alias(alias);
- } catch (RemoteException ignored) {
+ } catch (Exception ignored) {
+ // don't just catch RemoteException, caller could
+ // throw back a RuntimeException across processes
+ // which we should protect against.
}
}
finish();
diff --git a/src/com/android/keychain/KeyChainService.java b/src/com/android/keychain/KeyChainService.java
index 3b3d144..b02dfac 100644
--- a/src/com/android/keychain/KeyChainService.java
+++ b/src/com/android/keychain/KeyChainService.java
@@ -191,13 +191,13 @@ public class KeyChainService extends Service {
String accountType,
String authTokenType,
String[] requiredFeatures,
- Bundle options) throws NetworkErrorException {
+ Bundle options) {
return null;
}
@Override public Bundle confirmCredentials(AccountAuthenticatorResponse response,
Account account,
- Bundle options) throws NetworkErrorException {
+ Bundle options) {
return null;
}
@@ -207,7 +207,7 @@ public class KeyChainService extends Service {
@Override public Bundle getAuthToken(AccountAuthenticatorResponse response,
Account account,
String authTokenType,
- Bundle options) throws NetworkErrorException {
+ Bundle options) {
byte[] bytes = new byte[AUTHTOKEN_LENGTH];
mSecureRandom.nextBytes(bytes);
String authToken = Base64.encode(bytes, Charsets.US_ASCII);
@@ -227,13 +227,13 @@ public class KeyChainService extends Service {
@Override public Bundle updateCredentials(AccountAuthenticatorResponse response,
Account account,
String authTokenType,
- Bundle options) throws NetworkErrorException {
+ Bundle options) {
return null;
}
@Override public Bundle hasFeatures(AccountAuthenticatorResponse response,
Account account,
- String[] features) throws NetworkErrorException {
+ String[] features) {
return null;
}
};