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

Commit bfb86ae9 authored by David Stevens's avatar David Stevens
Browse files

Clean up dead code from activity manager

Remove mHasPreviousProcess and mHasHomeProcess. These were only used by
the legacy trim code in AppProfiler, which was removed by ag/26563712.

Bug: 253914117
Test: build
Flag: EXEMPT refactor
Change-Id: Ib4dbc0d0ff68caad5f38a41eb669ba27f39db74d
parent 1706fcfe
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -301,12 +301,6 @@ public class AppProfiler {
    @GuardedBy("mProfilerLock")
    private boolean mMemWatchIsUserInitiated;

    @GuardedBy("mService")
    boolean mHasHomeProcess;

    @GuardedBy("mService")
    boolean mHasPreviousProcess;

    /**
     * Used to collect per-process CPU use for ANRs, battery stats, etc.
     * Must acquire this object's lock when accessing it.
+0 −1
Original line number Diff line number Diff line
@@ -896,7 +896,6 @@ public class OomAdjusterImpl extends OomAdjuster {
        mProcessStateCurTop = mService.mAtmInternal.getTopProcessState();
        // Clear any pending ones because we are doing a full update now.
        mPendingProcessSet.clear();
        mService.mAppProfiler.mHasPreviousProcess = mService.mAppProfiler.mHasHomeProcess = false;

        mLastReason = oomAdjReason;
        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, oomAdjReasonToString(oomAdjReason));
+0 −2
Original line number Diff line number Diff line
@@ -1046,7 +1046,6 @@ final class ProcessStateRecord {
        if (mCachedIsHomeProcess == VALUE_INVALID) {
            if (mApp.getWindowProcessController().isHomeProcess()) {
                mCachedIsHomeProcess = VALUE_TRUE;
                mService.mAppProfiler.mHasHomeProcess = true;
            } else {
                mCachedIsHomeProcess = VALUE_FALSE;
            }
@@ -1059,7 +1058,6 @@ final class ProcessStateRecord {
        if (mCachedIsPreviousProcess == VALUE_INVALID) {
            if (mApp.getWindowProcessController().isPreviousProcess()) {
                mCachedIsPreviousProcess = VALUE_TRUE;
                mService.mAppProfiler.mHasPreviousProcess = true;
            } else {
                mCachedIsPreviousProcess = VALUE_FALSE;
            }