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

Commit c7755236 authored by Chih-Yu Huang's avatar Chih-Yu Huang
Browse files

Remove unused ProcessStateRecord#mHasProcStateChanged field

The `mHasProcStateChanged` field in `ProcessStateRecord` and its
corresponding setter/getter methods are no longer in use. This patch
removes the field and all references to it to clean up the code.

Bug: 425766486
Test: m services.core
Test: atest MockingOomAdjusterTests OomAdjusterTests
Test: FrameworksServicesTestsRavenwood_ProcessStateController
Flag: EXEMPT pure refactor

Change-Id: Ib300a16a89844cb86dee47e035468bfb2e83165f
parent 2728f4e6
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1403,9 +1403,6 @@ public class AppProfiler {
                    final ProcessProfileRecord profile = app.mProfile;
                    final IApplicationThread thread;
                    final ProcessStateRecord state = app.mState;
                    if (state.getHasProcStateChanged()) {
                        state.setHasProcStateChanged(false);
                    }
                    int procState = app.mState.getCurProcState();
                    if (((procState >= ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND
                                            && procState
+0 −2
Original line number Diff line number Diff line
@@ -2257,8 +2257,6 @@ public abstract class OomAdjuster {
                    mService.setProcessTrackerStateLOSP(app,
                            mService.mProcessStats.getMemFactorLocked());
                }
            } else {
                state.setHasProcStateChanged(true);
            }
        } else if (state.getHasReportedInteraction()) {
            final boolean fgsInteractionChangeEnabled = state.getCachedCompatChange(
+0 −16
Original line number Diff line number Diff line
@@ -391,12 +391,6 @@ public final class ProcessStateRecord {
    @GuardedBy("mServiceLock")
    private boolean mRunningRemoteAnimation;

    /**
     * Keep track of whether we changed 'mSetAdj'.
     */
    @CompositeRWLock({"mServiceLock", "mProcLock"})
    private boolean mHasProcStateChanged;

    /**
     * Whether we have told usage stats about it being an interaction.
     */
@@ -968,16 +962,6 @@ public final class ProcessStateRecord {
        mRunningRemoteAnimation = runningRemoteAnimation;
    }

    @GuardedBy({"mServiceLock", "mProcLock"})
    public void setHasProcStateChanged(boolean hasProcStateChanged) {
        mHasProcStateChanged = hasProcStateChanged;
    }

    @GuardedBy(anyOf = {"mServiceLock", "mProcLock"})
    public boolean getHasProcStateChanged() {
        return mHasProcStateChanged;
    }

    @GuardedBy({"mServiceLock", "mProcLock"})
    public void setHasReportedInteraction(boolean hasReportedInteraction) {
        mHasReportedInteraction = hasReportedInteraction;