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

Commit c7d4a824 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Remove flag com.android.server.power.optimization.oneway_battery_stats_service

Bug: 410713436
Test: presubmit
Flag: EXEMPT removing com.android.server.power.optimization.oneway_battery_stats_service
Change-Id: I5eeecfd1fac02b42ee8218aec99f0c9e75fd49e8
parent 004451be
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ import android.util.Pair;
import android.util.Slog;

import com.android.internal.app.IBatteryStats;
import com.android.server.power.optimization.Flags;

import java.util.Arrays;
import java.util.Comparator;
@@ -385,14 +384,6 @@ public class SystemHealthManager {
     * @see Process#myUid() Process.myUid()
     */
    public HealthStats takeUidSnapshot(int uid) {
        if (!Flags.onewayBatteryStatsService()) {
            try {
                final HealthStatsParceler parceler = mBatteryStats.takeUidSnapshot(uid);
                return parceler.getHealthStats();
            } catch (RemoteException ex) {
                throw ex.rethrowFromSystemServer();
            }
        }
        final HealthStats[] result = takeUidSnapshots(new int[]{uid});
        if (result != null && result.length >= 1) {
            return result[0];
@@ -425,20 +416,6 @@ public class SystemHealthManager {
     * other than its own.
     */
    public HealthStats[] takeUidSnapshots(int[] uids) {
        if (!Flags.onewayBatteryStatsService()) {
            try {
                final HealthStatsParceler[] parcelers = mBatteryStats.takeUidSnapshots(uids);
                final int count = uids.length;
                final HealthStats[] results = new HealthStats[count];
                for (int i = 0; i < count; i++) {
                    results[i] = parcelers[i].getHealthStats();
                }
                return results;
            } catch (RemoteException ex) {
                throw ex.rethrowFromSystemServer();
            }
        }

        SynchronousResultReceiver resultReceiver;
        synchronized (mPendingUidSnapshots) {
            if (Arrays.equals(mPendingUidSnapshots.uids, uids)) {
+0 −10
Original line number Diff line number Diff line
@@ -17,16 +17,6 @@ flag {
    is_exported: true
}

flag {
    name: "oneway_battery_stats_service"
    namespace: "backstage_power"
    description: "Bugfix flag for locking issues and watchdog kills in BatteryStatsService"
    bug: "330792526"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "add_battery_usage_stats_slice_atom"
    namespace: "backstage_power"