Fix some Android lint warnings in AppRTCMobile.

Bug: webrtc:6597
Change-Id: I73e304ff03a5fcb166ff7bca61319904ef495426
Reviewed-on: https://webrtc-review.googlesource.com/15322
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20439}
This commit is contained in:
Sami Kalliomäki
2017-10-25 16:04:47 +02:00
committed by Commit Bot
parent 68e56a5951
commit 2729c16143
13 changed files with 86 additions and 178 deletions

View File

@ -28,7 +28,6 @@ import java.util.Map;
* Fragment for HUD statistics display.
*/
public class HudFragment extends Fragment {
private View controlView;
private TextView encoderStatView;
private TextView hudViewBwe;
private TextView hudViewConnection;
@ -43,15 +42,15 @@ public class HudFragment extends Fragment {
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
controlView = inflater.inflate(R.layout.fragment_hud, container, false);
View controlView = inflater.inflate(R.layout.fragment_hud, container, false);
// Create UI controls.
encoderStatView = (TextView) controlView.findViewById(R.id.encoder_stat_call);
hudViewBwe = (TextView) controlView.findViewById(R.id.hud_stat_bwe);
hudViewConnection = (TextView) controlView.findViewById(R.id.hud_stat_connection);
hudViewVideoSend = (TextView) controlView.findViewById(R.id.hud_stat_video_send);
hudViewVideoRecv = (TextView) controlView.findViewById(R.id.hud_stat_video_recv);
toggleDebugButton = (ImageButton) controlView.findViewById(R.id.button_toggle_debug);
encoderStatView = controlView.findViewById(R.id.encoder_stat_call);
hudViewBwe = controlView.findViewById(R.id.hud_stat_bwe);
hudViewConnection = controlView.findViewById(R.id.hud_stat_connection);
hudViewVideoSend = controlView.findViewById(R.id.hud_stat_video_send);
hudViewVideoRecv = controlView.findViewById(R.id.hud_stat_video_recv);
toggleDebugButton = controlView.findViewById(R.id.button_toggle_debug);
toggleDebugButton.setOnClickListener(new View.OnClickListener() {
@Override
@ -105,7 +104,7 @@ public class HudFragment extends Fragment {
}
private Map<String, String> getReportMap(StatsReport report) {
Map<String, String> reportMap = new HashMap<String, String>();
Map<String, String> reportMap = new HashMap<>();
for (StatsReport.Value value : report.values) {
reportMap.put(value.name, value.value);
}