Merge "oomAdjuster: Change default demotion of renderthreads to default graphics priority" into qt-r1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1ea0c70db1
@@ -34,6 +34,7 @@ import static android.os.Process.THREAD_GROUP_BG_NONINTERACTIVE;
|
|||||||
import static android.os.Process.THREAD_GROUP_DEFAULT;
|
import static android.os.Process.THREAD_GROUP_DEFAULT;
|
||||||
import static android.os.Process.THREAD_GROUP_RESTRICTED;
|
import static android.os.Process.THREAD_GROUP_RESTRICTED;
|
||||||
import static android.os.Process.THREAD_GROUP_TOP_APP;
|
import static android.os.Process.THREAD_GROUP_TOP_APP;
|
||||||
|
import static android.os.Process.THREAD_PRIORITY_DISPLAY;
|
||||||
import static android.os.Process.setProcessGroup;
|
import static android.os.Process.setProcessGroup;
|
||||||
import static android.os.Process.setThreadPriority;
|
import static android.os.Process.setThreadPriority;
|
||||||
import static android.os.Process.setThreadScheduler;
|
import static android.os.Process.setThreadScheduler;
|
||||||
@@ -1803,7 +1804,6 @@ public final class OomAdjuster {
|
|||||||
if (app.renderThreadTid != 0) {
|
if (app.renderThreadTid != 0) {
|
||||||
setThreadScheduler(app.renderThreadTid,
|
setThreadScheduler(app.renderThreadTid,
|
||||||
SCHED_OTHER, 0);
|
SCHED_OTHER, 0);
|
||||||
setThreadPriority(app.renderThreadTid, -4);
|
|
||||||
}
|
}
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
Slog.w(TAG,
|
Slog.w(TAG,
|
||||||
@@ -1815,9 +1815,10 @@ public final class OomAdjuster {
|
|||||||
} else {
|
} else {
|
||||||
// Reset priority for top app UI and render threads
|
// Reset priority for top app UI and render threads
|
||||||
setThreadPriority(app.pid, 0);
|
setThreadPriority(app.pid, 0);
|
||||||
if (app.renderThreadTid != 0) {
|
}
|
||||||
setThreadPriority(app.renderThreadTid, 0);
|
|
||||||
}
|
if (app.renderThreadTid != 0) {
|
||||||
|
setThreadPriority(app.renderThreadTid, THREAD_PRIORITY_DISPLAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user