Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efa6db77 authored by Yu Shan's avatar Yu Shan
Browse files

Add enter garage mode bootup reason.

Test: m android.hardware.automotive.vehicle.property-update-api
Bug: 316217804
Change-Id: I2556e784d6a1b48c8067b06157176743fe6fa5a2
parent 255cfa28
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,4 +37,5 @@ enum VehicleApPowerBootupReason {
  USER_POWER_ON = 0,
  SYSTEM_USER_DETECTION = 1,
  SYSTEM_REMOTE_ACCESS = 2,
  SYSTEM_ENTER_GARAGE_MODE = 3,
}
+18 −1
Original line number Diff line number Diff line
@@ -34,7 +34,24 @@ enum VehicleApPowerBootupReason {
    SYSTEM_USER_DETECTION = 1,
    /**
     * Automatic power on to execute a remote task. This is triggered by
     * receiving a wakeup message from TCU wakeup client.
     * receiving a wakeup message from an external system in the vehicle.
     */
    SYSTEM_REMOTE_ACCESS = 2,
    /**
     * Automatic power on to enter garage mode. This is triggered by
     * receiving a wakeup message from an external system in the vehicle.
     *
     * Note that this does not necessarily mean Android will enter
     * the garage mode since user may enter the vehicle after this is set.
     * The system will only enter garage mode if VEHICLE_IN_USE is not true
     * upon check.
     *
     * To consider the Time-Of-Check-Time-Of-Use issue, there is a slight chance
     * that the vehicle become in-use after car service does the VEHICLE_IN_USE
     * check. The external power controller must also check whether the vehicle
     * is in use upon receiving the SHUTDOWN_REQUEST, before sending out
     * SHUTDOWN_PREPARE, to make sure the system does not enter garage mode or
     * shutdown if the vehicle is currently in use.
     */
    SYSTEM_ENTER_GARAGE_MODE = 3,
}
+12 −2
Original line number Diff line number Diff line
@@ -4545,12 +4545,22 @@ enum VehicleProperty {
    /**
     * Request the head unit to be shutdown.
     *
     * <p>This is required for executing a task when the head unit is powered off (remote task
     * feature). After the head unit is powered-on to execute the task, the head unit should
     * be shutdown. The head unit will send this message once the task is finished.
     *
     * <p>This is not for the case when a user wants to shutdown the head unit.
     *
     * <p>This usually involves telling a separate system outside the head unit (e.g. a power
     * controller) to prepare shutting down the head unit.
     *
     * <p>This does not mean the head unit will shutdown immediately.
     * <p>Note that the external system must validate whether this request is valid by checking
     * whether the vehicle is currently in use. If a user enters the vehicle after a
     * SHUTDOWN_REQUEST is sent, then the system must ignore this request. It
     * is recommended to store a VehicleInUse property in the power controller and exposes it
     * through VEHICLE_IN_USE property. A shutdown request must be ignored if VehicleInUse is true.
     *
     * <p>This means that another system will start sending a shutdown signal to the head unit,
     * <p>If allowed, the external system will start sending a shutdown signal to the head unit,
     * which will cause VHAL to send SHUTDOWN_PREPARE message to Android. Android will then start
     * the shut down process by handling the message.
     *