[Garage Mode] List the jobs that prevent GM from terminating
Sometimes Garage Mode continues longer than expected and reports
that it is waiting for more idle-mode jobs than expected.
Perhaps we don't know what idle-mode jobs to expect or how long
they normally run. This CL lists the jobs that GM is waiting for
so we can evaluate if there is a problem.
To get the list of jobs that Garage Mode is waiting for, issue
adb shell dumpsys car_service garage-mode query
Bug: 130298147
Test: Ran Garage Mode on Hawk and saw the list of pending jobs
Change-Id: I2fcd381b5ca4faccd0ae2371db36a13f97e3f409
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 3956f35..65f901a 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -693,19 +693,19 @@
switch (arg) {
case PARAM_ON_MODE:
mGarageModeService.forceStartGarageMode();
+ writer.println("Garage mode: " + mGarageModeService.isGarageModeActive());
break;
case PARAM_OFF_MODE:
mGarageModeService.stopAndResetGarageMode();
+ writer.println("Garage mode: " + mGarageModeService.isGarageModeActive());
break;
case PARAM_QUERY_MODE:
- // Nothing to do. Always query at the end anyway.
+ mGarageModeService.dump(writer);
break;
default:
writer.println("Unknown value. Valid argument: " + PARAM_ON_MODE + "|"
+ PARAM_OFF_MODE + "|" + PARAM_QUERY_MODE);
- return;
}
- writer.println("Garage mode: " + mGarageModeService.isGarageModeActive());
}
/**