Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d101264 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Update Expedited jobs to use IMP_FG proc_state.

Removing BIND_FOREGROUND_SERVICE while binding to the job service
which would otherwise elevate it to BFGS proc_state.

Bug: 177641226
Test: atest CtsJobSchedulerTestCases
Test: atest CtsHostsideNetworkTests:HostsideRestrictBackgroundNetworkTests
Change-Id: I51756d0c22e141b8d6f0bd91784da6fd87a69168
parent 200967d1
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -260,11 +260,9 @@ public final class JobServiceContext implements ServiceConnection {
            try {
                final int bindFlags;
                if (job.shouldTreatAsExpeditedJob()) {
                    // Add BIND_FOREGROUND_SERVICE to make it BFGS. Without it, it'll be
                    // PROCESS_STATE_IMPORTANT_FOREGROUND. Unclear which is better here.
                    // TODO(171305774): The job should run on the little cores. We'll probably need
                    // another binding flag for that.
                    bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE;
                    bindFlags = Context.BIND_AUTO_CREATE;
                } else {
                    bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
                            | Context.BIND_NOT_PERCEPTIBLE;