6724 Commits

Author SHA1 Message Date
Jeff Brown
74da109102 Support Wifi display devices that rename themselves.
Some Wifi display devices like to rename themselves after a
connection completes (or at other times).  Make sure to update
the name of the display when we detect that it changed in
our scan results.

This problem is somewhat complicated by the fact that we remember
the display name persistently, so we need to update our list
of remembered displays too.

Improve the state machine to avoid redundant attempts to
disconnect or cancel connection.

Bug: 7478895
Change-Id: I35a9e2c6a8deadbe892dacd5e3b4a5a2b12d6cf0
2012-11-07 18:43:32 -08:00
Kenny Root
7b172a49a9 am 58ed5d74: am 768d9e1a: Merge "Correct executable bit for source files"
* commit '58ed5d748c0b9b64845975ef5844ad313de7c3f6':
  Correct executable bit for source files
2012-11-07 13:08:25 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
Eric Laurent
be78e991fd Merge "AudioService: improve low end dock audio control" 2012-11-06 08:37:55 -08:00
Eric Laurent
08ed1b9d20 AudioService: improve low end dock audio control
Low end docks have a menu to enable use of audio
for media: automatically enabling/disabling use of audio
when the dock is connected/disconnected is useless
and can be the source of audio glitches.

Bug 7463620.

Change-Id: I3b7e7ebe660bb3f0e4367d2a3ed63ee76f78fe58
2012-11-05 16:04:58 -08:00
Marco Nelissen
da005f4600 am ff25dd33: am 6791ebde: am 7a4d856c: Merge "Removed offensive music genre"
* commit 'ff25dd337d1f7a079495c0c5f5bb69fd1f97548f':
  Removed offensive music genre
2012-11-05 15:47:32 -08:00
Marco Nelissen
6791ebde5f am 7a4d856c: Merge "Removed offensive music genre"
* commit '7a4d856c881ef48ad590d9e5a0456c94d188898a':
  Removed offensive music genre
2012-11-05 15:41:31 -08:00
Marco Nelissen
7a4d856c88 Merge "Removed offensive music genre" 2012-11-05 14:50:09 -08:00
Marco Nelissen
6b37dc9f66 Merge "Request non-notifying Cursor when querying provider" 2012-11-03 13:42:33 -07:00
Eric Laurent
bff5ca576e audio service: set dock use on mediaserver restart
Restore forced usage of dock audio for media according to
current setting when media server restarts.

Change-Id: Ie67b80ede1ed92d223dd96de83c1beb985dfba06
2012-11-02 16:48:26 -07:00
Marco Nelissen
8ad76fa7a6 Request non-notifying Cursor when querying provider
This makes a media-rescan about twice as fast.
b/6751354

Change-Id: Iac3b0238f5731a20ecb5d4b34aa1666f7c610268
2012-11-02 16:40:37 -07:00
Marco Nelissen
dd1caa0050 Merge "Remove special case in media scanner" 2012-11-01 16:20:24 -07:00
Marco Nelissen
da8fe0faf5 Remove special case in media scanner
The media provider now takes care of case-sensitivity, so there is
no special handling needed when looking up entries in the database.

Change-Id: I2a23c4f1875a8ffea140281572b1e2c90cce60a7
2012-11-01 16:04:32 -07:00
Glenn Kasten
c6b35a1a7d Merge "Remove obsolete references to libmedia_native" 2012-10-30 12:12:56 -07:00
Glenn Kasten
b24a1b7f99 Remove obsolete references to libmedia_native
Bug: 6654403
Change-Id: I05d8e81fd31617b587fd1228a303c40db83e7f2d
2012-10-30 10:59:52 -07:00
Eric Laurent
2c978a1ce9 am 88ae0ae4: am 40d076e6: am 61ebf9cd: Merge "audio service: make dock audio is off by default" into jb-mr1-dev
* commit '88ae0ae4848ce894612397957cf4de6a6a50a394':
  audio service: make dock audio is off by default
2012-10-30 10:11:01 -07:00
Jean-Michel Trivi
a6daf109b6 am 15f7136e: am 0c419856: am 643e3372: Merge "No playback and music widget from other user on user switch" into jb-mr1-dev
* commit '15f7136e9b0b4ce1e512be7863b2e61e47d855f3':
  No playback and music widget from other user on user switch
2012-10-30 10:10:57 -07:00
Eric Laurent
9c95a173f7 am 2aa46d35: am 67baf878: am c99a1107: Merge "add settings for dock audio enabled" into jb-mr1-dev
* commit '2aa46d3518ac7e91f4ae621f767646d6e4b0a120':
  add settings for dock audio enabled
2012-10-29 17:14:59 -07:00
Eric Laurent
61ebf9cd8f Merge "audio service: make dock audio is off by default" into jb-mr1-dev 2012-10-29 15:21:33 -07:00
Jeff Brown
266ca72300 am 46a0ec73: am 14012e1d: am 4e0bf7c4: Merge "Add MediaRouter API to get presentation display." into jb-mr1-dev
* commit '46a0ec73b6d4a81dd037d7beef7321f25349bf9c':
  Add MediaRouter API to get presentation display.
2012-10-29 13:43:14 -07:00
Jean-Michel Trivi
f4a8eb2211 No playback and music widget from other user on user switch
On user switch:
 - make the current audio focus owner loose audio focus
 - clear the remote control display

Bug 7205290
Bug 7307156

Change-Id: I6ebcb94d1d2bae8c57ab98dd7e795b239a981d28
2012-10-29 12:42:55 -07:00
Eric Laurent
5ba0ffa023 audio service: make dock audio is off by default
It is better to turn dock audio off by default if the user
has not yet explicitly turned it on from the settings menu.
There is a discoverability issue with current implementation
as we do not launch the settings menu at first dock insertion.
Having audio routed to the dock by default would make the tablet
silent for media content when docked and users will not be directed
to the settings menu.

As the dock audio enable setting is for low end docks only
(analog connection and no jack detection) disabling audio for low end docks
by default does not impact manta and prime docks.

Bug 7302106.

Change-Id: I571f361d41940cfb811f038442ae9ba9c6361d1d
2012-10-29 12:31:09 -07:00
Eric Laurent
c99a1107c0 Merge "add settings for dock audio enabled" into jb-mr1-dev 2012-10-27 14:42:18 -07:00
Eric Laurent
7ee1e4ff73 add settings for dock audio enabled
Add settings dock_audio_media_enabled indicating if dock audio
is enabled for media for docks that do not implement jack detection.

Bug 7302106.

Change-Id: I75766b606ceb870b3f89979c4e3cca88ed197aaf
2012-10-26 18:11:21 -07:00
Marco Nelissen
348aa65e93 Don't create files when scanning
MediaScanner would insert non-existent files into the database
if you asked it nicely, thereby creating them.
b/7298303

Change-Id: Ie8496072248f2041e5a73cc04083e2a31c78f046
2012-10-26 16:29:59 -07:00
Jeff Brown
92130f6407 Add MediaRouter API to get presentation display.
This new API makes it possible for an application to ask on
which Display it should show a Presentation based on the currently
selected media route.

Also added a new API on DisplayManager to query displays that
support a certain category of uses.

Improved the documentation of the Presentation class to explain
how to choose an appropriate Display for presentation.

Bug: 7409073
Change-Id: Iab451215e570ae55f3718fc228303143c800fe51
2012-10-25 20:31:21 -07:00
Bryan Mawhinney
33c0a616db Merge "Add text representation of ROUTE_TYPE_LIVE_VIDEO (for debugging)" into jb-mr1-dev 2012-10-25 02:06:37 -07:00
Bryan Mawhinney
2bb7c122ef Add text representation of ROUTE_TYPE_LIVE_VIDEO (for debugging)
Change-Id: Id8fa45aefde85e2ba2b57694b91485ef25e2e5f2
2012-10-24 13:59:33 +01:00
Eric Laurent
d799db406b AudioService: add fix for corrupted settings
Added correction of MODE_RINGER_STREAMS_AFFECTED setting in
case it is inconsistent when read from the database: ringtone,
notification and system streams are always affected by ringer mode.
A corruption of this setting persists accross reboots and propagates via
backup/restore causing devices to play notification and ringtones in silent mode.

Bug 7384750.

Change-Id: I23170413d01e6a8e34ef514f1516d7b9ab8bc656
2012-10-23 20:14:27 -07:00
Jeff Sharkey
8d9a1f66d9 More migration to Global settings.
Bug: 7375796
Change-Id: I3954ce141ad30073896090a28eee743ba15fd736
2012-10-18 15:38:14 -07:00
Yu Shan Emily Lau
3662f2011f Append the test case name in the beginning
of the test log.

Change-Id: I621286274d84bfff474f1cc1e01353b3fd66dc23
2012-10-17 14:36:37 -07:00
Yu Shan Emily Lau
fc2652efed Merge "Fix the NPE for the memwriter." into jb-mr1-dev 2012-10-17 11:20:26 -07:00
Yu Shan Emily Lau
87b8a1c3b6 Fix the NPE for the memwriter.
Change-Id: Id3a5c8f29b0f6be994ea95eb62f1a0eec8fe75b5
2012-10-17 11:10:32 -07:00
Jean-Michel Trivi
256ab9e9b9 Merge "Use device availability to start WFD audio routing" into jb-mr1-dev 2012-10-15 16:24:56 -07:00
Marco Nelissen
39ca39b026 Rewind buffer before copying into it.
b/7334897

Change-Id: I83f795cb662d0845314bfb80b9a27ae45b2a0517
2012-10-12 11:13:10 -07:00
Jean-Michel Trivi
c203ecfd9f Use device availability to start WFD audio routing
Don't use the force_use mechanism to start WFD audio routing,
 but rather only the availability of the remote submix audio
 device. This is matched by a change in the audio policy
 manager.

Bug 7318180

Change-Id: I756f032d8ca0375c3dbeddb7c321261c497539bc
2012-10-11 18:30:11 -07:00
Jeff Brown
2444ae7e2b Ensure MediaRouter correctly handles renamed Wifi displays.
Fix a couple of bugs that cause MediaRouter to disconnect from
the current Wifi display whenever it is renamed.

Added an extra check in WifiDisplayAdapter for identity renames.
The Settings app already handles this case but it's good to have
the service check for it as well so we don't store unnecessary
aliases.

Bug: 7310777
Change-Id: I8fddd32ca59f9b798ee31b467b81457508c345f8
2012-10-11 14:30:21 -07:00
Jean-Michel Trivi
bcfc1ca8ab Merge "Don't play notifications during speech recognition" into jb-mr1-dev 2012-10-10 16:30:56 -07:00
Adam Powell
3f369684e1 Fix MediaRouter prioritization around a2dp devices
Most recently connected audio output gets priority. Wifi display will
dominate over everything.

Bug 7324334

Change-Id: I29b59570a2e9b5352be436dc5b7a0a6861dfae6b
2012-10-10 15:39:59 -07:00
Jean-Michel Trivi
d677054ca6 Don't play notifications during speech recognition
Add support for querying AudioManager to know whether speech
 recognition is currently underway.

Don't play a notification if speech recognition is underway.

Bug 7314859

Change-Id: I1bd013a3168cfe1a6b6dcfd28565e1c3c512eb6a
2012-10-10 12:03:41 -07:00
Yu Shan Emily Lau
d175a75d9f Merge "Instead of collecting the procmem output in the test, change it as optional. This is to avoid the tool breakage will block the whole memory test sutie." into jb-mr1-dev 2012-10-09 23:05:37 -07:00
Yu Shan Emily Lau
2ffd20753e Instead of collecting the procmem output in
the test, change it as optional. This is to avoid
the tool breakage will block the whole memory test sutie.

Change-Id: Ia7425531ca2151230d7fd98eb710f282e166b4f7
2012-10-09 19:12:46 -07:00
Eric Laurent
14dfe4e0ab Merge "enforce camera sound according to country code" into jb-mr1-dev 2012-10-09 11:29:11 -07:00
Adam Powell
b072a9686c Don't do a wifi p2p scan in MediaRouter if we're already connected
When we're connected to a wifi display already, some configurations
might hiccup or otherwise disrupt the media stream if we initiate a
new scan. Block the MediaRouter's default scanning behavior if we
start up while already connected to a wifi display. (A scan will still
occur if the user opens the picker dialog.)

Change-Id: I413efa883eec41fe0377da18bcb55bc72e2ac729
2012-10-08 20:56:35 -07:00
Eric Laurent
dd45d01128 enforce camera sound according to country code
Use mcc config overlay mechanism to enforce camera shutter sounds
in countries where it is mandatory.
Property ro.camera.sound.forced is not needed anymore.
When camera sound is forced, STREAM_SYSTEM_ENFORCED is removed from
streams affected by ringer mode and its volume is
maxed out. AudioSystem.FORCE_SYSTEM_ENFORCED is sent to audio
policy manager to alter the routing policy for STREAM_SYSTEM_ENFORCED.

Also fix streams being unmuted when settings are reloaded
upon user switch while in silent mode.

Add ringer mode to audio service dump.

Bug 7032634.

Change-Id: Iceea5bba3b8d3aabf8e42b222deb33a893dc8f38
2012-10-08 17:00:02 -07:00
Eric Laurent
33902db750 AudioService: fix settings for fixed volume device
Force max volume for devices with fixed volume policy (HDMI, dock...)
when reading the settings from DB. Otherwise, these devices would
get the default volume which is not what we want.

Also fix a problem related to ringer mode management when reloading the
volume settings upon user switch that would cause a muted stream to be
unmuted.

Bug 7301563;

Change-Id: I81cdb97125b845da584ed680181b93c7c1e5903f
2012-10-07 16:54:47 -07:00
Adam Powell
11b999d0aa MediaRouter/Wireless Display - correct initial state
Make sure we get the right initial status for wifi displays when a new
display route is first added to the MediaRouter.

Bug 7289746

Change-Id: Id41f704fc88021bd4cdf21e9f4b3c810775e1aea
2012-10-04 16:28:53 -07:00
James Dong
097922b9c1 Throw an exception instead of crash when a surface does not have a binding surface texture
o related-to-bug: 7270329

Change-Id: I498d72187968e89d9498d01b10719569e12be2af
2012-10-04 09:16:40 -07:00
Eric Laurent
31fed73701 Merge "AudioService: filter flags in volume methods" into jb-mr1-dev 2012-10-04 08:44:26 -07:00