@Test public void initialBitrateEstimateOverwrite_forCountry_usesDefaultValuesForCountry() { setNetworkCountryIso(SLOW_COUNTRY_ISO); DefaultBandwidthMeter bandwidthMeterSlow = new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext()).build(); long initialEstimateSlow = bandwidthMeterSlow.getBitrateEstimate(); setNetworkCountryIso(FAST_COUNTRY_ISO); DefaultBandwidthMeter bandwidthMeterFastWithSlowOverwrite = new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext()) .setInitialBitrateEstimate(SLOW_COUNTRY_ISO) .build(); long initialEstimateFastWithSlowOverwrite = bandwidthMeterFastWithSlowOverwrite.getBitrateEstimate(); assertThat(initialEstimateFastWithSlowOverwrite).isEqualTo(initialEstimateSlow); }
@Override public synchronized long getBitrateEstimate() { return bitrateEstimate; }
DefaultBandwidthMeter implements BandwidthMeter, TransferListener { @Override public synchronized long getBitrateEstimate() { return bitrateEstimate; } }
DefaultBandwidthMeter implements BandwidthMeter, TransferListener { @Override public synchronized long getBitrateEstimate() { return bitrateEstimate; } @Deprecated  DefaultBandwidthMeter(); private  DefaultBandwidthMeter(
      @Nullable Context context,
      SparseArray<Long> initialBitrateEstimates,
      int maxWeight,
      Clock clock,
      boolean resetOnNetworkTypeChange); }
DefaultBandwidthMeter implements BandwidthMeter, TransferListener { @Override public synchronized long getBitrateEstimate() { return bitrateEstimate; } @Deprecated  DefaultBandwidthMeter(); private  DefaultBandwidthMeter(
      @Nullable Context context,
      SparseArray<Long> initialBitrateEstimates,
      int maxWeight,
      Clock clock,
      boolean resetOnNetworkTypeChange); synchronized void setNetworkTypeOverride(@C.NetworkType int networkType); @Override synchronized long getBitrateEstimate(); @Override @Nullable TransferListener getTransferListener(); @Override void addEventListener(Handler eventHandler, EventListener eventListener); @Override void removeEventListener(EventListener eventListener); @Override void onTransferInitializing(DataSource source, DataSpec dataSpec, boolean isNetwork); @Override synchronized void onTransferStart(
      DataSource source, DataSpec dataSpec, boolean isNetwork); @Override synchronized void onBytesTransferred(
      DataSource source, DataSpec dataSpec, boolean isNetwork, int bytes); @Override synchronized void onTransferEnd(DataSource source, DataSpec dataSpec, boolean isNetwork); }
DefaultBandwidthMeter implements BandwidthMeter, TransferListener { @Override public synchronized long getBitrateEstimate() { return bitrateEstimate; } @Deprecated  DefaultBandwidthMeter(); private  DefaultBandwidthMeter(
      @Nullable Context context,
      SparseArray<Long> initialBitrateEstimates,
      int maxWeight,
      Clock clock,
      boolean resetOnNetworkTypeChange); synchronized void setNetworkTypeOverride(@C.NetworkType int networkType); @Override synchronized long getBitrateEstimate(); @Override @Nullable TransferListener getTransferListener(); @Override void addEventListener(Handler eventHandler, EventListener eventListener); @Override void removeEventListener(EventListener eventListener); @Override void onTransferInitializing(DataSource source, DataSpec dataSpec, boolean isNetwork); @Override synchronized void onTransferStart(
      DataSource source, DataSpec dataSpec, boolean isNetwork); @Override synchronized void onBytesTransferred(
      DataSource source, DataSpec dataSpec, boolean isNetwork, int bytes); @Override synchronized void onTransferEnd(DataSource source, DataSpec dataSpec, boolean isNetwork); static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS; static final long[] DEFAULT_INITIAL_BITRATE_ESTIMATES_WIFI; static final long[] DEFAULT_INITIAL_BITRATE_ESTIMATES_2G; static final long[] DEFAULT_INITIAL_BITRATE_ESTIMATES_3G; static final long[] DEFAULT_INITIAL_BITRATE_ESTIMATES_4G; static final long DEFAULT_INITIAL_BITRATE_ESTIMATE; static final int DEFAULT_SLIDING_WINDOW_MAX_WEIGHT; }