From 9708669b2fe8ae6aae4274d78d712c276b6fad40 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 8 Jan 2015 14:00:13 -0800 Subject: Guard against MountService throwing NPE. Fall through to below logic and return null instead of crashing the entire app. We already tell developers the value may be null. Bug: 17781998 Change-Id: I05dce90ae6bc547d74f8c16d30b3dc7888a937fe --- core/java/android/app/ContextImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index 2df35df2009d..2ef046d8e1fa 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -2419,7 +2419,7 @@ class ContextImpl extends Context { int res = -1; try { res = mount.mkdirs(getPackageName(), dir.getAbsolutePath()); - } catch (RemoteException e) { + } catch (Exception ignored) { } if (res != 0) { Log.w(TAG, "Failed to ensure directory: " + dir); -- cgit v1.2.3-59-g8ed1b