public void changeLeakCanaryState(boolean enabled) {
    if (developerSettingsModel.isLeakCanaryEnabled() == enabled) {
      return; // no-op
    }

    analyticsModel.sendEvent("developer_settings_leak_canary_" + booleanToEnabledDisabled(enabled));

    developerSettingsModel.changeLeakCanaryState(enabled);

    final DeveloperSettingsView view = view();

    if (view != null) {
      view.showMessage("LeakCanary was " + booleanToEnabledDisabled(enabled));
      view.showAppNeedsToBeRestarted(); // LeakCanary can not be enabled on demand (or it's
      // possible?)
    }
  }
  public void changeStethoState(boolean enabled) {
    if (developerSettingsModel.isStethoEnabled() == enabled) {
      return; // no-op
    }

    analyticsModel.sendEvent("developer_settings_stetho_" + booleanToEnabledDisabled(enabled));

    boolean stethoWasEnabled = developerSettingsModel.isStethoEnabled();

    developerSettingsModel.changeStethoState(enabled);

    final DeveloperSettingsView view = view();

    if (view != null) {
      view.showMessage("Stetho was " + booleanToEnabledDisabled(enabled));

      if (stethoWasEnabled) {
        view.showAppNeedsToBeRestarted();
      }
    }
  }