diff options
author | Christopher Tate <ctate@google.com> | 2009-06-26 11:49:18 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2009-06-26 12:20:10 -0700 |
commit | 8a27f923eb9dbbe3c2d0184e82d9f1a98f1e4cdc (patch) | |
tree | 785242d6c32e7b9bd30c353444c7de452209304c /services/java/com/android/server | |
parent | c73a218c2663e6ae3ec8a9ab8b9524f95702ade9 (diff) | |
download | frameworks_base-8a27f923eb9dbbe3c2d0184e82d9f1a98f1e4cdc.zip frameworks_base-8a27f923eb9dbbe3c2d0184e82d9f1a98f1e4cdc.tar.gz frameworks_base-8a27f923eb9dbbe3c2d0184e82d9f1a98f1e4cdc.tar.bz2 |
Don't crash in various ways when using backup services too early
BackupManager now no longer tries to use a null service binder if it's used
early during the boot process. ActivityManagerService no longer tries to
dereference null pointers if bind/unbind semantics get out of step due to things
being run too early.
Diffstat (limited to 'services/java/com/android/server')
-rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index fd1dfc8..6d04b6b 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -10472,8 +10472,17 @@ public final class ActivityManagerService extends ActivityManagerNative implemen // done with this agent public void unbindBackupAgent(ApplicationInfo appInfo) { if (DEBUG_BACKUP) Log.v(TAG, "unbindBackupAgent: " + appInfo); + if (appInfo == null) { + Log.w(TAG, "unbind backup agent for null app"); + return; + } synchronized(this) { + if (mBackupAppName == null) { + Log.w(TAG, "Unbinding backup agent with no active backup"); + return; + } + if (!mBackupAppName.equals(appInfo.packageName)) { Log.e(TAG, "Unbind of " + appInfo + " but is not the current backup target"); return; |