Correctly set thread group to UiThread's thread.

Bug: 36683525
Test: Manual (booted and launched several apps.)
Change-Id: Iff65b306e302aa2aaa2321d3faf254414f9ce1e7
This commit is contained in:
Makoto Onuki
2017-03-28 11:39:32 -07:00
parent 609edbeb86
commit be7878db54

View File

@@ -31,8 +31,13 @@ public final class UiThread extends ServiceThread {
private UiThread() {
super("android.ui", Process.THREAD_PRIORITY_FOREGROUND, false /*allowIo*/);
}
@Override
public void run() {
// Make sure UiThread is in the fg stune boost group
Process.setThreadGroup(Process.myTid(), Process.THREAD_GROUP_TOP_APP);
super.run();
}
private static void ensureThreadLocked() {