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 java.util.List; 19 20 /** 21 * Interface for recovering multiple offline devices. There are some device recovery methods which 22 * can affect multiple devices (ex) restarting adb, resetting usb, ...). We can implement those 23 * recovery methods through this interface. Once the implementation is configured through global 24 * configuration, {@link #recoverDevices(List)} will be called periodically from {@link 25 * DeviceManager}. 26 */ 27 public interface IMultiDeviceRecovery { 28 29 /** 30 * Recovers offline devices on host. 31 * 32 * @param managedDevices a list of {@link ITestDevice}s. 33 */ recoverDevices(List<IManagedTestDevice> managedDevices)34 void recoverDevices(List<IManagedTestDevice> managedDevices); 35 36 /** 37 * Sets the path to the fastboot binary to be used. 38 */ 39 @SuppressWarnings("unused") setFastbootPath(String fastbootPath)40 public default void setFastbootPath(String fastbootPath) { 41 // empty by default for implementation that do not require fastboot. 42 } 43 } 44