Fix boot time includes shutdown time issue that mention in
b/236799228#comment39

Bug: 236799228
Test: atest AVFHostTestCases
Change-Id: I40d0c07a60e9e0bff262c4bd71405bf124bac073
diff --git a/tests/benchmark_hostside/java/android/avf/test/AVFHostTestCase.java b/tests/benchmark_hostside/java/android/avf/test/AVFHostTestCase.java
index 8e9da55..2e8be2a 100644
--- a/tests/benchmark_hostside/java/android/avf/test/AVFHostTestCase.java
+++ b/tests/benchmark_hostside/java/android/avf/test/AVFHostTestCase.java
@@ -121,8 +121,9 @@
             // Boot time with compilation OS test.
             reInstallApex(REINSTALL_APEX_TIMEOUT_SEC);
             compileStagedApex(COMPILE_STAGED_APEX_TIMEOUT_SEC);
+            getDevice().nonBlockingReboot();
             long start = System.nanoTime();
-            rebootAndWaitBootCompleted();
+            waitForBootCompleted();
             long elapsedWithCompOS = System.nanoTime() - start;
             double elapsedSec = elapsedWithCompOS / NANOS_IN_SEC;
             bootWithCompOsTime[round] = elapsedSec;
@@ -130,8 +131,9 @@
 
             // Boot time without compilation OS test.
             reInstallApex(REINSTALL_APEX_TIMEOUT_SEC);
+            getDevice().nonBlockingReboot();
             start = System.nanoTime();
-            rebootAndWaitBootCompleted();
+            waitForBootCompleted();
             long elapsedWithoutCompOS = System.nanoTime() - start;
             elapsedSec = elapsedWithoutCompOS / NANOS_IN_SEC;
             bootWithoutCompOsTime[round] = elapsedSec;
@@ -216,8 +218,7 @@
         getDevice().enableAdbRoot();
     }
 
-    private void rebootAndWaitBootCompleted() throws Exception {
-        getDevice().nonBlockingReboot();
+    private void waitForBootCompleted() throws Exception {
         getDevice().waitForDeviceOnline(BOOT_COMPLETE_TIMEOUT_MS);
         getDevice().waitForBootComplete(BOOT_COMPLETE_TIMEOUT_MS);
         getDevice().enableAdbRoot();