Merge "ActivityManagerService: delete unnecessary mkdir"
This commit is contained in:
@@ -4789,15 +4789,6 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
|
||||
File tracesFile = new File(tracesPath);
|
||||
try {
|
||||
File tracesDir = tracesFile.getParentFile();
|
||||
if (!tracesDir.exists()) {
|
||||
tracesDir.mkdirs();
|
||||
if (!SELinux.restorecon(tracesDir)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
FileUtils.setPermissions(tracesDir.getPath(), 0775, -1, -1); // drwxrwxr-x
|
||||
|
||||
if (clearTraces && tracesFile.exists()) tracesFile.delete();
|
||||
tracesFile.createNewFile();
|
||||
FileUtils.setPermissions(tracesFile.getPath(), 0666, -1, -1); // -rw-rw-rw-
|
||||
@@ -4900,14 +4891,6 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
final File tracesDir = tracesFile.getParentFile();
|
||||
final File tracesTmp = new File(tracesDir, "__tmp__");
|
||||
try {
|
||||
if (!tracesDir.exists()) {
|
||||
tracesDir.mkdirs();
|
||||
if (!SELinux.restorecon(tracesDir.getPath())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
FileUtils.setPermissions(tracesDir.getPath(), 0775, -1, -1); // drwxrwxr-x
|
||||
|
||||
if (tracesFile.exists()) {
|
||||
tracesTmp.delete();
|
||||
tracesFile.renameTo(tracesTmp);
|
||||
|
||||
Reference in New Issue
Block a user