Enable Battery Defender on user builds

Test: Ensure that 'atest HealthTestCases' runs successfully
Bug: 175614345
Merged-In: Ie126fcf3d97c53c09e27341e2a51a6adb48af555
Change-Id: Ie126fcf3d97c53c09e27341e2a51a6adb48af555
(cherry picked from commit bd322427ed652987db3aa3fca86060ca98a8356d)
diff --git a/health/BatteryDefender.cpp b/health/BatteryDefender.cpp
index 37283da..277f75a 100644
--- a/health/BatteryDefender.cpp
+++ b/health/BatteryDefender.cpp
@@ -151,9 +151,8 @@
     const bool isDefaultVendorChargeLevel = isDefaultChargeLevel(vendorStart, vendorStop);
     const bool isExplicitlyDisabled =
             android::base::GetBoolProperty(kPropBatteryDefenderDisable, false);
-    const bool isDebuggable = android::base::GetBoolProperty(kPropDebuggable, false);
 
-    return isExplicitlyDisabled || (isDefaultVendorChargeLevel == false) || (isDebuggable == false);
+    return isExplicitlyDisabled || (isDefaultVendorChargeLevel == false);
 }
 
 void BatteryDefender::addTimeToChargeTimers(void) {
diff --git a/health/include/pixelhealth/BatteryDefender.h b/health/include/pixelhealth/BatteryDefender.h
index 30512c2..42d8a55 100644
--- a/health/include/pixelhealth/BatteryDefender.h
+++ b/health/include/pixelhealth/BatteryDefender.h
@@ -89,7 +89,6 @@
     const char *const kPropBatteryDefenderState = "vendor.battery.defender.state";
     const char *const kPropBatteryDefenderDisable = "vendor.battery.defender.disable";
     const char *const kPropBatteryDefenderThreshold = "vendor.battery.defender.threshold";
-    const char *const kPropDebuggable = "ro.debuggable";
     const char *const kPropBootmode = "ro.bootmode";
 
     // Default thresholds
diff --git a/health/test/TestBatteryDefender.cpp b/health/test/TestBatteryDefender.cpp
index 11ce12f..5edd4f4 100644
--- a/health/test/TestBatteryDefender.cpp
+++ b/health/test/TestBatteryDefender.cpp
@@ -142,13 +142,11 @@
 const char *kPropBatteryDefenderState = "vendor.battery.defender.state";
 const char *kPropBatteryDefenderDisable = "vendor.battery.defender.disable";
 const char *kPropBatteryDefenderThreshold = "vendor.battery.defender.threshold";
-const char *kPropDebuggable = "ro.debuggable";
 
 static void enableDefender(void) {
     ON_CALL(*mock, GetIntProperty(kPropChargeLevelVendorStart, _, _, _)).WillByDefault(Return(0));
     ON_CALL(*mock, GetIntProperty(kPropChargeLevelVendorStop, _, _, _)).WillByDefault(Return(100));
     ON_CALL(*mock, GetBoolProperty(kPropBatteryDefenderDisable, _)).WillByDefault(Return(false));
-    ON_CALL(*mock, GetBoolProperty(kPropDebuggable, _)).WillByDefault(Return(true));
 }
 
 static void powerAvailable(void) {
@@ -202,16 +200,6 @@
     battDefender.update();
 }
 
-TEST_F(BatteryDefenderTest, DisableDebuggable) {
-    BatteryDefender battDefender;
-
-    // Enable Battery Defender
-    EXPECT_CALL(*mock, GetBoolProperty(kPropDebuggable, _)).WillOnce(Return(false));
-
-    EXPECT_CALL(*mock, SetProperty(kPropBatteryDefenderState, "DISABLED"));
-    battDefender.update();
-}
-
 TEST_F(BatteryDefenderTest, DisableExplicit) {
     BatteryDefender battDefender;