コード例 #1
0
  @Override
  public void bindView(@NonNull DeveloperSettingsView view) {
    super.bindView(view);

    view.changeGitSha(developerSettingsModel.getGitSha());
    view.changeBuildDate(developerSettingsModel.getBuildDate());
    view.changeBuildVersionCode(developerSettingsModel.getBuildVersionCode());
    view.changeBuildVersionName(developerSettingsModel.getBuildVersionName());
    view.changeStethoState(developerSettingsModel.isStethoEnabled());
    view.changeLeakCanaryState(developerSettingsModel.isLeakCanaryEnabled());
    view.changeTinyDancerState(developerSettingsModel.isTinyDancerEnabled());
    view.changeHttpLoggingLevel(developerSettingsModel.getHttpLoggingLevel());
  }
コード例 #2
0
  public void changeHttpLoggingLevel(@NonNull HttpLoggingInterceptor.Level loggingLevel) {
    if (developerSettingsModel.getHttpLoggingLevel() == loggingLevel) {
      return; // no-op
    }

    analyticsModel.sendEvent("developer_settings_http_logging_level_" + loggingLevel);

    developerSettingsModel.changeHttpLoggingLevel(loggingLevel);

    final DeveloperSettingsView view = view();

    if (view != null) {
      view.showMessage("Http logging level was changed to " + loggingLevel.toString());
    }
  }