Adb is disconnecting during Monkey Test Run.
When running the monkey test, its going in tethering page inside Settings app and enabling ethernet tethering. Due to get adb connection is getting lost. Guarding ethernet tethering option when monkey test is running, it will not display ethernet tethering option during monkey test. Bug: Test: start monkey test run using below command adb shell monkey -v 1000000 Change-Id: I4040cb088404e663b032179ff52b1bc564ecf76b Signed-off-by: Ankit Agrawal <ankit.agarwal@intel.com>
This commit is contained in:
@@ -26,6 +26,7 @@ import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.OnLifecycleEvent;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settingslib.utils.ThreadUtils;
|
||||
|
||||
import java.util.HashSet;
|
||||
@@ -87,7 +88,7 @@ public final class EthernetTetherPreferenceController extends TetherBasePreferen
|
||||
|
||||
@Override
|
||||
public boolean shouldShow() {
|
||||
return mEthernetManager != null;
|
||||
return mEthernetManager != null && !Utils.isMonkeyRunning();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user