package io.appium.java_client.android;

import static io.appium.java_client.android.AndroidMobileCommandHelper.toggleAirplaneCommand;
import static io.appium.java_client.android.AndroidMobileCommandHelper.toggleDataCommand;
import static io.appium.java_client.android.AndroidMobileCommandHelper.toggleWifiCommand;

import io.appium.java_client.CommandExecutionHelper;
import io.appium.java_client.ExecutesMethod;

public interface SupportsNetworkStateManagement extends ExecutesMethod {

    /**
     * Toggles Wifi on and off
     */
    default void toggleWifi() {
        CommandExecutionHelper.execute(this, toggleWifiCommand());
    }

    /**
     * Toggle Airplane mode and this works
     * on OS 6.0 and lesser
     * and does not work on OS 7.0 and greater
     */
    default void toggleAirplaneMode() {
        CommandExecutionHelper.execute(this, toggleAirplaneCommand());
    }

    /**
     * Toggle Mobile Data and this works on Emulator
     * and rooted device
     */
    default void toggleData() {
        CommandExecutionHelper.execute(this, toggleDataCommand());
    }
}

@@ -519,16 +519,17 @@
  and off
+.
 %0A     */
@@ -685,23 +685,16 @@
 is works
-%0A     *
  on OS 6
@@ -940,23 +940,16 @@
 Emulator
-%0A     *
  and roo
@@ -958,16 +958,17 @@
 d device
+.
 %0A     */

Fix SummaryJavadoc checkstyle violations