Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1831)

Side by Side Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java

Issue 2206473003: Remove LooperExecutor and replace it with built-in HandlerThread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes according to magjed's comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 package org.appspot.apprtc; 11 package org.appspot.apprtc;
12 12
13 import org.appspot.apprtc.AppRTCClient.RoomConnectionParameters; 13 import org.appspot.apprtc.AppRTCClient.RoomConnectionParameters;
14 import org.appspot.apprtc.AppRTCClient.SignalingParameters; 14 import org.appspot.apprtc.AppRTCClient.SignalingParameters;
15 import org.appspot.apprtc.PeerConnectionClient.PeerConnectionParameters; 15 import org.appspot.apprtc.PeerConnectionClient.PeerConnectionParameters;
16 import org.appspot.apprtc.util.LooperExecutor;
17 16
18 import android.app.Activity; 17 import android.app.Activity;
19 import android.app.AlertDialog; 18 import android.app.AlertDialog;
20 import android.app.FragmentTransaction; 19 import android.app.FragmentTransaction;
21 import android.content.DialogInterface; 20 import android.content.DialogInterface;
22 import android.content.Intent; 21 import android.content.Intent;
23 import android.content.pm.PackageManager; 22 import android.content.pm.PackageManager;
24 import android.net.Uri; 23 import android.net.Uri;
25 import android.os.Bundle; 24 import android.os.Bundle;
26 import android.os.Handler; 25 import android.os.Handler;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 intent.getBooleanExtra(EXTRA_DISABLE_BUILT_IN_AEC, false), 255 intent.getBooleanExtra(EXTRA_DISABLE_BUILT_IN_AEC, false),
257 intent.getBooleanExtra(EXTRA_DISABLE_BUILT_IN_AGC, false), 256 intent.getBooleanExtra(EXTRA_DISABLE_BUILT_IN_AGC, false),
258 intent.getBooleanExtra(EXTRA_DISABLE_BUILT_IN_NS, false), 257 intent.getBooleanExtra(EXTRA_DISABLE_BUILT_IN_NS, false),
259 intent.getBooleanExtra(EXTRA_ENABLE_LEVEL_CONTROL, false)); 258 intent.getBooleanExtra(EXTRA_ENABLE_LEVEL_CONTROL, false));
260 commandLineRun = intent.getBooleanExtra(EXTRA_CMDLINE, false); 259 commandLineRun = intent.getBooleanExtra(EXTRA_CMDLINE, false);
261 runTimeMs = intent.getIntExtra(EXTRA_RUNTIME, 0); 260 runTimeMs = intent.getIntExtra(EXTRA_RUNTIME, 0);
262 261
263 // Create connection client. Use DirectRTCClient if room name is an IP other wise use the 262 // Create connection client. Use DirectRTCClient if room name is an IP other wise use the
264 // standard WebSocketRTCClient. 263 // standard WebSocketRTCClient.
265 if (loopback || !DirectRTCClient.IP_PATTERN.matcher(roomId).matches()) { 264 if (loopback || !DirectRTCClient.IP_PATTERN.matcher(roomId).matches()) {
266 appRtcClient = new WebSocketRTCClient(this, new LooperExecutor()); 265 appRtcClient = new WebSocketRTCClient(this);
267 } else { 266 } else {
268 Log.i(TAG, "Using DirectRTCClient because room name looks like an IP."); 267 Log.i(TAG, "Using DirectRTCClient because room name looks like an IP.");
269 appRtcClient = new DirectRTCClient(this); 268 appRtcClient = new DirectRTCClient(this);
270 } 269 }
271 // Create connection parameters. 270 // Create connection parameters.
272 roomConnectionParameters = new RoomConnectionParameters( 271 roomConnectionParameters = new RoomConnectionParameters(
273 roomUri.toString(), roomId, loopback); 272 roomUri.toString(), roomId, loopback);
274 273
275 // Create CPU monitor 274 // Create CPU monitor
276 cpuMonitor = new CpuMonitor(this); 275 cpuMonitor = new CpuMonitor(this);
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 } 725 }
727 } 726 }
728 }); 727 });
729 } 728 }
730 729
731 @Override 730 @Override
732 public void onPeerConnectionError(final String description) { 731 public void onPeerConnectionError(final String description) {
733 reportError(description); 732 reportError(description);
734 } 733 }
735 } 734 }
OLDNEW
« no previous file with comments | « webrtc/examples/BUILD.gn ('k') | webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698