Update the setOverrideDeadline in the legacy AnomalyDetectionJobService

Update the setOverrideDeadline based on the suggestion in the b/319721625, and remove the legacy anomaly detection mechanism from the main entry BroadcastReceiver

Fix: 319721625
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge.batterytip"
Change-Id: I1276bfc95d9cf36a60e28612ebb8a295fd58083b
This commit is contained in:
ykhung
2024-01-15 17:10:58 +08:00
committed by YK Hung
parent 4130a95c5d
commit 22273161fd
3 changed files with 4 additions and 10 deletions

View File

@@ -49,6 +49,7 @@ import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
import com.android.settingslib.fuelgauge.PowerAllowlistBackend;
import com.android.settingslib.utils.ThreadUtils;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -59,7 +60,7 @@ public class AnomalyDetectionJobService extends JobService {
private static final int ON = 1;
@VisibleForTesting static final int UID_NULL = -1;
@VisibleForTesting static final int STATSD_UID_FILED = 1;
@VisibleForTesting static final long MAX_DELAY_MS = TimeUnit.MINUTES.toMillis(30);
@VisibleForTesting static final long MAX_DELAY_MS = Duration.ofDays(1).toMillis();
private final Object mLock = new Object();