1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.tradefed.device; 17 18 import com.android.tradefed.config.GlobalConfiguration; 19 20 import java.util.List; 21 22 /** 23 * Interface for recovering multiple offline devices. There are some device recovery methods which 24 * can affect multiple devices (ex) restarting adb, resetting usb, ...). We can implement those 25 * recovery methods through this interface. Once the implementation is configured through 26 * {@link GlobalConfiguration}, {@link #recoverDevices(List)} will be called 27 * periodically from {@link DeviceManager}. 28 */ 29 public interface IMultiDeviceRecovery { 30 31 /** 32 * Recovers offline devices on host. 33 * 34 * @param managedDevices a list of {@link ITestDevice}s. 35 */ recoverDevices(List<IManagedTestDevice> managedDevices)36 void recoverDevices(List<IManagedTestDevice> managedDevices); 37 38 /** 39 * Sets the path to the fastboot binary to be used. 40 */ 41 @SuppressWarnings("unused") setFastbootPath(String fastbootPath)42 public default void setFastbootPath(String fastbootPath) { 43 // empty by default for implementation that do not require fastboot. 44 } 45 } 46