Fix Android lint error.

BUG=webrtc:6711
NOTRY=True

Review-Url: https://codereview.webrtc.org/2504643002
Cr-Commit-Position: refs/heads/master@{#15095}
This commit is contained in:
sakal
2016-11-15 12:32:22 -08:00
committed by Commit bot
parent 5c99c76255
commit e19649b8ce
2 changed files with 5 additions and 4 deletions

View File

@ -26,6 +26,7 @@
<string name="action_loopback">Loopback connection</string> <string name="action_loopback">Loopback connection</string>
<string name="connect_description">Connect to the room</string> <string name="connect_description">Connect to the room</string>
<string name="add_favorite_description">Add favorite</string> <string name="add_favorite_description">Add favorite</string>
<string name="format_description">%1$dx%2$d @ %3$d fps</string>
<!-- Settings strings. --> <!-- Settings strings. -->
<string name="pref_room_key">room_preference</string> <string name="pref_room_key">room_preference</string>

View File

@ -12,13 +12,11 @@ package org.appspot.apprtc;
import android.widget.SeekBar; import android.widget.SeekBar;
import android.widget.TextView; import android.widget.TextView;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
/** /**
* Control capture format based on a seekbar listener. * Control capture format based on a seekbar listener.
@ -90,7 +88,9 @@ public class CaptureQualityController implements SeekBar.OnSeekBarChangeListener
width = bestFormat.width; width = bestFormat.width;
height = bestFormat.height; height = bestFormat.height;
framerate = calculateFramerate(targetBandwidth, bestFormat); framerate = calculateFramerate(targetBandwidth, bestFormat);
captureFormatText.setText(width + "x" + height + " @ " + framerate + "fps"); captureFormatText.setText(
String.format(captureFormatText.getContext().getString(R.string.format_description), width,
height, framerate));
} }
@Override @Override