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

Commit db71cc02 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

Remove some unused methods in BSI

BatteryStatsImpl has some recently added methods where formerly we used
A()
now we use
A(int elapsedTime)

Often those old A() calls are now unused and can be removed.

Test: compiles
Test: FrameworksCoreTests
Test: FrameworksServicesTests
Change-Id: I4cac7879db47811ed92455470a660a675db6a4c7
parent 92b3adcb
Loading
Loading
Loading
Loading
+1 −37
Original line number Diff line number Diff line
@@ -4014,7 +4014,7 @@ public class BatteryStatsImpl extends BatteryStats {
    /**
     * Schedules a read of the latest cpu times before removing the isolated UID.
     * @see #removeIsolatedUidLocked(int)
     * @see #removeIsolatedUidLocked(int, int, int)
     */
    public void scheduleRemoveIsolatedUidLocked(int isolatedUid, int appUid) {
        int curUid = mIsolatedUids.get(isolatedUid, -1);
@@ -4030,14 +4030,6 @@ public class BatteryStatsImpl extends BatteryStats {
     * @see #scheduleRemoveIsolatedUidLocked(int, int)
     */
    @GuardedBy("this")
    public void removeIsolatedUidLocked(int isolatedUid) {
        removeIsolatedUidLocked(isolatedUid, mClocks.elapsedRealtime(), mClocks.uptimeMillis());
    }
    /**
     * @see #removeIsolatedUidLocked(int)
     */
    @GuardedBy("this")
    public void removeIsolatedUidLocked(int isolatedUid, long elapsedRealtimeMs, long uptimeMs) {
        final int idx = mIsolatedUids.indexOfKey(isolatedUid);
        if (idx >= 0) {
@@ -11429,13 +11421,6 @@ public class BatteryStatsImpl extends BatteryStats {
     * Distribute WiFi energy info and network traffic to apps.
     * @param info The energy information from the WiFi controller.
     */
    public void updateWifiState(@Nullable final WifiActivityEnergyInfo info) {
        updateWifiState(info, mClocks.elapsedRealtime(), mClocks.uptimeMillis());
    }
    /**
     * @see #updateWifiState(WifiActivityEnergyInfo)
     */
    public void updateWifiState(@Nullable final WifiActivityEnergyInfo info,
            long elapsedRealtimeMs, long uptimeMs) {
        if (DEBUG_ENERGY) {
@@ -11714,13 +11699,6 @@ public class BatteryStatsImpl extends BatteryStats {
    /**
     * Distribute Cell radio energy info and network traffic to apps.
     */
    public void updateMobileRadioState(@Nullable final ModemActivityInfo activityInfo) {
        updateMobileRadioState(activityInfo, mClocks.elapsedRealtime(), mClocks.uptimeMillis());
    }
    /**
     * @see #updateMobileRadioState(ModemActivityInfo)
     */
    public void updateMobileRadioState(@Nullable final ModemActivityInfo activityInfo,
            long elapsedRealtimeMs, long uptimeMs) {
        if (DEBUG_ENERGY) {
@@ -11954,13 +11932,6 @@ public class BatteryStatsImpl extends BatteryStats {
     *
     * @param info The energy information from the bluetooth controller.
     */
    public void updateBluetoothStateLocked(@Nullable final BluetoothActivityEnergyInfo info) {
        updateBluetoothStateLocked(info, mClocks.elapsedRealtime(), mClocks.uptimeMillis());
    }
    /**
     * @see #updateBluetoothStateLocked(BluetoothActivityEnergyInfo)
     */
    public void updateBluetoothStateLocked(@Nullable final BluetoothActivityEnergyInfo info,
            long elapsedRealtimeMs, long uptimeMs) {
        if (DEBUG_ENERGY) {
@@ -12138,13 +12109,6 @@ public class BatteryStatsImpl extends BatteryStats {
     * If RPM stats were fetched more recently than RPM_STATS_UPDATE_FREQ_MS ago, uses the old data
     * instead of fetching it anew.
     */
    public void updateRpmStatsLocked() {
        updateRpmStatsLocked(mClocks.elapsedRealtime() * 1000);
    }
    /**
     * @see #updateRpmStatsLocked()
     */
    public void updateRpmStatsLocked(long elapsedRealtimeUs) {
        if (mPlatformIdleStateCallback == null) return;
        long now = SystemClock.elapsedRealtime();