summaryrefslogtreecommitdiff
path: root/service/java/com/android/server/deviceconfig/UnattendedRebootManagerInjector.java
diff options
context:
space:
mode:
authorYeabkal Wubshit <yeabkal@google.com>2024-01-29 15:28:51 -0800
committerYeabkal Wubshit <yeabkal@google.com>2024-02-05 21:02:45 +0000
commite6a5a4a92145207e3b3c1a6cc3f96a18953dab88 (patch)
treee6d70668bff39db23bc6ec18002fe158a16a065b /service/java/com/android/server/deviceconfig/UnattendedRebootManagerInjector.java
parentd98ccfc7b182660dec53c99602afee7907876dd9 (diff)
downloadConfigInfrastructure-e6a5a4a92145207e3b3c1a6cc3f96a18953dab88.tar.gz
Support dependency on charging for unattended reboot
The current mechanism of scheduled unattended reboots happening at a fixed time window are not working well for Wear, since users maybe wearing the watch and sleeping while this reboot triggers, causing disturbance due to audio/vibration from the reboot. This change implements a generic feature that can be used by any device that wishes to require charging when an unattended reboot happens. The config is set to off by default, so that other devices remain unaffected. We will enable the config for Wear. Bug: 322076175 Test: unit tests Change-Id: Icb7fdca1d1cdc25b0854d09b8de5e6dfc03b99bf
Diffstat (limited to 'service/java/com/android/server/deviceconfig/UnattendedRebootManagerInjector.java')
-rw-r--r--service/java/com/android/server/deviceconfig/UnattendedRebootManagerInjector.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/service/java/com/android/server/deviceconfig/UnattendedRebootManagerInjector.java b/service/java/com/android/server/deviceconfig/UnattendedRebootManagerInjector.java
index 5ca3e1e..f5f9850 100644
--- a/service/java/com/android/server/deviceconfig/UnattendedRebootManagerInjector.java
+++ b/service/java/com/android/server/deviceconfig/UnattendedRebootManagerInjector.java
@@ -45,6 +45,8 @@ interface UnattendedRebootManagerInjector {
boolean isPreparedForUnattendedUpdate(@NonNull Context context) throws IOException;
+ boolean requiresChargingForReboot(Context context);
+
/** Regular reboot injector. */
void regularReboot(Context context);
}