summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-11-08 11:01:41 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-11-08 11:01:41 -0800
commit5b59e02eb542f016866985945859b033e94f9f0b (patch)
treeb9efb747263d813bc9d9798b85dd90d4464e6784 /core
parent51387974f0914a12dcf758938bbd4ffe120bdab4 (diff)
parentec062f63a2f5fb49f825544da348e594dbf5bf3c (diff)
downloadframeworks_base-5b59e02eb542f016866985945859b033e94f9f0b.zip
frameworks_base-5b59e02eb542f016866985945859b033e94f9f0b.tar.gz
frameworks_base-5b59e02eb542f016866985945859b033e94f9f0b.tar.bz2
Merge "StrictMode: now in more system server threads."
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/ContextImpl.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 5ce4cd6..ba301e9 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -1182,6 +1182,13 @@ class ContextImpl extends Context {
/* package */ static DropBoxManager createDropBoxManager() {
IBinder b = ServiceManager.getService(DROPBOX_SERVICE);
IDropBoxManagerService service = IDropBoxManagerService.Stub.asInterface(b);
+ if (service == null) {
+ // Don't return a DropBoxManager that will NPE upon use.
+ // This also avoids caching a broken DropBoxManager in
+ // getDropBoxManager during early boot, before the
+ // DROPBOX_SERVICE is registered.
+ return null;
+ }
return new DropBoxManager(service);
}