Esempio n. 1
0
  protected void setEnabledSupport(boolean _enabled) {
    if (enabled != _enabled) {

      log("Enabled set to " + _enabled);

      if (_enabled) {

        original_limits = adapter.getLimits();

      } else {

        ping_mapper.saveHistory();
      }

      enableOrAlgChanged();

      enabled = _enabled;

      if (speed_tester != null) {

        speed_tester.setContactNumber(enabled ? CONTACT_NUMBER : 0);
      }

      if (!enabled) {

        adapter.setLimits(original_limits, true, provider.getAdjustsDownloadLimits());
      }
    }
  }
Esempio n. 2
0
  public void generate(IndentWriter writer) {
    writer.println("SpeedManager: enabled=" + enabled + ",provider=" + provider);

    try {
      writer.indent();

      ping_mapper.generateEvidence(writer);

    } finally {

      writer.exdent();
    }
  }
Esempio n. 3
0
 public void setEstimatedDownloadCapacityBytesPerSec(int bytes_per_sec, float metric) {
   ping_mapper.setEstimatedDownloadCapacityBytesPerSec(bytes_per_sec, metric);
 }
Esempio n. 4
0
 public void reset() {
   ping_mapper.reset();
 }
Esempio n. 5
0
 public SpeedManagerLimitEstimate getEstimatedDownloadCapacityBytesPerSec() {
   return (ping_mapper.getEstimatedDownloadCapacityBytesPerSec());
 }