summaryrefslogtreecommitdiffstats
path: root/test-runner
diff options
context:
space:
mode:
authorCynthia Wong <cynthiaw@google.com>2009-09-03 10:06:55 -0700
committerCynthia Wong <cynthiaw@google.com>2009-09-03 10:06:55 -0700
commit904de61465abff8dba6fcc768d6bf5586f86ed0f (patch)
treeea64e3f181c5c8f968c1fdbd3f1de5a7e0ff53fb /test-runner
parentea6fca8231c94064917e40dea23be8df50930cf9 (diff)
downloadframeworks_base-904de61465abff8dba6fcc768d6bf5586f86ed0f.zip
frameworks_base-904de61465abff8dba6fcc768d6bf5586f86ed0f.tar.gz
frameworks_base-904de61465abff8dba6fcc768d6bf5586f86ed0f.tar.bz2
Override getAccounts to return an empty AccountSet in MockAccountManager. This used to throw an NPE instead since IAccountManagerService is set to NULL.
Diffstat (limited to 'test-runner')
-rw-r--r--test-runner/android/test/IsolatedContext.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/test-runner/android/test/IsolatedContext.java b/test-runner/android/test/IsolatedContext.java
index 4bd9528..5c66169 100644
--- a/test-runner/android/test/IsolatedContext.java
+++ b/test-runner/android/test/IsolatedContext.java
@@ -4,6 +4,7 @@ import com.google.android.collect.Lists;
import android.accounts.AccountManager;
import android.accounts.OnAccountsUpdatedListener;
+import android.accounts.Account;
import android.content.ContextWrapper;
import android.content.ContentResolver;
import android.content.Intent;
@@ -101,6 +102,10 @@ public class IsolatedContext extends ContextWrapper {
Handler handler, boolean updateImmediately) {
// do nothing
}
+
+ public Account[] getAccounts() {
+ return new Account[]{};
+ }
}
@Override
public File getFilesDir() {