Revert "Fix "Dock defend string and tips in settings are incorrectly" issue"
This reverts commit d1114107df.
Reason for revert: Likely culprit for b/349578829 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I905a439c73e120efa094f097d59f68d0bedb0648
This commit is contained in:
committed by
Android (Google) Code Review
parent
d1114107df
commit
4cfc0d8156
@@ -53,8 +53,7 @@ public class BatteryInfo {
|
||||
public int batteryStatus;
|
||||
public int pluggedStatus;
|
||||
public boolean discharging = true;
|
||||
public boolean isBatteryDefender = false;
|
||||
public boolean isLongLife = false;
|
||||
public boolean isBatteryDefender;
|
||||
public boolean isFastCharging;
|
||||
public long remainingTimeUs = 0;
|
||||
public long averageTimeToDischarge = EstimateKt.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN;
|
||||
@@ -307,7 +306,7 @@ public class BatteryInfo {
|
||||
info.pluggedStatus = batteryBroadcast.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0);
|
||||
info.mCharging = info.pluggedStatus != 0;
|
||||
info.averageTimeToDischarge = estimate.getAverageDischargeTime();
|
||||
info.isLongLife =
|
||||
info.isBatteryDefender =
|
||||
batteryBroadcast.getIntExtra(
|
||||
BatteryManager.EXTRA_CHARGING_STATUS,
|
||||
BatteryManager.CHARGING_POLICY_DEFAULT)
|
||||
@@ -320,7 +319,7 @@ public class BatteryInfo {
|
||||
info.isFastCharging =
|
||||
BatteryStatus.getChargingSpeed(context, batteryBroadcast)
|
||||
== BatteryStatus.CHARGING_FAST;
|
||||
if (info.isLongLife) {
|
||||
if (info.isBatteryDefender) {
|
||||
info.isBatteryDefender =
|
||||
FeatureFactory.getFeatureFactory()
|
||||
.getPowerUsageFeatureProvider()
|
||||
|
||||
@@ -600,7 +600,7 @@ public class BatteryUtils {
|
||||
context.getContentResolver(), SETTINGS_GLOBAL_DOCK_DEFENDER_BYPASS, 0)
|
||||
== 1) {
|
||||
return DockDefenderMode.TEMPORARILY_BYPASSED;
|
||||
} else if (batteryInfo.isLongLife
|
||||
} else if (batteryInfo.isBatteryDefender
|
||||
&& FeatureFactory.getFeatureFactory()
|
||||
.getPowerUsageFeatureProvider()
|
||||
.isExtraDefend()) {
|
||||
|
||||
Reference in New Issue
Block a user