code: public static void setAirplaneMode(boolean isAirplaneMode) {
      Settings.Global.putInt(
          RuntimeEnvironment.application.getContentResolver(),
          Settings.Global.AIRPLANE_MODE_ON,
          isAirplaneMode ? 1 : 0);
      Settings.System.putInt(
          RuntimeEnvironment.application.getContentResolver(),
          Settings.System.AIRPLANE_MODE_ON,
          isAirplaneMode ? 1 : 0);
    }
docs: Sets the value of the {@link Settings.System#AIRPLANE_MODE_ON} setting.
  
  @param isAirplaneMode new status for airplane mode