From e19649b8ce352081cf0916b818c292aa3fdeeda0 Mon Sep 17 00:00:00 2001 From: sakal Date: Tue, 15 Nov 2016 12:32:22 -0800 Subject: [PATCH] Fix Android lint error. BUG=webrtc:6711 NOTRY=True Review-Url: https://codereview.webrtc.org/2504643002 Cr-Commit-Position: refs/heads/master@{#15095} --- webrtc/examples/androidapp/res/values/strings.xml | 1 + .../src/org/appspot/apprtc/CaptureQualityController.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/webrtc/examples/androidapp/res/values/strings.xml b/webrtc/examples/androidapp/res/values/strings.xml index 5de2d7ddd7..ef030bde12 100644 --- a/webrtc/examples/androidapp/res/values/strings.xml +++ b/webrtc/examples/androidapp/res/values/strings.xml @@ -26,6 +26,7 @@ Loopback connection Connect to the room Add favorite + %1$dx%2$d @ %3$d fps room_preference diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java index 5476ee9ecb..82cf338503 100644 --- a/webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java +++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java @@ -12,13 +12,11 @@ package org.appspot.apprtc; import android.widget.SeekBar; import android.widget.TextView; - -import org.webrtc.CameraEnumerationAndroid.CaptureFormat; - import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; +import org.webrtc.CameraEnumerationAndroid.CaptureFormat; /** * Control capture format based on a seekbar listener. @@ -90,7 +88,9 @@ public class CaptureQualityController implements SeekBar.OnSeekBarChangeListener width = bestFormat.width; height = bestFormat.height; 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