summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Quintana <fredq@google.com>2011-10-24 20:39:44 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-24 20:39:44 -0700
commit2536b1d627c0296531a91dc519ee8d84ed505291 (patch)
treeaf707b2bb51005063b800c0a717091226736332b
parent1c1438b9f366d2a61db45abf9f25613c886819bd (diff)
parent763480fbcabedfc2f425484ed74bc1e2e1392176 (diff)
downloadframeworks_base-2536b1d627c0296531a91dc519ee8d84ed505291.zip
frameworks_base-2536b1d627c0296531a91dc519ee8d84ed505291.tar.gz
frameworks_base-2536b1d627c0296531a91dc519ee8d84ed505291.tar.bz2
am 763480fb: Merge "Fixed a bug that causes AccountManager calls to hang forever, eventually exhausting the binder threads in the gapps process, making it unusable." into ics-mr0
* commit '763480fbcabedfc2f425484ed74bc1e2e1392176': Fixed a bug that causes AccountManager calls to hang forever, eventually exhausting the binder threads in the gapps process, making it unusable.
-rw-r--r--core/java/android/accounts/AccountManagerService.java24
1 files changed, 19 insertions, 5 deletions
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index 1ba8eee..4f3405b 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -499,7 +499,7 @@ public class AccountManagerService
if (response != null) {
try {
if (result == null) {
- onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, "null bundle");
+ response.onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, "null bundle");
return;
}
if (Log.isLoggable(TAG, Log.VERBOSE)) {
@@ -1541,8 +1541,15 @@ public class AccountManagerService
mAuthenticator = null;
IAccountManagerResponse response = getResponseAndClose();
if (response != null) {
- onError(AccountManager.ERROR_CODE_REMOTE_EXCEPTION,
- "disconnected");
+ try {
+ response.onError(AccountManager.ERROR_CODE_REMOTE_EXCEPTION,
+ "disconnected");
+ } catch (RemoteException e) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "Session.onServiceDisconnected: "
+ + "caught RemoteException while responding", e);
+ }
+ }
}
}
@@ -1551,8 +1558,15 @@ public class AccountManagerService
public void onTimedOut() {
IAccountManagerResponse response = getResponseAndClose();
if (response != null) {
- onError(AccountManager.ERROR_CODE_REMOTE_EXCEPTION,
- "timeout");
+ try {
+ response.onError(AccountManager.ERROR_CODE_REMOTE_EXCEPTION,
+ "timeout");
+ } catch (RemoteException e) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "Session.onTimedOut: caught RemoteException while responding",
+ e);
+ }
+ }
}
}