/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
AudioManagerTest.java | 4 import android.media.AudioManager; 15 private AudioManager audioManager; 17 private AudioManager.OnAudioFocusChangeListener listener; 21 audioManager = Robolectric.newInstanceOf(AudioManager.class); 22 shadowAudioManager = Robolectric.shadowOf(audioManager); 23 listener = new AudioManager.OnAudioFocusChangeListener() { 33 audioManager.requestAudioFocus(listener, 999, 888); 41 int value = audioManager.requestAudioFocus(listener, 999, 888) [all...] |
/development/samples/RandomMusicPlayer/src/com/example/android/musicplayer/ |
MediaButtonHelper.java | 4 import android.media.AudioManager; 26 sMethodRegisterMediaButtonEventReceiver = AudioManager.class.getMethod( 29 sMethodUnregisterMediaButtonEventReceiver = AudioManager.class.getMethod( 37 public static void registerMediaButtonEventReceiverCompat(AudioManager audioManager, 43 sMethodRegisterMediaButtonEventReceiver.invoke(audioManager, receiver); 62 public static void unregisterMediaButtonEventReceiverCompat(AudioManager audioManager, 68 sMethodUnregisterMediaButtonEventReceiver.invoke(audioManager, receiver);
|
RemoteControlHelper.java | 19 import android.media.AudioManager; 42 sRegisterRemoteControlClientMethod = AudioManager.class.getMethod( 44 sUnregisterRemoteControlClientMethod = AudioManager.class.getMethod( 58 public static void registerRemoteControlClient(AudioManager audioManager, 65 sRegisterRemoteControlClientMethod.invoke(audioManager, 73 public static void unregisterRemoteControlClient(AudioManager audioManager, 80 sUnregisterRemoteControlClientMethod.invoke(audioManager,
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
TimerRingService.java | 24 import android.media.AudioManager; 36 public class TimerRingService extends Service implements AudioManager.OnAudioFocusChangeListener { 162 final AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); 165 if (audioManager.getStreamVolume(AudioManager.STREAM_ALARM) != 0) { 166 player.setAudioStreamType(AudioManager.STREAM_ALARM); 169 audioManager.requestAudioFocus( 170 this, AudioManager.STREAM_ALARM, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT) [all...] |
/packages/apps/DeskClock/src/com/android/deskclock/alarms/ |
AlarmKlaxon.java | 21 import android.media.AudioManager; 54 AudioManager audioManager = (AudioManager) 56 audioManager.abandonAudioFocus(null); 130 AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); 132 if (audioManager.getStreamVolume(AudioManager.STREAM_ALARM) != 0) [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/ |
NotificationPlayer.java | 20 import android.media.AudioManager; 78 AudioManager audioManager = 79 (AudioManager) mCmd.context.getSystemService(Context.AUDIO_SERVICE); 88 if (!audioManager.isMusicActiveRemotely()) { 93 audioManager.requestAudioFocus(null, mCmd.stream, 94 AudioManager.AUDIOFOCUS_GAIN); 96 audioManager.requestAudioFocus(null, mCmd.stream, 97 AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); 99 mAudioManagerWithAudioFocus = audioManager; [all...] |
/packages/apps/Mms/src/com/android/mms/transaction/ |
NotificationPlayer.java | 27 import android.media.AudioManager; 86 AudioManager audioManager = 87 (AudioManager) mCmd.context.getSystemService(Context.AUDIO_SERVICE); 98 audioManager.requestAudioFocus(null, mCmd.stream, 99 AudioManager.AUDIOFOCUS_GAIN); 101 audioManager.requestAudioFocus(null, mCmd.stream, 102 AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); 115 mAudioManager = audioManager; 238 private AudioManager mAudioManager [all...] |
/packages/services/Telephony/src/com/android/phone/ |
Ringer.java | 20 import android.media.AudioManager; 170 AudioManager audioManager = 171 (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); 173 if (audioManager.getStreamVolume(AudioManager.STREAM_RING) == 0) { 205 AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); 206 int ringerMode = audioManager.getRingerMode() [all...] |
PhoneUtils.java | 31 import android.media.AudioManager; 93 // transitions for AudioManager.setMode() are allowed. [all...] |
EmergencyDialer.java | 28 import android.media.AudioManager; 96 private static final int DIAL_TONE_STREAM_TYPE = AudioManager.STREAM_DTMF; 497 mToneGenerator = new ToneGenerator(AudioManager.STREAM_DTMF, 579 AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); 580 int ringerMode = audioManager.getRingerMode(); 581 if ((ringerMode == AudioManager.RINGER_MODE_SILENT) 582 || (ringerMode == AudioManager.RINGER_MODE_VIBRATE)) {
|
PhoneGlobals.java | 36 import android.media.AudioManager; 530 intentFilter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION); 547 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); 594 AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); 595 audioManager.setParameter(CallFeaturesSetting.HAC_KEY, hac != 0 ? [all...] |
NotificationMgr.java | 34 import android.media.AudioManager; 612 * called AudioManager.setSpeakerphoneOn() yourself) then you should 619 AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); 621 (mPhone.getState() == PhoneConstants.State.OFFHOOK) && audioManager.isSpeakerphoneOn(); [all...] |
/frameworks/support/v4/jellybean-mr2/android/support/v4/media/ |
TransportMediatorJellybeanMR2.java | 24 import android.media.AudioManager; 35 final AudioManager mAudioManager; 71 AudioManager.OnAudioFocusChangeListener mAudioFocusChangeListener 72 = new AudioManager.OnAudioFocusChangeListener() { 85 public TransportMediatorJellybeanMR2(Context context, AudioManager audioManager, 88 mAudioManager = audioManager; 134 AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
CallManager.java | 22 import android.media.AudioManager; 375 AudioManager audioManager = (AudioManager) 382 int curAudioMode = audioManager.getMode(); 383 if (curAudioMode != AudioManager.MODE_RINGTONE) { 385 if (audioManager.getStreamVolume(AudioManager.STREAM_RING) > 0) { 387 audioManager.requestAudioFocusForCall(AudioManager.STREAM_RING [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
PhoneStatusBarPolicy.java | 25 import android.media.AudioManager; 93 else if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION)) { 113 filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION); 192 AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); 193 final int ringerMode = audioManager.getRingerMode(); 194 final boolean visible = ringerMode == AudioManager.RINGER_MODE_SILENT || 195 ringerMode == AudioManager.RINGER_MODE_VIBRATE; 199 if (ringerMode == AudioManager.RINGER_MODE_VIBRATE) [all...] |
/frameworks/base/policy/src/com/android/internal/policy/impl/ |
PhoneFallbackEventHandler.java | 25 import android.media.AudioManager; 45 AudioManager mAudioManager; 59 getAudioManager().preDispatchKeyEvent(event, AudioManager.USE_DEFAULT_STREAM_TYPE); 85 getAudioManager().handleKeyDown(event, AudioManager.USE_DEFAULT_STREAM_TYPE); 200 AudioManager audioManager = (AudioManager)mContext.getSystemService( 202 if (audioManager != null) { 203 getAudioManager().handleKeyUp(event, AudioManager.USE_DEFAULT_STREAM_TYPE); 281 AudioManager getAudioManager() [all...] |
GlobalActions.java | 36 import android.media.AudioManager; 88 private final AudioManager mAudioManager; 113 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); 406 IntentFilter filter = new IntentFilter(AudioManager.RINGER_MODE_CHANGED_ACTION); 414 mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL; 746 mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT); 748 mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL); 765 private final AudioManager mAudioManager; 769 SilentModeTriStateAction(Context context, AudioManager audioManager, Handler handler) [all...] |
PhoneWindow.java | 52 import android.media.AudioManager; 208 private int mVolumeControlStreamType = AudioManager.USE_DEFAULT_STREAM_TYPE; 210 private AudioManager mAudioManager; 887 AudioManager audioManager = (AudioManager) getContext().getSystemService( 889 if (audioManager != null) { 890 audioManager.playSoundEffect(AudioManager.FX_KEY_CLICK); [all...] |
/packages/apps/MusicFX/src/com/android/musicfx/ |
ActivityMusic.java | 35 import android.media.AudioManager; 177 final AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); 180 || audioManager.isBluetoothA2dpOn(); 189 } else if (action.equals(AudioManager.ACTION_AUDIO_BECOMING_NOISY)) { 190 mIsHeadsetOn = audioManager.isBluetoothA2dpOn() || audioManager.isWiredHeadsetOn(); 197 mIsHeadsetOn = audioManager.isWiredHeadsetOn(); 470 intentFilter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY) [all...] |
/external/chromium_org/third_party/libjingle/source/talk/examples/android/src/org/appspot/apprtc/ |
AppRTCDemoActivity.java | 35 import android.media.AudioManager; 109 AudioManager audioManager = 110 ((AudioManager) getSystemService(AUDIO_SERVICE)); 114 boolean isWiredHeadsetOn = audioManager.isWiredHeadsetOn(); 115 audioManager.setMode(isWiredHeadsetOn ? 116 AudioManager.MODE_IN_CALL : AudioManager.MODE_IN_COMMUNICATION); 117 audioManager.setSpeakerphoneOn(!isWiredHeadsetOn);
|
/packages/apps/VideoEditor/src/com/android/videoeditor/ |
VideoEditorBaseActivity.java | 25 import android.media.AudioManager; 838 final AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); 839 audioManager.requestAudioFocus(null, AudioManager.STREAM_MUSIC, 840 AudioManager.AUDIOFOCUS_GAIN); 858 final AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE) [all...] |
/development/samples/Support7Demos/src/com/example/android/supportv7/media/ |
SampleMediaRouteProvider.java | 27 import android.media.AudioManager; 182 .setPlaybackStream(AudioManager.STREAM_MUSIC) 193 .setPlaybackStream(AudioManager.STREAM_MUSIC) 205 .setPlaybackStream(AudioManager.STREAM_MUSIC) 217 .setPlaybackStream(AudioManager.STREAM_MUSIC) 345 AudioManager audioManager = 346 (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE); 347 audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, volume, 0) [all...] |
/frameworks/base/services/java/com/android/server/ |
NotificationManagerService.java | 49 import android.media.AudioManager; 120 private static final int DEFAULT_STREAM_TYPE = AudioManager.STREAM_NOTIFICATION; [all...] |
/packages/apps/Dialer/src/com/android/dialer/dialpad/ |
DialpadFragment.java | 32 import android.media.AudioManager; 189 private static final int DIAL_TONE_STREAM_TYPE = AudioManager.STREAM_DTMF; [all...] |
/frameworks/base/core/java/android/view/ |
ViewRootImpl.java | 39 import android.media.AudioManager; 298 AudioManager mAudioManager; [all...] |