1281 Commits

Author SHA1 Message Date
Justin Koh
0273af55cf Adds flag argument to setMasterMute.
Adds flag argument to setMasterMute. This allows third parties to edit it
without showing the UI, for example.

TESTED = runs on Tungsten.

Change-Id: Idfd99a2476e60059cd93c9dfe07d03a389c3f5f5
2012-04-04 18:40:36 -07:00
Justin Koh
57978ed862 Persists the master mute volume setting.
Persists the master mute volume setting across reboots.

TESTED = runs on Tungsten.

Change-Id: I9628b9369ca528b22413f62a9e7d697bae61d8ac
2012-04-03 17:37:58 -07:00
Justin Koh
3caba51725 Broadcast mastervolume regardless of change.
Broadcast mastervolume intents regardless of whether the system changed the
volume. This fixes the bug where the volume LEDs stop getting updates.

TESTED = runs on Tungsten.

Change-Id: Id363da3f825934fd7785ed3d3e436f74e657b7e6
2012-04-02 15:46:56 -07:00
RoboErik
45edba1b8b b/6232528 Reduce volume persist delay to 500ms
Change-Id: I45c32da0a1089ce8bc865e12b51c069a6db28fd4
2012-03-27 17:54:36 -07:00
Lei Zhang
d674dd50b7 Add batch volume adjust support to adjustMasterVolume() in AudioManager and
AudioService.

Change-Id: I34382839622a5cc5f2a8768aed011e8224cadff9
2012-03-02 11:48:28 -08:00
RoboErik
1918d4353c Fix Audio ramping code
The audio ramping was being ignored and we were always adjusting
by the same amount.

Change-Id: I1dc122e033c382f556844c5acadcfb698c8d2092
2012-02-24 17:44:27 -08:00
John Grossman
4aea858564 Switch the way we configure for MediaPlayer retransmission.
Move in the direction of a more publishable API for configuring a
media player for retransmission.  It used to be that we used a custom
invoke and a modified URL (prefixed with aahTX://).  There are many
issues with this technique and it was never meant to stand the test of
time.

This CL gets rid of all that.  A new (but currently hidden) method was
introduced to the java level MediaPlayer API, called
setRetransmitTarget(InetSocketAddress), which allows an app writer to
set the retransmit target.  For now, this method needs to be called
before a call to setDataSource (which is pretty unusual for the
MediaPlayer API) because this mid level code uses this as a cue to
instantiate an aahTX player instead of relying on the data source to
select a player.  When retranmit functionality becomes part of the
existing android player implemenation, this
set-retrans-before-set-data-source behavior can go away, along with
the aahTX player itself.

Change-Id: I6ab07d89b2eeb0650e634b8c3b7a0b36aba4e7dd
2012-02-23 12:02:04 -08:00
John Grossman
fa4a191d0d Revert "Add a way to play file descriptor data sources using the A@H transmitter media player."
This reverts commit 64006cb1642b2ec0ee74c66007d869b884391fd1.

Back out this change in order to get ready to implement a longer term,
more media-team approved way of selecting a retransmit player.

Change-Id: I97b68b9859a174eab858598cb00d4445a14fbc17
2012-02-23 09:29:51 -08:00
Scott Main
dfa926f54b am 52bfc243: docs: fix misc doc bugs from external issue tracker
* commit '52bfc243684b2f340da326aaa38e9021e4e3b2e6':
  docs: fix misc doc bugs from external issue tracker
2012-02-09 12:48:18 -08:00
Scott Main
52bfc24368 docs: fix misc doc bugs from external issue tracker
Change-Id: If6ff3476670e42b321d56d4a1482ccff96d4d500
2012-02-09 12:45:16 -08:00
Mike Lockwood
0e8392e1dc Add support for non-linear ramping of master volume adjustment
Bug: 5472584

Change-Id: Id75f8835f6693ae3fcb7ca451ada01f22faba1aa
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-09 11:24:10 -08:00
Jason Simmons
a477bab9c3 Only send master volume or mute updates if the settings have changed
Change-Id: If12ec3b7a4b4bf5165d7538013759f07a845d8c4
2012-02-02 13:00:17 -08:00
Jason Simmons
64006cb164 Add a way to play file descriptor data sources using the A@H transmitter media player.
* Added a MediaPlayer.setMediaPlayerType API that be called to specify the
  desired media player implementation before calling setDataSource
* Implemented setDataSource(fd) in the AAH_TxPlayer

Change-Id: I359075d9c7d6fd699dda14eb85ec50da19307639
2012-01-29 18:03:02 -08:00
Jason Simmons
db8b292b6d Make AudioManager.adjustMasterVolume public and hidden
Change-Id: Ied4d07c2f67f24d1e1963f4ff30650042334d563
2012-01-24 16:27:19 -08:00
John Grossman
881186c322 Enhance Visualizer behavior in the case of mediaserver death.
Bring the Visualizer class into line with the SDK documentation by
returning ERROR_DEAD_OBJECT instead of ERROR_INVALID_OPERATION when
the Visualizer loses its binder connection to the mediaserver because
of a mediaserver restart.

Also add a new callback interface to allow clients to be
asynchronously notified in the case of server death.  Right now, the
interface definition and the registration method are flagged as hidden
pending API council review/approval.

See http://b/issue?id=5717519 for details.

Change-Id: Id428fb946d6d7676bffd2a597366e8444ebe24f2
Signed-off-by: John Grossman <johngro@google.com>
2012-01-12 14:36:16 -08:00
John Grossman
595d76ee82 Reuse callback buffers in the Visualizer.
Don't re-allocate buffers used by Visualizer callbacks as this causes an
unacceptable amount of GC thrash.  Instead, lazily allocate the buffers and only
reallocate them when the required size changes.

See http://b/issue?id=5717519 for details.

Change-Id: I50458961992a64d9b3c46db7e5e8e6414a92228f
Signed-off-by: John Grossman <johngro@google.com>
2012-01-12 11:52:39 -08:00
Mike Lockwood
0b8afdac73 Restore persisted master volume if the media server restarts
Bug: 5755071

Change-Id: I6934276049b4a9d713bb4754aa3bb2cd3b898604
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-01-06 11:58:54 -05:00
Mike Lockwood
d10a663be6 Don't allow changing master volume when muted
Bug: 5793021

Change-Id: If93a41c4e61f1bc730759e77ee5b5f8165025c42
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-01-05 13:25:33 -05:00
Mike Lockwood
c239379c0c AudioService: remove logging from adjustMasterVolume that was left in by mistake
Change-Id: I75c430d2c50c4cab3b6207efab5a6f11aed728d2
Signed-off-by: Mike Lockwood <lockwood@google.com>
2011-12-16 11:26:37 -05:00
Mike Lockwood
f9113d311b Defer persisting master data to avoid excessive database writes
Bug: 5705192

Change-Id: I252bd72ff72ef4a40174d4597059e89691acb34f
Signed-off-by: Mike Lockwood <lockwood@google.com>
2011-12-15 17:26:17 -05:00
Joe Onorato
b782e8d71e logging
Change-Id: I6fde5617365f479884937615e0d3f0f4ecc2dc14
2011-12-13 22:17:04 -08:00
Mike Lockwood
a8f4e83595 Remove reference counting and client death notification for master mute
The use case for master mute is to toggle it on and off from a
KEYCODE_VOLUME_MUTE event, so this was unnecessary and prevented unmuting
in certain cases

Bug: 5724755

Change-Id: I041a112cd39e1c00dcae27e2266a95ce225e9b64
Signed-off-by: Mike Lockwood <lockwood@google.com>
2011-12-07 12:34:31 -08:00
Amith Yamasani
52cb1da2c6 am f3364080: Merge "New and improved silent mode on lockscreen." into ics-mr1
* commit 'f336408000c4be36045401fb4df89528249e7383':
  New and improved silent mode on lockscreen.
2011-12-07 11:02:51 -08:00
Amith Yamasani
6243edd818 New and improved silent mode on lockscreen.
3-state item to toggle between Silent/Vibrate/Ringer in long-press power menu.
No volume dialog on lockscreen, unless Power menu is up.

Set VIBRATE_IN_SILENT=1 when upgrading device.

Change-Id: I097d216f96c4abdbd83420e0c477106951b3607d
2011-12-06 14:48:38 -08:00
Mike Lockwood
3309386a1b AudioService: Send broadcasts when master volume and mute state change
Change-Id: I7eb5041f0c14f419317e29ea6fa7faa9159cf165
Signed-off-by: Mike Lockwood <lockwood@google.com>
2011-12-05 18:47:38 -08:00
Mike Lockwood
15cf022c70 am 1a3ece9f: Merge "MTP: Add support for restricting PTP to only certain subdirectories of the storage DO NOT MERGE" into ics-mr1
* commit '1a3ece9f871c94eb524543ae618a2a1c88cab2cd':
  MTP: Add support for restricting PTP to only certain subdirectories of the storage DO NOT MERGE
2011-12-02 13:22:28 -08:00
Mike Lockwood
7944c1b19f MTP: Add support for restricting PTP to only certain subdirectories of the storage DO NOT MERGE
Bug: 5527220

Change-Id: I81d6de590ea3002118ba46eb4b6d5fe9061c998c
Signed-off-by: Mike Lockwood <lockwood@google.com>
2011-12-02 15:12:47 -05:00
Amith Yamasani
54a7962590 am afd01086: Merge "Further volume improvements." into ics-mr1
* commit 'afd01086795c7c1f6950a709180b2361625b8b6a':
  Further volume improvements.
2011-12-02 11:23:50 -08:00
Amith Yamasani
afd0108679 Merge "Further volume improvements." into ics-mr1 2011-12-02 11:22:32 -08:00
Hong Teng
1109fe9d81 am 613ed4c6: Merge "Fixd for 5490443 Native crash while exporting a video - Add new onError callback to PreviewProgressListener, which is used to indicate video editor application for the error that has occurred during priviewing. With this modification, the applicati
* commit '613ed4c69a53e6ffb1f104c7d45a0c6dd41c8eb0':
  Fixd for 5490443 Native crash while exporting a video - Add new onError callback to PreviewProgressListener, which is used to indicate video editor application for the error that has occurred during priviewing. With this modification, the application must implement the onError method, and then VideoEditorPreviewTest.java is changed accordingly.
2011-12-02 09:33:47 -08:00
Hong Teng
613ed4c69a Merge "Fixd for 5490443 Native crash while exporting a video - Add new onError callback to PreviewProgressListener, which is used to indicate video editor application for the error that has occurred during priviewing. With this modification, the application must implement the onError method, and then VideoEditorPreviewTest.java is changed accordingly." into ics-mr1 2011-12-02 09:32:02 -08:00
Eric Laurent
c1f069bb40 am 0d3a2e93: Merge "AudioService: strengthen A2DP device detection" into ics-mr1
* commit '0d3a2e93394efa4729e5c29ff4515f9f2644b8c3':
  AudioService: strengthen A2DP device detection
2011-12-01 20:35:32 -08:00
Amith Yamasani
2ef6f1bb56 Further volume improvements.
- Remove silent mode from Power menu
- Show volume dialog on lockscreen
- Allow beeps when adjusting volume in lockscreen

Bug: 5586083
Change-Id: I93052a8ec5004c784f20e04488af9382d495e711
2011-12-01 15:05:54 -08:00
Hong Teng
63149c81ad Fixd for 5490443 Native crash while exporting a video
- Add new onError callback to PreviewProgressListener, which is
used to indicate video editor application for the error that has occurred during
priviewing.
With this modification, the application must implement the onError method,
and then VideoEditorPreviewTest.java is changed accordingly.

Change-Id: I15610b8907fcf8bd35a3c69ad7c07b5175a6e309
2011-12-01 09:43:42 -08:00
Eric Laurent
6bc7f2cd30 AudioService: strengthen A2DP device detection
If the intent BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED is broadcast
before AudioService is started, The A2DP device connection is never detected
by the audio framework resulting in audio not being routed to A2DP unless the device
is rebooted or the A2DP headset reconnected.

Make sure that A2DP device connection state is sampled when
boot completed event is received.

Issue 5665159

Change-Id: I04d82020afc00af28c5ea0bb9879ed55bcc9b6f3
2011-11-30 17:08:44 -08:00
dujin.cha
b31783b142 am eabde3d4: am fe464a76: [Prime K] Fix gabage character issue
* commit 'eabde3d4a9027a19443a31c7c7cda3d44fb0ffe0':
  [Prime K] Fix gabage character issue
2011-11-22 13:20:21 -08:00
dujin.cha
eabde3d4a9 am fe464a76: [Prime K] Fix gabage character issue
* commit 'fe464a76d8fc858be971dbb5e67b1d22fd925347':
  [Prime K] Fix gabage character issue
2011-11-22 13:18:27 -08:00
dujin.cha
fe464a76d8 [Prime K] Fix gabage character issue
Korean characters show up as gabage characters in Music player.
Reason : MTP service does not set the locale for the MediaScanner
Solution : Set locale when MtpDatabase creates MediaScanner.

Bug ID : 5567433
Signed-off-by: dujin.cha <dujin.cha@samsung.com>

Change-Id: I4bfe5f603c113170d45bd57a8709c21c665e260b
2011-11-22 10:28:21 -08:00
Mike Lockwood
b0e6d4f87f Merge "AudioManager: Add wrapper methods for master volume support" into ics-aah 2011-11-16 11:35:23 -08:00
Mike Lockwood
c614df9650 AudioManager: Add wrapper methods for master volume support
Change-Id: Ibfc24f052d05824175f71c2138ba041c94c3def7
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-11-16 11:30:47 -08:00
Mike Lockwood
47a0a8832f Merge "AudioManager: Add support for master mute" into ics-aah 2011-11-16 07:41:21 -08:00
James Dong
541e2e6695 am 4fdc36e6: Merge "Document that release() should be called with onPause() and onStop() for media objects" into ics-mr1
* commit '4fdc36e6d6003cdce911678f0b233697554f8dbf':
  Document that release() should be called with onPause() and onStop() for media objects
2011-11-15 20:16:45 -08:00
James Dong
4fdc36e6d6 Merge "Document that release() should be called with onPause() and onStop() for media objects" into ics-mr1 2011-11-15 20:13:03 -08:00
Jean-Michel Trivi
08b2d32628 am 0ddb0143: Merge "Fix 5623252 unlink to death of audio focus client early" into ics-mr1
* commit '0ddb0143895b816d4ff5c174b346390e07f26556':
  Fix 5623252 unlink to death of audio focus client early
2011-11-15 18:21:43 -08:00
James Dong
89ca6983eb Document that release() should be called with onPause() and onStop() for media objects
Change-Id: I12dd734b4314df4f0573ad56a1714348e50da05e
related-to-bug: 5616833
2011-11-15 18:08:06 -08:00
Jean-Michel Trivi
e7edc86853 Fix 5623252 unlink to death of audio focus client early
When removing an entry in the audio focus stack, don't wait for
 this object's finalizer to unlink to the death of the associated
 client, and unlink right away.
The FocusStackEntry.unlinkToDeath() method is made safe to call
 by catching the exception it can throw inside its body.

Change-Id: Id347a933d72dcb41531adff2854fb00277032cc9
2011-11-15 17:41:05 -08:00
Mike Lockwood
cfbcd3bf21 AudioManager: Add support for master mute
Change-Id: I98e87d1e266e0523c4aacb23cc5c4b3fdc7a1eac
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-11-15 09:57:33 -08:00
Jean-Michel Trivi
0dba46f9b2 am 538dc6ac: Merge "Fix 5615747 Don\'t leak remote control client death handlers" into ics-mr1
* commit '538dc6acfd14ea59f0b294531f9417ca04ca621f':
  Fix 5615747 Don't leak remote control client death handlers
2011-11-15 09:26:02 -08:00
Jean-Michel Trivi
a9509736c8 Fix 5615747 Don't leak remote control client death handlers
Whenever a remote control stack entry is GC'd or removed from
 the stack, unlink its death handler.

Change-Id: Ia4ed6667351849fd388272591e24ffc16959beaf
2011-11-14 17:30:23 -08:00
Jean-Michel Trivi
09d936feb8 am 258576a8: Merge "Fix 5607938 AudioFocusDeathHandler leaks GREF" into ics-mr1
* commit '258576a82c2293c3a988bf2dc6744fd8082421f9':
  Fix 5607938 AudioFocusDeathHandler leaks GREF
2011-11-14 14:36:11 -08:00