Add log to explain why freezer is not supported
The old log is too vague to identify what's wrong with the cgroup freezer configuration. That makes debugging unnecessarily time consuming. Improve the log with more details. Bug: 269312428 Test: check logcat during Android boot Change-Id: I7c2518aef003cca990ed321e22890bddde2c5d13
This commit is contained in:
@@ -941,11 +941,14 @@ public final class CachedAppOptimizer {
|
||||
FileReader fr = null;
|
||||
|
||||
try {
|
||||
fr = new FileReader(getFreezerCheckPath());
|
||||
String path = getFreezerCheckPath();
|
||||
Slog.d(TAG_AM, "Checking cgroup freezer: " + path);
|
||||
fr = new FileReader(path);
|
||||
char state = (char) fr.read();
|
||||
|
||||
if (state == '1' || state == '0') {
|
||||
// Also check freezer binder ioctl
|
||||
Slog.d(TAG_AM, "Checking binder freezer ioctl");
|
||||
getBinderFreezeInfo(Process.myPid());
|
||||
supported = true;
|
||||
} else {
|
||||
@@ -967,6 +970,7 @@ public final class CachedAppOptimizer {
|
||||
}
|
||||
}
|
||||
|
||||
Slog.d(TAG_AM, "Freezer supported: " + supported);
|
||||
return supported;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user