[AAE GarageMode] Turn the display off when forcing Garage Mode
For testing, the ADB commands
'adb shell dumpsys car_service garage-mode on' and
'adb shell dumpsys car_service garage-mode off'
can be used to force Garage Mode to start and stop.
When forcing Garage Mode for test, this CL turns the display off
to be more like Garage Mode in non-test mode.
This CL also fixes a problem with Garage Mode's active/inactive
reporting.
Fixes: 141919842
Test: Verified on Hawk using ADB
Change-Id: Iea8129b9bb140e36c9ff946273b24e322da93cd3
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 40f863a..95fdc19 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -1180,10 +1180,12 @@
private void forceGarageMode(String arg, PrintWriter writer) {
switch (arg) {
case PARAM_ON_MODE:
+ mSystemInterface.setDisplayState(false);
mGarageModeService.forceStartGarageMode();
writer.println("Garage mode: " + mGarageModeService.isGarageModeActive());
break;
case PARAM_OFF_MODE:
+ mSystemInterface.setDisplayState(true);
mGarageModeService.stopAndResetGarageMode();
writer.println("Garage mode: " + mGarageModeService.isGarageModeActive());
break;