Commit Graph

6639 Commits

Author SHA1 Message Date
Jack He
369a8fdfe6 Merge "Bluetooth: Enable in-band ringing in vibration mode (1/4)" into pi-dev am: cbb8cd77d5
am: e58e7bf155

Change-Id: Iaf338b1dcc1036deb9fb5a67a12f4ae1b63e032b
2018-03-23 09:02:36 +00:00
TreeHugger Robot
cbb8cd77d5 Merge "Bluetooth: Enable in-band ringing in vibration mode (1/4)" into pi-dev 2018-03-23 08:22:56 +00:00
Sungsoo Lim
1b681749ce Merge "Use SessionPlaylistAgent in MediaSession2Impl" into pi-dev am: ff1c9fa576
am: da1a34f4fc

Change-Id: Ia09e298f793c95fe79cf28c6e553151effa7ca1f
2018-03-23 08:05:47 +00:00
Hyundo Moon
c0e40846c0 Merge "MediaSession2: Protect MediaSessionManager APIs with permission" into pi-dev am: 9e5a7f2a63
am: 07d23014b3

Change-Id: Ia0fdc6d9808b8270c7e344d187a427ab959e3ecc
2018-03-23 07:49:42 +00:00
TreeHugger Robot
ff1c9fa576 Merge "Use SessionPlaylistAgent in MediaSession2Impl" into pi-dev 2018-03-23 07:08:08 +00:00
Jaewan Kim
b63abdac2b Merge "MediaSession2: Add more detailed documentation for addPlaylistItem()" into pi-dev am: e41b39d6e9
am: 9ee3dcbd65

Change-Id: I1a91abc52be1e0b3be31581409dfad3db1fc3000
2018-03-23 06:34:27 +00:00
Jack He
6dd78c1759 Bluetooth: Enable in-band ringing in vibration mode (1/4)
* Add AudioSystem.FOR_VIBRATE_RINGING mode to match the native layer
  AUDIO_POLICY_FORCE_FOR_VIBRATE_RINGING force mode
* Switch to this mode when Bluetooth SCO is connected
* Modify AudioService.muteRingerModeStreams() method to not mute ringer
  volume when Bluetooth SCO is ON. Also, when ringer is unmuted, mirror
  speaker ringtone volume on Bluetooth SCO ringer

Bug: 72647074
Test: Call phone in vibration mode and hear ringtone on HFP enabled
      headset, verify that ringtone is only played through headset.
      Then disconnect headset and call again to verify that ringtone
      does not play through phone speaker in vibration mode.

Change-Id: I7d642020710c085f0e1f27c750c74b0e2fb57398
2018-03-23 06:14:33 +00:00
Hyundo Moon
9e5a7f2a63 Merge "MediaSession2: Protect MediaSessionManager APIs with permission" into pi-dev 2018-03-23 06:07:17 +00:00
Jean-Michel Trivi
9f504f3118 Merge "Merge "Hide Media*2 APIs" into pi-dev am: d847d7d0a9" into pi-dev-plus-aosp
am: afe151935a

Change-Id: I40f0b08af3387975e4ca30f6da38b6942ee21077
2018-03-23 06:00:08 +00:00
John W. Bruce
ddf83bb028 Merge "Document CryptoInfo Settings for CENC 2016 & HLS Audio" into pi-dev am: 6ab6a9d433
am: 889da15d94

Change-Id: I9ef9a16a6175840f8f72800400bcdc6d2ec9684e
2018-03-23 04:33:54 +00:00
Jaewan Kim
e41b39d6e9 Merge "MediaSession2: Add more detailed documentation for addPlaylistItem()" into pi-dev 2018-03-23 02:47:25 +00:00
Jean-Michel Trivi
d847d7d0a9 Merge "Hide Media*2 APIs" into pi-dev 2018-03-23 01:12:14 +00:00
Julia Reynolds
45723486bd Merge "Add vol up + power ringer toggle gesture" into pi-dev am: 224e2fb2ef
am: b598333775

Change-Id: I0bc60476384fed3dd5febaf2b27d5affcd9e9c72
2018-03-23 01:07:07 +00:00
TreeHugger Robot
6ab6a9d433 Merge "Document CryptoInfo Settings for CENC 2016 & HLS Audio" into pi-dev 2018-03-23 01:02:30 +00:00
Jean-Michel Trivi
3a582e73c1 Hide Media*2 APIs
Bug: 76121592
Test: make offline-sdk-docs
Change-Id: Ic5eba5ba0b3ef9f11c582ab6db7d8d61934941dd
2018-03-22 16:30:14 -07:00
John W. Bruce
6da8f88296 Document CryptoInfo Settings for CENC 2016 & HLS Audio
Adds additional documentation that clarifies how to set up CryptoInfo
objects for CENC 2016 decryption schemes, in particular for the case of
HLS SAMPLE-AES Audio.

Bug: 62503021
Test: make docs
Change-Id: Ia21ef62a4144e7b41b0216ba0b968ff6c52d0297
2018-03-22 15:58:21 -07:00
Julia Reynolds
224e2fb2ef Merge "Add vol up + power ringer toggle gesture" into pi-dev 2018-03-22 22:03:48 +00:00
Mikhail Naganov
d51f47e193 Merge "Audio presentation: Docs & Testability fixes" into pi-dev am: 397962981c
am: 0056af933e

Change-Id: I588333753dab8f67e14b1521f6695ecbe5920af3
2018-03-22 16:57:05 +00:00
TreeHugger Robot
397962981c Merge "Audio presentation: Docs & Testability fixes" into pi-dev 2018-03-22 16:14:19 +00:00
Mike Digman
5527286e08 Add vol up + power ringer toggle gesture
It only runs when the screen is on.

Test: manual, invoking gesture with different system settings
Bug: 75252670
Change-Id: I934d0bbb0a9fffecf34ebaadf77f3e1241d4faf7
2018-03-22 10:55:24 -04:00
Hyundo Moon
f84c1c067a MediaSession2: Protect MediaSessionManager APIs with permission
Bug: 73226436
Test: Locally created custom CTS methods and run
Change-Id: Iec5d0900b30f9ec19faa5beb11a83f4e5696b57e
2018-03-22 23:55:21 +09:00
Jaewan Kim
f73bc870c0 MediaSession2: Add more detailed documentation for addPlaylistItem()
Bug: 73149584
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: Ifc16e9d4ee210ac901941d8f3a6a228aa3f1ddd8
2018-03-22 21:29:03 +09:00
Christofer Åkersten
85701d1043 Merge "Remove unnecessary Context from ApiLoader" into pi-dev am: bf121d2f13
am: 0f524c02b2

Change-Id: I648e9a39a7c546cedae9b20cc264dc88d9598473
2018-03-22 12:07:20 +00:00
Sungsoo Lim
5d7e96b1d1 Use SessionPlaylistAgent in MediaSession2Impl
Bug: 74090741
Test: SessionPlaylistAgentTest, MediaComponentTests
Change-Id: I3f5ad7ab233fb1be51c5211b12a8292b173f3738
2018-03-22 20:44:29 +09:00
Christofer Åkersten
6bd3ab6dc6 Remove unnecessary Context from ApiLoader
Bug: 76001644
Test: compile
Change-Id: I6ac81dac16374d90facfe33c68607c5c286b335f
2018-03-22 14:55:55 +09:00
TreeHugger Robot
607282adf6 Merge "AudioService: check permission on forceVolumeControlStream" 2018-03-22 01:48:40 +00:00
Philip P. Moltmann
6951f56be0 Add SoundTriggerDetectionService am: 18e3eb8168
am: 9dd3e7d300

Change-Id: I13fd3f3d896825ddaf7cf5017eb027e5469208fb
2018-03-21 09:16:32 +00:00
Chong Zhang
19c88e2989 Merge "Merge "heif: address api review comments" into pi-dev am: ffb6521082" into pi-dev-plus-aosp
am: 9079589e0c

Change-Id: I13e3e5884e6ec6a86e587fa667e01cafe63850de
2018-03-21 06:58:03 +00:00
Philip P. Moltmann
9dd3e7d300 Add SoundTriggerDetectionService
am: 18e3eb8168

Change-Id: I4bb7ada74c36df4a64956c9c36a1675aad1f6645
2018-03-21 06:00:01 +00:00
TreeHugger Robot
6ed6340e3c Merge changes from topic "SoundTriggerJobService-steps" into pi-dev
* changes:
  Throttle number of sound trigger operations / day
  Add SoundTriggerDetectionService
  Expose SoundTriggerManager and SoundTrigger APIs
2018-03-21 03:27:56 +00:00
TreeHugger Robot
ffb6521082 Merge "heif: address api review comments" into pi-dev 2018-03-21 01:04:15 +00:00
Philip P. Moltmann
18e3eb8168 Add SoundTriggerDetectionService
The service is meant to replace the PendingIntent based API. Once all
users of the PendingIntent based API switched the PendingIntent based API
will be removed.

To have as little as possible impact on the whole SoundTrigger framework
the RemoteSoundTriggerDetectionService class implements the same
interface as the PendingIntent based class. Hence the exising code has
very little change. Further once the old code can be removed the amount
of changed (and added) code is limited.

The RemoteSoundTriggerDetectionService -> SoundTriggerDetectionService
is a vanilla as possible service implementation. The special behaviors
are:
- The system holds a wakelock while service operations are in progress
and the service is bound as foreground. Hence the service can e.g.
listen to the microphone.
- Service operations have a certain amount of time they are allowed to
run. Once every operation is either finished or the the operation
exceeded the allotted time, the system calls onStopOperation for each
still pending operation. This is a similar model as for the commonly
used JobService.
  Please note that if the time allowed for an operation is 15s and
op1 was run as 0si, and op1 was run at 5s, the service is allowed to run
until 20s. Hence _both_ onStopOperations will happen at 20s. This is
done for ease of implementation but should not give the service more
power than calling onStopOperation exactly 15s after each operation is
triggered.
- If an operation is done before the allotted time is reached, the
service can declare the operation as finished manually by calling
onOperationFinished. This is a call back into the system, hence a
'client' binder is sent to the service. If the operation is finished
by calling this method onStopOperation will not be called.
- As the service instance might be killed and restored between
operations we add a opaque bundle 'params' to each operations. The users
of the API can use this to send data from the start command to the
operations. It can also just be set to null. The params are not meant to
store changing state in between operations. Such state needs to be
persisted using the regular methods (e.g. write it to disk)
- A service can be used for multiple recognition sessions. Each
recognition is uniquelity defined by its sound model UUID. Hence each
operation gets at least tree arguments: Operation ID, sound mode UUID, params
- As a small optimization the params are cached inside of the service
instance.

The time allowed for each operation is in a @SystemAPI global setting,
so the service can make sure it finishes the operations before they are
stopped. It might take some time to deliver the operations via the
binder, hence it is not recommended to try to use every last ms of
allotted time.

Test: atest SoundTriggerDetectionServiceTest (added in separate CL)
      atest android.provider.SettingsBackupTest
Change-Id: I47f813b7a5138a6f24732197813a605d29f85a93
Fixes: 73829108
2018-03-20 13:57:14 -07:00
Paul Mclean
128f093ee8 Merge "(re)integrating Native MIDI API into NDK - base API" 2018-03-20 19:43:14 +00:00
Jean-Michel Trivi
60eddfde30 AudioService: check permission on forceVolumeControlStream
Check MODIFY_PHONE_STATE  permission on
   AudioManager.forceVolumeControlStream

Test: manual: verify UI can still select between two stream volumes

Change-Id: I50da25d50829193c9f9d7761bb6e58d1aa5cf3f4
2018-03-20 17:43:06 +00:00
Emilian Peev
a481fdf08f Merge "Camera: Populate Image tranformation in reader and writer" into pi-dev am: d41fed72c7
am: b05f2511e2

Change-Id: I273321efbb1691fdbfe5610e19aa084cd47c6e9a
2018-03-20 13:07:55 +00:00
TreeHugger Robot
d41fed72c7 Merge "Camera: Populate Image tranformation in reader and writer" into pi-dev 2018-03-20 12:33:37 +00:00
Emilian Peev
450a5ffdfd Camera: Populate Image tranformation in reader and writer
"ImageReader" and "ImageWriter" must pass information about the
specific buffer transformation.
Currently only the "ImageReader" implementation of the
"android.media.Image" abstract classs will populate the
corresponding transformation, the remaining implementations will
use the default identity tranformation.

Bug: 75316204
Test: Manual using test application,
Camera CTS

Change-Id: If5c12134fbbef8cc20c3d369986ba613bc4f2cec
2018-03-19 16:19:43 +00:00
Jaewan Kim
4a56163d19 Merge "MediaSession2: Implement fastForward() / rewind()" into pi-dev am: d65bb20283
am: 9d54368ecf

Change-Id: I6e860ef4eff3a7128e2f6169ebe7fb761a91d8d8
2018-03-19 11:18:28 +00:00
Jaewan Kim
83bc984a6c MediaSession2: Implement fastForward() / rewind()
Bug: 74724709
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: Ibd313dc6eed82a5d7cc9fc156f7851aba13f9e29
2018-03-19 17:39:02 +09:00
Christofer Åkersten
161bf09120 Merge "Remove Context requirement from updatable" into pi-dev am: ac16fb5d41
am: f8f74a5e6d

Change-Id: I0a999e6863145243ee7bb17d34bde19825bb110f
2018-03-19 04:25:40 +00:00
Christofer Åkersten
72a86922d4 Remove Context requirement from updatable
Bug: 74843539
Test: runtest-cts-MediaComponents && atest VideoView2Test
Change-Id: Iba5422f8d092205316ec3fa2c10da6d3f983fde6
2018-03-17 18:56:28 +09:00
Hyundo Moon
6df7c2c3a7 MediaSession2: Implement getPlayerState/Position/BufferedPosition am: 78e4f84f04
am: 5563e8f5de

Change-Id: I79ff65c6e5a70f0bc6a693c9b84ac17d4133380e
2018-03-16 10:06:51 +00:00
Hyundo Moon
78e4f84f04 MediaSession2: Implement getPlayerState/Position/BufferedPosition
Bug: 74578458
Test: Passed CTS
Change-Id: If215e8e16bdce9fdc04ca18ed8d08ed374d13a98
2018-03-16 18:03:17 +09:00
Jaewan Kim
c9871326dd Merge "MediaSession2: Implement PlaylistParams replacements" into pi-dev am: 328df91d99
am: 05ccd347d1

Change-Id: I547d96c04a7b4264dbb29ccf55bac44b74138acd
2018-03-16 07:05:14 +00:00
Jaewan Kim
2d7cfda523 Merge "MediaSession2: Remove MediaSession2#registerPlayerEventCallback()" into pi-dev am: eb8e914ea7
am: d28a13b41e

Change-Id: Iec8385c88d8b5951b588ba71a09123faf415e541
2018-03-16 05:03:07 +00:00
Jaewan Kim
f4abf4a0fe Merge "MediaSession2: Remove onPlaylistChanged() without metadata" into pi-dev am: 9cc144850f
am: 94454404a5

Change-Id: If65047774343ba0d6a6676dac2885a7f73559a97
2018-03-16 04:51:33 +00:00
Jaewan Kim
f10ca2f960 MediaSession2: Implement PlaylistParams replacements
This includes following changes
  - Remove PlaylistParams
  - Implement PlaylistParams replacements. Here's the list.
    - get/setShuffleMode()
    - get/setRepeatMode()
    - Note: Playlist metadata APIs are already submitted (b/74174649)

Bug: 74116823, Bug: 74118768
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: I0267ffeaf92257eb7b81ffc8b6a3f40b5a2f6f9c
2018-03-16 12:21:29 +09:00
Hyundo Moon
9182a7964a Merge "MediaSession2: Convert DataSourceDesc to MediaItem2 in MyPlayerEventCallback" into pi-dev am: b0179a3a44
am: 0cbac17c98

Change-Id: Ia32f2e68d1317bfbc5aab20b6b255d3a59c45207
2018-03-16 03:04:54 +00:00
Wei Jia
15bae53fe0 Merge "MediaPlayer2Impl: fix null object reference." into pi-dev am: 2d76c3ce82
am: ce07768acf

Change-Id: Ida5bacd7c9a2a5f9680ec200d1ad012412515bcc
2018-03-16 02:10:01 +00:00
Jaewan Kim
8e17db5554 MediaSession2: Remove MediaSession2#registerPlayerEventCallback()
Bug: 74157064
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: Ia976c0ebe9f2b7eff0ae603db96ab106aa045cbc
2018-03-16 10:59:32 +09:00