Loading services/core/java/com/android/server/power/hint/HintManagerService.java +11 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static android.os.Flags.adpfUseFmqChannel; import static com.android.internal.util.ConcurrentUtils.DIRECT_EXECUTOR; import static com.android.server.power.hint.Flags.adpfSessionTag; import static com.android.server.power.hint.Flags.powerhintThreadCleanup; import static com.android.server.power.hint.Flags.resetOnForkEnabled; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -1057,6 +1058,11 @@ public final class HintManagerService extends SystemService { Slogf.w(TAG, errMsg); throw new SecurityException(errMsg); } if (resetOnForkEnabled()){ for (int tid : tids) { Process.setThreadScheduler(tid, Process.SCHED_RESET_ON_FORK, 0); } } if (adpfSessionTag() && tag == SessionTag.APP) { // If the category of the app is a game, Loading Loading @@ -1447,6 +1453,11 @@ public final class HintManagerService extends SystemService { Slogf.w(TAG, errMsg); throw new SecurityException(errMsg); } if (resetOnForkEnabled()){ for (int tid : tids) { Process.setThreadScheduler(tid, Process.SCHED_RESET_ON_FORK, 0); } } if (powerhintThreadCleanup()) { synchronized (mNonIsolatedTidsLock) { for (int i = nonIsolated.size() - 1; i >= 0; i--) { Loading services/core/java/com/android/server/power/hint/flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -14,3 +14,10 @@ flag { description: "Feature flag for adding session tag to hint session atom" bug: "345011125" } flag { name: "reset_on_fork_enabled" namespace: "game" description: "Set reset_on_fork flag." bug: "370988407" } Loading
services/core/java/com/android/server/power/hint/HintManagerService.java +11 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static android.os.Flags.adpfUseFmqChannel; import static com.android.internal.util.ConcurrentUtils.DIRECT_EXECUTOR; import static com.android.server.power.hint.Flags.adpfSessionTag; import static com.android.server.power.hint.Flags.powerhintThreadCleanup; import static com.android.server.power.hint.Flags.resetOnForkEnabled; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -1057,6 +1058,11 @@ public final class HintManagerService extends SystemService { Slogf.w(TAG, errMsg); throw new SecurityException(errMsg); } if (resetOnForkEnabled()){ for (int tid : tids) { Process.setThreadScheduler(tid, Process.SCHED_RESET_ON_FORK, 0); } } if (adpfSessionTag() && tag == SessionTag.APP) { // If the category of the app is a game, Loading Loading @@ -1447,6 +1453,11 @@ public final class HintManagerService extends SystemService { Slogf.w(TAG, errMsg); throw new SecurityException(errMsg); } if (resetOnForkEnabled()){ for (int tid : tids) { Process.setThreadScheduler(tid, Process.SCHED_RESET_ON_FORK, 0); } } if (powerhintThreadCleanup()) { synchronized (mNonIsolatedTidsLock) { for (int i = nonIsolated.size() - 1; i >= 0; i--) { Loading
services/core/java/com/android/server/power/hint/flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -14,3 +14,10 @@ flag { description: "Feature flag for adding session tag to hint session atom" bug: "345011125" } flag { name: "reset_on_fork_enabled" namespace: "game" description: "Set reset_on_fork flag." bug: "370988407" }