Remove an old feature which shouldn't be useful

With some of the isolation work, this isn't needed.
It's also unclear if this is used today as we simply carried
it from suite v1 to v2

Test: unit tests, presubmit
Bug: None
Change-Id: Icedb5d007223ba8881998d48692ddc39133e3013
diff --git a/javatests/com/android/tradefed/testtype/suite/ITestSuiteTest.java b/javatests/com/android/tradefed/testtype/suite/ITestSuiteTest.java
index d1d53eb..781cdc5 100644
--- a/javatests/com/android/tradefed/testtype/suite/ITestSuiteTest.java
+++ b/javatests/com/android/tradefed/testtype/suite/ITestSuiteTest.java
@@ -428,8 +428,6 @@
     /** Test for {@link ITestSuite#run(TestInformation, ITestInvocationListener)}. */
     @Test
     public void testRun() throws Exception {
-        OptionSetter setter = new OptionSetter(mTestSuite);
-        setter.setOptionValue("reboot-before-test", "true");
         mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice);
         // Since we set the option, expect a reboot to occur.
         when(mMockDevice.getIDevice()).thenReturn(mock(IDevice.class));
@@ -445,7 +443,6 @@
 
         mTestSuite.run(mTestInfo, mMockListener);
 
-        verify(mMockDevice).reboot();
         // Setup should have been called.
         Mockito.verify(mMockPreparer).setUp(Mockito.any());
     }
@@ -454,7 +451,6 @@
     @Test
     public void testRun_whiteListPreparer() throws Exception {
         OptionSetter setter = new OptionSetter(mTestSuite);
-        setter.setOptionValue("reboot-before-test", "true");
         setter.setOptionValue(
                 ITestSuite.PREPARER_WHITELIST, StubTargetPreparer.class.getCanonicalName());
         mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice);
@@ -472,7 +468,6 @@
 
         mTestSuite.run(mTestInfo, mMockListener);
 
-        verify(mMockDevice).reboot();
         // Setup should have been called.
         Mockito.verify(mMockPreparer, Mockito.times(0)).setUp(Mockito.any());
     }
diff --git a/src/com/android/tradefed/testtype/suite/ITestSuite.java b/src/com/android/tradefed/testtype/suite/ITestSuite.java
index b20630d..a345dc1 100644
--- a/src/com/android/tradefed/testtype/suite/ITestSuite.java
+++ b/src/com/android/tradefed/testtype/suite/ITestSuite.java
@@ -140,7 +140,6 @@
     public static final String MODULE_METADATA_INCLUDE_FILTER = "module-metadata-include-filter";
     public static final String MODULE_METADATA_EXCLUDE_FILTER = "module-metadata-exclude-filter";
     public static final String RANDOM_SEED = "random-seed";
-    public static final String REBOOT_BEFORE_TEST = "reboot-before-test";
 
     private static final String PRODUCT_CPU_ABI_KEY = "ro.product.cpu.abi";
 
@@ -186,12 +185,6 @@
     @Option(name = "reboot-per-module", description = "Reboot the device before every module run.")
     private boolean mRebootPerModule = false;
 
-    @Option(
-        name = REBOOT_BEFORE_TEST,
-        description = "Reboot the device before the test suite starts."
-    )
-    private boolean mRebootBeforeTest = false;
-
     @Option(name = "skip-all-system-status-check",
             description = "Whether all system status check between modules should be skipped")
     private boolean mSkipAllSystemStatusCheck = false;
@@ -666,18 +659,6 @@
             }
         }
 
-        // If requested reboot each device before the testing starts.
-        if (mRebootBeforeTest) {
-            for (ITestDevice device : mContext.getDevices()) {
-                if (!(device.getIDevice() instanceof StubDevice)) {
-                    CLog.d(
-                            "Rebooting device '%s' before test starts as requested.",
-                            device.getSerialNumber());
-                    mDevice.reboot();
-                }
-            }
-        }
-
         /** Setup a special listener to take actions on test failures. */
         TestFailureListener failureListener =
                 new TestFailureListener(
@@ -1387,11 +1368,6 @@
         return mInjector;
     }
 
-    /** Sets reboot-before-test to true. */
-    public final void enableRebootBeforeTest() {
-        mRebootBeforeTest = true;
-    }
-
     /**
      * Apply the metadata filter to the config and see if the config should run.
      *
diff --git a/src/com/android/tradefed/testtype/suite/retry/RetryRescheduler.java b/src/com/android/tradefed/testtype/suite/retry/RetryRescheduler.java
index 17bb807..3af38fc 100644
--- a/src/com/android/tradefed/testtype/suite/retry/RetryRescheduler.java
+++ b/src/com/android/tradefed/testtype/suite/retry/RetryRescheduler.java
@@ -40,7 +40,6 @@
 import com.android.tradefed.result.TextResultReporter;
 import com.android.tradefed.testtype.IRemoteTest;
 import com.android.tradefed.testtype.suite.BaseTestSuite;
-import com.android.tradefed.testtype.suite.ITestSuite;
 import com.android.tradefed.testtype.suite.SuiteTestFilter;
 import com.android.tradefed.util.AbiUtils;
 import com.android.tradefed.util.QuotationAwareTokenizer;
@@ -93,13 +92,6 @@
     )
     private Set<String> mExcludeFilters = new HashSet<>();
 
-    // Carry some options from suites that are convenient and don't impact the tests selection.
-    @Option(
-        name = ITestSuite.REBOOT_BEFORE_TEST,
-        description = "Reboot the device before the test suite starts."
-    )
-    private boolean mRebootBeforeTest = false;
-
     public static final String PREVIOUS_LOADER_NAME = "previous_loader";
 
     private IConfiguration mConfiguration;
@@ -187,10 +179,6 @@
         // Do the customization of the configuration for specialized use cases.
         customizeConfig(previousLoader, originalConfig);
 
-        if (mRebootBeforeTest) {
-            suite.enableRebootBeforeTest();
-        }
-
         mRescheduledConfiguration = originalConfig;
 
         if (mRescheduler != null) {