Track down Contexts without data directories.
Data directories for all packages should be created and managed by installd; if we create a Context and the data directory doesn't exist yet, we're in trouble, since a later mkdirs() would end up creating the directory with incorrect permissions, mode, and SELinux labels. Bug: 28272737 Change-Id: Ie3bb884ab07748719378de5c792046a031a3f945
This commit is contained in:
@@ -1958,6 +1958,10 @@ class ContextImpl extends Context {
|
||||
}
|
||||
|
||||
if (res != null) {
|
||||
if (!res.exists()) {
|
||||
Log.wtf(TAG, "Data directory doesn't exist for package " + getPackageName(),
|
||||
new Throwable());
|
||||
}
|
||||
return res;
|
||||
} else {
|
||||
throw new RuntimeException(
|
||||
|
||||
Reference in New Issue
Block a user