Merge "ActivityManager: Allow DiskRead for wrap.sh determination" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f7d650e89a
@@ -3929,8 +3929,13 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
if ((app.info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
|
||||
// Debuggable apps may include a wrapper script with their library directory.
|
||||
String wrapperFileName = app.info.nativeLibraryDir + "/wrap.sh";
|
||||
if (new File(wrapperFileName).exists()) {
|
||||
invokeWith = "/system/bin/logwrapper " + wrapperFileName;
|
||||
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
|
||||
try {
|
||||
if (new File(wrapperFileName).exists()) {
|
||||
invokeWith = "/system/bin/logwrapper " + wrapperFileName;
|
||||
}
|
||||
} finally {
|
||||
StrictMode.setThreadPolicy(oldPolicy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user