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

Commit 7da51c46 authored by Varad Deshmukh's avatar Varad Deshmukh Committed by Gerrit - the friendly Code Review server
Browse files

Enable launch boost for app launches with existing activity records

Extend the launch boost feature for applications where the activity
record exists in the stack.
This allows the feature for non-cold first launches (apps that
were launched earlier but were killed by LMK/Activity Manager).

Change-Id: Idb79d946fe4a8cfbfb9ea24fdefba62bb3d2628e
parent e5bc3bc5
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -2744,6 +2744,19 @@ public final class ActivityStackSupervisor implements DisplayListener {
                }
                final ActivityRecord ar = stack.findTaskLocked(r);
                if (ar != null) {
                    /* Acquire perf lock during app launch for existing activity record. */
                    /* Acquire lock only in case app is killed/died. */
                    if(ar.state == ActivityState.DESTROYED ) {
                       if (mIsPerfBoostEnabled == true && mPerf == null) {
                           mPerf = new Performance();
                       }
                       if (mPerf != null) {
                           mPerf.perfLockAcquire(lBoostTimeOut, lBoostPcDisblBoost, lBoostSchedBoost,
                                                 lBoostCpuBoost, lBoostCpuNumBoost, lBoostKsmBoost,
                                                 lBoostSmTaskBoost, lBoostIdleLoadBoost,
                                                 lBoostIdleNrRunBoost, lBoostPreferIdle);
                       }
                    }
                    return ar;
                }
            }