Merge "Hide Wifi and Systemui in settings main page"

This commit is contained in:
TreeHugger Robot
2017-03-28 19:26:58 +00:00
committed by Android (Google) Code Review
4 changed files with 31 additions and 10 deletions

View File

@@ -27,8 +27,9 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
private static final String PACKAGE_CALENDAR_PROVIDER = "com.android.providers.calendar";
private static final String PACKAGE_MEDIA_PROVIDER = "com.android.providers.media";
private static final String PACKAGE_SYSTEMUI = "com.android.systemui";
private static final String[] PACKAGES_SYSTEM = {PACKAGE_MEDIA_PROVIDER,
PACKAGE_CALENDAR_PROVIDER};
PACKAGE_CALENDAR_PROVIDER, PACKAGE_SYSTEMUI};
protected PackageManager mPackageManager;

View File

@@ -594,8 +594,11 @@ public class PowerUsageSummary extends PowerUsageBase {
boolean shouldHideSipper(BatterySipper sipper) {
final DrainType drainType = sipper.drainType;
return drainType == DrainType.IDLE || drainType == DrainType.CELL
|| drainType == DrainType.SCREEN || drainType == DrainType.BLUETOOTH
return drainType == DrainType.IDLE
|| drainType == DrainType.CELL
|| drainType == DrainType.WIFI
|| drainType == DrainType.SCREEN
|| drainType == DrainType.BLUETOOTH
|| (sipper.totalPowerMah * SECONDS_IN_HOUR) < MIN_POWER_THRESHOLD_MILLI_AMP
|| mPowerFeatureProvider.isTypeService(sipper)
|| mPowerFeatureProvider.isTypeSystem(sipper);