OSDN Git Service

Revert "Turn on wakeupAlarm anomaly detector"
authorLei Yu <jackqdyulei@google.com>
Fri, 15 Sep 2017 18:01:13 +0000 (18:01 +0000)
committerLei Yu <jackqdyulei@google.com>
Fri, 15 Sep 2017 18:03:56 +0000 (18:03 +0000)
This reverts commit 1a49a8ab3900ab77209b1c5b34a33cc3a8be3e2c.

Bug: 65738439
Test: RunSettingsRoboTests

Change-Id: Ifb2f72ba51e229b9387ff5a977bd51b229fcdf6a

src/com/android/settings/fuelgauge/anomaly/AnomalyDetectionPolicy.java
tests/robotests/src/com/android/settings/fuelgauge/anomaly/AnomalyDetectionPolicyTest.java

index 4829ca0..0c401b5 100644 (file)
@@ -122,7 +122,7 @@ public class AnomalyDetectionPolicy {
         anomalyDetectionEnabled = mParserWrapper.getBoolean(KEY_ANOMALY_DETECTION_ENABLED, true);
         wakeLockDetectionEnabled = mParserWrapper.getBoolean(KEY_WAKELOCK_DETECTION_ENABLED, true);
         wakeupAlarmDetectionEnabled = mParserWrapper.getBoolean(KEY_WAKEUP_ALARM_DETECTION_ENABLED,
-                true);
+                false);
         bluetoothScanDetectionEnabled = mParserWrapper.getBoolean(
                 KEY_BLUETOOTH_SCAN_DETECTION_ENABLED, true);
         wakeLockThreshold = mParserWrapper.getLong(KEY_WAKELOCK_THRESHOLD,
index 169cba8..914cc2f 100644 (file)
@@ -84,7 +84,7 @@ public class AnomalyDetectionPolicyTest {
         assertThat(anomalyDetectionPolicy.anomalyDetectionEnabled).isTrue();
         assertThat(anomalyDetectionPolicy.wakeLockDetectionEnabled).isTrue();
         assertThat(anomalyDetectionPolicy.wakeLockThreshold).isEqualTo(DateUtils.HOUR_IN_MILLIS);
-        assertThat(anomalyDetectionPolicy.wakeupAlarmDetectionEnabled).isTrue();
+        assertThat(anomalyDetectionPolicy.wakeupAlarmDetectionEnabled).isFalse();
         assertThat(anomalyDetectionPolicy.wakeupAlarmThreshold).isEqualTo(60);
         assertThat(anomalyDetectionPolicy.bluetoothScanDetectionEnabled).isTrue();
         assertThat(anomalyDetectionPolicy.bluetoothScanThreshold).isEqualTo(
@@ -112,7 +112,7 @@ public class AnomalyDetectionPolicyTest {
         doReturn(false).when(mKeyValueListParserWrapper).getBoolean(
                 AnomalyDetectionPolicy.KEY_WAKELOCK_DETECTION_ENABLED, true);
         doReturn(true).when(mKeyValueListParserWrapper).getBoolean(
-                AnomalyDetectionPolicy.KEY_WAKEUP_ALARM_DETECTION_ENABLED, true);
+                AnomalyDetectionPolicy.KEY_WAKEUP_ALARM_DETECTION_ENABLED, false);
         doReturn(true).when(mKeyValueListParserWrapper).getBoolean(
                 AnomalyDetectionPolicy.KEY_BLUETOOTH_SCAN_DETECTION_ENABLED, true);