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

Commit be679b68 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Clean up BatteryAppListPreferenceController"

parents 386eac8b 7a307685
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ public class AppBatteryPreferenceController extends BasePreferenceController
        if (isBatteryStatsAvailable()) {
            final UserManager userManager =
                    (UserManager) mContext.getSystemService(Context.USER_SERVICE);
            final BatteryEntry entry = new BatteryEntry(mContext, /* handler */null, userManager,
            final BatteryEntry entry = new BatteryEntry(mContext, userManager,
                    mUidBatteryConsumer, /* isHidden */ false,
                    mUidBatteryConsumer.getUid(), /* packages */ null, mPackageName);
            Log.i(TAG, "Battery consumer available, launch : "
+0 −19
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.BatteryConsumer;
import android.os.BatteryStats;
import android.os.BatteryStatsManager;
import android.os.BatteryUsageStats;
@@ -200,24 +199,6 @@ public class BatteryUtils {
                : uid < 0 || isHiddenSystemModule(packages);
    }

    /**
     * Returns true if the specified device power component should be excluded from the summary
     * battery consumption list.
     */
    public boolean shouldHideDevicePowerComponent(BatteryConsumer consumer,
            @BatteryConsumer.PowerComponent int powerComponentId) {
        switch (powerComponentId) {
            case BatteryConsumer.POWER_COMPONENT_IDLE:
            case BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO:
            case BatteryConsumer.POWER_COMPONENT_SCREEN:
            case BatteryConsumer.POWER_COMPONENT_BLUETOOTH:
            case BatteryConsumer.POWER_COMPONENT_WIFI:
                return true;
            default:
                return false;
        }
    }

    /**
     * Returns true if one the specified packages belongs to a hidden system module.
     */
+0 −549

File deleted.

Preview size limit exceeded, changes collapsed.

+2 −4

File changed.

Preview size limit exceeded, changes collapsed.

+6 −89

File changed.

Preview size limit exceeded, changes collapsed.

Loading