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

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

Issue 1998483003: General cleanup on AppRTC Android Demo codebase (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove unused string that was accidentally added. Created 4 years, 7 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 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 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
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 int microphone = intent.getIntExtra("microphone", HAS_NO_MIC); 233 int microphone = intent.getIntExtra("microphone", HAS_NO_MIC);
234 String name = intent.getStringExtra("name"); 234 String name = intent.getStringExtra("name");
235 Log.d(TAG, "BroadcastReceiver.onReceive" + AppRTCUtils.getThreadInfo() 235 Log.d(TAG, "BroadcastReceiver.onReceive" + AppRTCUtils.getThreadInfo()
236 + ": " 236 + ": "
237 + "a=" + intent.getAction() 237 + "a=" + intent.getAction()
238 + ", s=" + (state == STATE_UNPLUGGED ? "unplugged" : "plugged") 238 + ", s=" + (state == STATE_UNPLUGGED ? "unplugged" : "plugged")
239 + ", m=" + (microphone == HAS_MIC ? "mic" : "no mic") 239 + ", m=" + (microphone == HAS_MIC ? "mic" : "no mic")
240 + ", n=" + name 240 + ", n=" + name
241 + ", sb=" + isInitialStickyBroadcast()); 241 + ", sb=" + isInitialStickyBroadcast());
242 242
243 boolean hasWiredHeadset = (state == STATE_PLUGGED) ? true : false; 243 boolean hasWiredHeadset = (state == STATE_PLUGGED);
244 switch (state) { 244 switch (state) {
245 case STATE_UNPLUGGED: 245 case STATE_UNPLUGGED:
246 updateAudioDeviceState(hasWiredHeadset); 246 updateAudioDeviceState(hasWiredHeadset);
247 break; 247 break;
248 case STATE_PLUGGED: 248 case STATE_PLUGGED:
249 if (selectedAudioDevice != AudioDevice.WIRED_HEADSET) { 249 if (selectedAudioDevice != AudioDevice.WIRED_HEADSET) {
250 updateAudioDeviceState(hasWiredHeadset); 250 updateAudioDeviceState(hasWiredHeadset);
251 } 251 }
252 break; 252 break;
253 default: 253 default:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 Log.e(TAG, "Invalid device list"); 347 Log.e(TAG, "Invalid device list");
348 } 348 }
349 349
350 if (onStateChangeListener != null) { 350 if (onStateChangeListener != null) {
351 // Run callback to notify a listening client. The client can then 351 // Run callback to notify a listening client. The client can then
352 // use public getters to query the new state. 352 // use public getters to query the new state.
353 onStateChangeListener.run(); 353 onStateChangeListener.run();
354 } 354 }
355 } 355 }
356 } 356 }
OLDNEW
« no previous file with comments | « webrtc/examples/androidapp/res/values/strings.xml ('k') | webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCClient.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698