Related to b/5873421.
When an app using the SurfaceTextureTarget filter and the activity goes
out of focus such as onPause(), the underlying surfacetexture might not
be available anymore to the filter. The filter needs to be told about
that so that it does try to render into the surface corresponding to the
surfacetexture. For example, in Camera app, the VideoCamera activity has
to let the underlying effects graph know about the disconnect in the
onPause() method.
Change-Id: Iee3af16715432d84fef4438d1671f4d6d261b3d7
o Removes mParcel from TimedText class.
o Converts native parcel into java parcel object directly without
copying to an intermediate byte array.
o JNIMediaPlayerListener::notify checks for Java exceptions, logs them,
and clears the exception state.
related-to-bug: 6405934
Change-Id: I8b82d3cd5b9b3ef8cad27e805202a0e445a88a45
Clean up related to new Vibration policy.
The vibrate behavior is now only derived from:
- presence of a vibrator on the device
- current ringer mode selected: NORMAL, VIBRATE or SILENT
If no vibrator is present the ringer mode can only be NORMAL or SILENT.
The control of ringer mode via volume keys when volume keys control the "master"
stream type (RING on phones, MUSIC on tablets) is as follows:
If a vibrator is present:
VOL- and volume equals 1: NORMAL => VIBRATE
VOL- and volume equals 0 and not continuous press: VIBRATE => SILENT
VOL+ and in SILENT mode: SILENT => VIBRATE
VOL+ and in VIBRATE mode: VIBRATE => NORMAL, volume = 1
If no vibrator is present:
VOL- and volume equals 0 and not continuous press: NORMAL => SILENT
VOL+ and in SILENT mode: SILENT => NORMAL, volume = 0
VIBRATE_ON and VIBRATE_IN_SILENT settings are not stored/retreived any more.
AudioService checks and corrects ringer mode and stream volumes if necessary when reading from
DB at boot time.
Also:
Added dump for stream volumes in AudioService.
Added device names missing in AudioSystem for USB accessory and USB device.
Issue: 6036529
Issue: 6414950
Issue: 6448163
Change-Id: I77fb821ec63e4e566320cac2701b4ac466e86aef
Silent ringtones have a valid Uri, but isn't openable by MediaPlayer,
so treat as no-op playback instead of throwing. Also handle missing
permissions when resolving title.
Bug: 6448074, 6447538
Change-Id: I656675d7fc2e78a6ba05824e13bdd43193fcfdf2
If the "ro.audio.monitorOrientation" system property is
defined and true, monitor device configuration changes
and see if the device orientation changed. If it did,
set the "orientation" audio system parameter to one
of "landscape", "portrait", "square" or "undefined".
Set orientation when starting AudioService, and
when media server restarts.
Change-Id: Idce548f93abf3aab30149e5952daaa7051630232
Deprecate methods, intent and constants related to vibrate
settings management: getVibrateSetting(), setVibrateSetting(),
shouldVibrate() ...
According to new vibrate/notification policy, applications should
maintain their own vibrate settings.
Issue 6036529.
Change-Id: I99bcef2c5f602131f1d9b0222f7fb39f3bbef823
Changing STREAM_MUSIC from volume panel on tablets should exit silent
mode as does changing STREAM_RING on phones.
Issue 5970208.
Change-Id: Ia8ed62033da07a5d4dfcfa84b0b47b27414bdd9a
AudioService maintains a stack of registered media button event
receivers.
This change modifies the broadcasters of ACTION_MEDIA_BUTTON intents
let AudioService directly handle the corresponding key event instead
of trapping the intent sent by PhoneWindowManager, KeyguardViewBase
and PhoneFallbackEventHandler.
Because the key event may be sent through a PendingIntent,
AudioService now also implements the OnFinished interface to be
notified when the event was consumed so it can release the wake
lock held if it was held when the key event needed to be sent
(see where PassHeadsetKey was instanciated in PhoneWindowManager).
Change-Id: I2e8614df94af9d54edbf714ef443cc372d21827a
o made all the member variables in helper classes for TimedText to be public and final
since they are read-only
o removed Text and TextPos helper classes
o added two public methods in TimedText class: getText() and getBounds()
o cleaned up the javadoc of related methods in MediaPlayer.java and TimedText.java classes
o make the inner classes of TimedText static and final
o change invoke and let it throw RuntimeException on failure (thus a test class needs to be
modified also).
o related-to-bug: 6110705,5542712
Change-Id: Ia1dd1fd5eb8e9fd1b61c6c0d67405edb627a3002
Introduce IRingtonePlayer, which handles playback for both Ringtone
objects and Notifications. SystemUI now hosts this player, which it
registers with AudioService. It also keeps MediaPlayer instances
warm, and cleans them up after stop() or Binder death.
Move both Ringtone and NotificationManagerService to play back audio
through this new interface.
Bug: 6376128, 6350773
Change-Id: I1dcb86d16ee3c4f07cdb2248d33dcff4ead3609a
Implement a more consistent policy for system and UI sounds (key clicks, lock/unlock,
camera shutter, DTMF, low battery...):
- All system sounds are played over STREAM_SYSTEM stream type.
- The STREAM_SYSTEM volume that was previously fixed now tracks the volume of a "master"
stream type. This "master" stream type is STREAM_RING for phones and STREAM_MUSIC for
tablets which corresponds to the stream whose volume is modified by default by the volume
keys.
- The STREAM_SYSTEM volume ranges from -24dB to -6dB (-24dB to -12dB over headphones) when the
"master" stream volume ranges from its min to its max.
- DTMF tones are played over STREAM_DTMF that tracks the "master" stream volume in the same
manner with the following exception: when in call, DTMF stream tracks STREAM_VOICE_CALL volume.
- Camera shutter sound is played over STREAM_SYSTEM_ENFORCED stream that tracks the "master"
stream volume except in countries where regulation enforces this sound. In this case
its volume is fixed and cannot be muted.
- Low battery sound is played over STREAM_SYSTEM and therefore has a tunable volume and is
heard while in call.
Issue 6344620.
Issue 6069229.
Issue 6213100.
Change-Id: I53a237878ead596e706c5dbbb1420e62cde32bd7
b:/6278826
The SurfaceTextureTarget Filter was not unregistering the surface
on closing leading to crashes and blank screens.
Change-Id: Ia9f6fc69b92d5a5e2e1e3803969152d11528aa3d