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

Commit 9c3010b7 authored by Sowmith Chityala's avatar Sowmith Chityala
Browse files

Add PreviousThermalThrottlingState to thermal throttling atom

Flag: EXEMPT Bug fix
Bug: 340949158
Test: tested manually on a device by logging previous state.
https://docs.google.com/document/d/18sWpDtdsdTY0Q4XZtdJ69xzKaMQzyZJny-X3egro9UU/edit?tab=t.0
Change-Id: I1207bc7d571acbc0e950983ae15030018656bbcb
parent 1e1fe450
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -471,6 +471,7 @@ public class StatsPullAtomService extends SystemService {
    // Whether or not to enable the new puller with pressure stall information.
    public static final boolean ENABLE_PRESSURE_STALL_INFORMATION_PULLER =
                addPressureStallInformationPuller();
    private static int mPreviousThermalThrottlingStatus = Temperature.THROTTLING_NONE;

    // Puller locks
    private final Object mDataBytesTransferLock = new Object();
@@ -5395,7 +5396,9 @@ public class StatsPullAtomService extends SystemService {
        @Override
        public void notifyThrottling(Temperature temp) {
            FrameworkStatsLog.write(FrameworkStatsLog.THERMAL_THROTTLING_SEVERITY_STATE_CHANGED,
                    temp.getType(), temp.getName(), (int) (temp.getValue() * 10), temp.getStatus());
                    temp.getType(), temp.getName(), (int) (temp.getValue() * 10),
                    temp.getStatus(), mPreviousThermalThrottlingStatus);
            mPreviousThermalThrottlingStatus = temp.getStatus();
        }
    }