7385 Commits

Author SHA1 Message Date
Jean-Michel Trivi
59ff7bd243 am 09872a35: am fb059f3c: am 7a6ccb87: Merge "Remote volume changes" into klp-dev
* commit '09872a35cb09fc8dbe97d443d083d6c5b0948b90':
  Remote volume changes
2013-10-11 14:21:10 -07:00
Jean-Michel Trivi
fca1e60323 Remote volume changes
When the user plays media remotely, and presses on the volume
 keys with the screen off, verify whether not only local playback
 is active, but also if remote playback is active to see if
 the volume should be adjusted.
When adjusting the volume with screen off, adjust the remote
 volume if applicable.

When controlling volume, give priority to local media playback.

Bug 11169862

Change-Id: I88a8c003969177d50d4c1569ec6cd2a7c153a341
2013-10-11 11:36:18 -07:00
Jean-Michel Trivi
cfed3656c0 am f2177bae: am 2d06e69c: am c04337aa: Merge "Make RemoteController weakly referenced by IRemoteControlDisplay" into klp-dev
* commit 'f2177bae2da4c73bb2180efe154b3f7abb615370':
  Make RemoteController weakly referenced by IRemoteControlDisplay
2013-10-09 09:13:39 -07:00
Jean-Michel Trivi
4348a73bbe Make RemoteController weakly referenced by IRemoteControlDisplay
In the RemoteController implementation, the inner class that
 implements the IRemoteControlDisplay interface must have a weak
 link to the RemoteController instance with which it is associated,
 as MediaFocusControl and RemoteControlClient hold a strong
 reference to this binder object in a different remote process.
 Without a weak reference, any object referencing RemoteController
 couldn't be independently garbage collected without a garbage
 collection in the remote process.

Bug 8209392

Change-Id: I29e4274c45249b3cb0d3d89417c69e8fe8f62fc4
2013-10-08 15:42:31 -07:00
Jean-Michel Trivi
f90299dfbc am 47f698b8: am c38c93f4: am 1a1e24f1: Merge "Update RemoteController info when enabling/disabling it" into klp-dev
* commit '47f698b88e8be919f3cc0400fa9f1076c1df037c':
  Update RemoteController info when enabling/disabling it
2013-10-07 17:53:34 -07:00
Jean-Michel Trivi
1a1e24f18e Merge "Update RemoteController info when enabling/disabling it" into klp-dev 2013-10-08 00:45:54 +00:00
Jean-Michel Trivi
19566543c4 Update RemoteController info when enabling/disabling it
When a RemoteController listener is disabled: send its listener
 "blank" information (no artist, "stopped state"...)
When a RemoteController listener is enabled: have the current
 RemoteControlClient send the current information.

Bug 8209392

Change-Id: I375bf3c42a425ada94c61453b51669d7e819dde4
2013-10-07 17:10:08 -07:00
Rachad Alao
fe2ed8859a am 5be2d2af: am 0ed8c93c: am 00fb27dd: Merge "Camera2: add metadata override" into klp-dev
* commit '5be2d2af80716c08b8626046df8977dbf925df85':
  Camera2: add metadata override
2013-10-07 13:47:54 -07:00
Rachad Alao
00fb27dda8 Merge "Camera2: add metadata override" into klp-dev 2013-10-07 20:40:22 +00:00
Jean-Michel Trivi
49fc2590c1 am 9633629b: am 65d57713: am bacb5422: Merge "Also rely on enabled notification listeners for RemoteController registration" into klp-dev
* commit '9633629b7916b5694ae1bd960b9c08610b47b7aa':
  Also rely on enabled notification listeners for RemoteController registration
2013-10-07 10:15:48 -07:00
Jean-Michel Trivi
bacb5422bc Merge "Also rely on enabled notification listeners for RemoteController registration" into klp-dev 2013-10-07 17:04:20 +00:00
Zhijun He
b7bfdc7cf7 Camera2: add metadata override
There are interface difference between managed and native side for some
metadata, like Face and JPEG format. we need override them when they are set/get
between native and managed sides.

Also fix some issues in the CameraMetadataTest.

Bug: 10406212

Change-Id: Ibd8be0415968445e711b3ea89f45e1edfa193ee2
2013-10-07 08:02:25 -07:00
Jean-Michel Trivi
f108cdd9ee Also rely on enabled notification listeners for RemoteController registration
Registration of a RemoteController may succeed only if:
 - the caller has the MEDIA_CONTENT_CONTROL permission,
 - or if the RemoteController.OnClientUpdateListener it
   registers if one of the enabled notification listeners.

For using the "enabled notification listener" functionality,
 the CL involved:
 - making OnClientUpdateListener an interface so a 3rd-party
   application may have its implementation extend
   NotificationListenerService, which is required for a
   listener to be enabled by the user.
 - add the concept of "enabled" status in an
   IRemoteControlDisplay, so a RemoteController (which
   encapsulates the IRemoteControlDisplay implementation)
   may be registered, but later temporarily disabled by
   the user, as a result of a user action in the security
   settings, or a user switch.
 - making MediaFocusControl, the component tied to
   AudioService, monitor changes in enabled notification
   listeners, and act upon enable/disable changes.

Bug 8209392

Change-Id: Ia8dfa2156c65668b2b0d4ae92048005912652d84
2013-10-04 17:50:44 -07:00
Eric Laurent
0272b31b52 am 02f00de8: am 4b292317: am 15bcc2d8: Merge "audioservice: fix DTMF stream volume" into klp-dev
* commit '02f00de89f5173aab94b554c26cba94fe5366f94':
  audioservice: fix DTMF stream volume
2013-10-04 11:10:58 -07:00
Adam Powell
f7ee79b6bf am 3a1abeac: am cf51fefd: am c7c7f5b5: Merge "Fix docs" into klp-dev
* commit '3a1abeac3526bb772d484a16a4110241f6ab090c':
  Fix docs
2013-10-04 11:10:08 -07:00
Adam Powell
5abb64d801 am 91aa6021: am 310796de: am d6239b92: Merge "Add a scrubber to keyguard; layout tweaks" into klp-dev
* commit '91aa6021876e1690ad84ca0b3304ca7b0f925e80':
  Add a scrubber to keyguard; layout tweaks
2013-10-04 11:09:12 -07:00
Eino-Ville Talvala
0974bcbfbd am 61e5349d: am 31ea028e: am b77b7bab: Merge "Camera2: Implement idle callbacks" into klp-dev
* commit '61e5349dfbed1b09b1c99a56ef03c3ad95755ffc':
  Camera2: Implement idle callbacks
2013-10-04 09:11:24 -07:00
Eric Laurent
15bcc2d82f Merge "audioservice: fix DTMF stream volume" into klp-dev 2013-10-04 15:18:32 +00:00
Eric Laurent
24e0d9b6c4 audioservice: fix DTMF stream volume
DTMF stream must also be muted by silent mode when following ring
stream volume in order to be properly muted and unmuted when ringer
mode changes.

Also fix a problem in VolumeStreamState.setAllIndexes() when some
devices are not present in the stream state from which indexes
are copied.

Bug: 10932676.
Change-Id: I373d0fd1a475980786d97d97348d46a7e7421461
2013-10-03 18:15:07 -07:00
Adam Powell
70cb8021ef Fix docs
Change-Id: I19e0cdab6c526f7eed376fc2067b5c49b31a3ea9
2013-10-03 16:39:30 -07:00
Adam Powell
d6239b9229 Merge "Add a scrubber to keyguard; layout tweaks" into klp-dev 2013-10-03 22:35:35 +00:00
Adam Powell
f8895248e2 Add a scrubber to keyguard; layout tweaks
Switch KeyguardTransportControlView over to using RemoteController
instead of the internal API.

Guard transition animations behind a flag until we can work out some
intermittent issues.

Change-Id: Ie9f41339ce6e735c5d524db88437672f2c9859e2
2013-10-03 14:55:18 -07:00
Eino-Ville Talvala
e841d4e165 Camera2: Implement idle callbacks
- Rework camera callback binder interface
- Connect up idle, disconnect callbacks
- A few unit tests for shutter firing and idle use

Bug: 10549462
Change-Id: I8455a8a0561e366b7edeef6b101682be2ec44d79
2013-10-03 15:44:32 +00:00
Eric Laurent
587b75c3d6 am 4bf36c3e: am 8222f04e: am 0bc0f109: Merge "audioservice: always acquire wake lock as AudioService" into klp-dev
* commit '4bf36c3ecb0294c0bfac04f8d2371b64a0f2f218':
  audioservice: always acquire wake lock as AudioService
2013-10-02 09:43:43 -07:00
Lajos Molnar
06429fba90 am 36c4adf9: am 990615e3: am fcd61bb5: Merge "Fix MediaTimeProvider seek & time drift recovery issue" into klp-dev
* commit '36c4adf9f713602722ebd99c4b44137f6240fca7':
  Fix MediaTimeProvider seek & time drift recovery issue
2013-10-02 09:43:17 -07:00
Jean-Michel Trivi
4c9110fcfc am 13715943: am b4c6b241: Merge "Cache RemoteController artwork bitmap size, use it in registration" into klp-dev
* commit '13715943f24760fbeb462dd601a52af410faac20':
  Cache RemoteController artwork bitmap size, use it in registration
2013-10-01 23:10:49 -07:00
Jean-Michel Trivi
e8e560e061 am db0944de: am 60e7f819: Merge "Improve RemoteControlDisplay registration" into klp-dev
* commit 'db0944de128247e7e6016982a14513b04ac5e6f1':
  Improve RemoteControlDisplay registration
2013-10-01 23:10:46 -07:00
Eric Laurent
0bc0f109df Merge "audioservice: always acquire wake lock as AudioService" into klp-dev 2013-10-01 21:00:10 +00:00
Eric Laurent
a4dfbdc54d audioservice: always acquire wake lock as AudioService
When a wake lock is aquired while executing a binder call and released
in the message handler, AppOps complains about the uid mismatch.

Clear the binder identity before acquiring the wake lock.

Bug: 10627124.
Change-Id: Ibd5babc1ae699bffde1a659562089eb091879106
2013-10-01 12:02:10 -07:00
Lajos Molnar
fcd61bb587 Merge "Fix MediaTimeProvider seek & time drift recovery issue" into klp-dev 2013-10-01 16:37:06 +00:00
Jean-Michel Trivi
b4c6b241fb Merge "Cache RemoteController artwork bitmap size, use it in registration" into klp-dev 2013-09-30 23:24:01 +00:00
Jean-Michel Trivi
60e7f8191e Merge "Improve RemoteControlDisplay registration" into klp-dev 2013-09-30 23:22:58 +00:00
Lajos Molnar
d58b122208 Fix MediaTimeProvider seek & time drift recovery issue
Handle MEDIA_SKIPPED event

Prevent notifyTimedEvent events (REFRESH_AND_/NOTIFY_TIME)
to eclipse NOTIFY_SEEK events.

Add automatic seek when time drifts too much.  This should
not happen under normal circumstances, but is there to recover
from any unannounced media time discontinuity.

Change-Id: I8d7fdac2b0b6a9e62d2860461e6a25788e77fef8
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10954008
2013-09-30 15:50:31 -07:00
David Friedman
9da75524d1 am d42e4132: am 233a341b: am 1b8e3197: am 8c38ea39: Merge "Docs: Fixed wrong parameter in SoundPool file; fixed typo in security file. Bug: 10807931 10796994" into jb-mr2-docs
* commit 'd42e4132bafe1b7cf6a665b6a0ed3160fe3ac991':
  Docs: Fixed wrong parameter in SoundPool file; fixed typo in security file. Bug: 10807931 10796994
2013-09-30 14:16:57 -07:00
Lajos Molnar
acb1088189 am 974a6e12: Merge "Make SubtitleController thread safe" into klp-dev
* commit '974a6e1231f80644e382567c5f0a5fb9b6962d27':
  Make SubtitleController thread safe
2013-09-30 14:16:49 -07:00
Jean-Michel Trivi
86142da1ce Improve RemoteControlDisplay registration
When a new RemoteControlDisplay gets registered, don't cause all
  existing RemoteControlDisplays to re-receive RemoteControl
  information they already have.

Bug 8417073

Change-Id: Icc8e7104d6870f748fddd702692789dbaef948ac
2013-09-29 16:57:08 -07:00
Jean-Michel Trivi
8ab8c2d061 Cache RemoteController artwork bitmap size, use it in registration
Allow an app to set the artwork configuration at any point
  regardless of the registration state, and cache the width/height
  values.
If the RemoteController is already registered, apply them.
If the RemoteController is not registered, use the cached value
  when the object gets registered.

Bug 10862527

Change-Id: If633e2b9383e7d59690288d2271113e98b195cd8
2013-09-29 12:17:13 -07:00
David Friedman
d42e4132ba am 233a341b: am 1b8e3197: am 8c38ea39: Merge "Docs: Fixed wrong parameter in SoundPool file; fixed typo in security file. Bug: 10807931 10796994" into jb-mr2-docs
* commit '233a341b6d9477f7f41d5a954fa7f7a150972ccb':
  Docs: Fixed wrong parameter in SoundPool file; fixed typo in security file. Bug: 10807931 10796994
2013-09-27 15:57:56 -07:00
Lajos Molnar
974a6e1231 Merge "Make SubtitleController thread safe" into klp-dev 2013-09-27 22:57:22 +00:00
Lajos Molnar
29f5183794 Make SubtitleController thread safe
Add the concept of an anchor looper.
Allow show/hide/selectTrack/selectDefaultTrack to be called from thread
other than anchor looper.

Change-Id: Iaf2f3d3c46d1b00a0a24156745ec16b301c80c04
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10919206
2013-09-27 14:55:36 -07:00
David Friedman
233a341b6d am 1b8e3197: am 8c38ea39: Merge "Docs: Fixed wrong parameter in SoundPool file; fixed typo in security file. Bug: 10807931 10796994" into jb-mr2-docs
* commit '1b8e319784a1bb166aaa6b0f1dc306f8d4b6e57f':
  Docs: Fixed wrong parameter in SoundPool file; fixed typo in security file. Bug: 10807931 10796994
2013-09-27 10:37:07 -07:00
David Friedman
1b8e319784 am 8c38ea39: Merge "Docs: Fixed wrong parameter in SoundPool file; fixed typo in security file. Bug: 10807931 10796994" into jb-mr2-docs
* commit '8c38ea39203016dde95bc5dd68f27f6f45096784':
  Docs: Fixed wrong parameter in SoundPool file; fixed typo in security file. Bug: 10807931 10796994
2013-09-27 10:30:01 -07:00
David Friedman
36b692d8ef Docs: Fixed wrong parameter in SoundPool file; fixed typo in security file.
Bug: 10807931 10796994

Change-Id: I8c8e07c3e8606d5983c2545fa6638af45650d27c
2013-09-27 10:04:48 -07:00
Marco Nelissen
4cce5d76df am 6e14f9bc: am 2c702990: Merge "Fix logic in fallback ringtone handling" into klp-dev
* commit '6e14f9bc9086edf1112ea5e7f5f010251b65f926':
  Fix logic in fallback ringtone handling
2013-09-26 13:01:20 -07:00
Marco Nelissen
2c70299029 Merge "Fix logic in fallback ringtone handling" into klp-dev 2013-09-26 19:56:13 +00:00
Marco Nelissen
19a4671b10 Fix logic in fallback ringtone handling
The existing code would only play a fallback ringtone if the requested
ringtone was one of the three ringtone uris that are defined by settings,
and it wasn't set to "silent".
Now it also plays the fallback for custom ringtone uris.

b/10891718

Change-Id: I79c2298c6497165e6845b98532cce0855347e50b
2013-09-26 12:44:55 -07:00
Zhijun He
fd128ff0d6 am b208861e: am aea8ec1a: Merge "Camera2: Fix Camera integration test deadlock" into klp-dev
* commit 'b208861ef74442ff888e1aaed61b95077364d685':
  Camera2: Fix Camera integration test deadlock
2013-09-26 10:12:09 -07:00
Zhijun He
aea8ec1a73 Merge "Camera2: Fix Camera integration test deadlock" into klp-dev 2013-09-26 17:06:49 +00:00
Zhijun He
7b7a154026 Camera2: Fix Camera integration test deadlock
The problem was: when SurfaceTexture is used, test didn't acquire/release
images when they are produced, then it starves the producer and
cause deadlock. This change replaces SurfaceTexture with ImageReader, release
every image produced immediately.

Bug: 10360518
Change-Id: I9aabaee23013277c2da6f5825ac931bc10511fbc
2013-09-25 19:33:31 -07:00
Zhijun He
72dd6c0f4c am fbf38016: am 822ac0ba: Merge "Camera2: Implement CameraManager#getCameraCharacteristics" into klp-dev
* commit 'fbf38016371d2827969429feadc7414a7eb7809d':
  Camera2: Implement CameraManager#getCameraCharacteristics
2013-09-25 17:05:05 -07:00