From 21f507274b880fd03b2ba981e90f801d2ff37fc9 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Wed, 27 Apr 2016 12:38:02 -0600 Subject: [PATCH] Only log when system UID finds missing data paths. We're really only interested in tracking down when the system UID tries touching missing data paths, since it's the only one with enough permissions to mkdirs() directly without going through installd. Without the guard added in this CL, we'd end up logging for direct boot aware apps that tried obtaining CE paths while locked, which is perfectly valid. Bug: 28272737 Change-Id: Id24f3160f61d8ad8047d5c551bc6a91c868bd301 --- 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 f2e59975e5f11..cf663a32a072f 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -1958,7 +1958,7 @@ class ContextImpl extends Context { } if (res != null) { - if (!res.exists()) { + if (!res.exists() && android.os.Process.myUid() == android.os.Process.SYSTEM_UID) { Log.wtf(TAG, "Data directory doesn't exist for package " + getPackageName(), new Throwable()); }