Commit Graph

7309 Commits

Author SHA1 Message Date
Jaewan Kim
bbce3333fc MediaSessionManager: Add getSession2Tokens()
This currently only returns tokens with the TYPE_SESSION.
Follow up CLs will change this to also return tokens with other types.

Bug: 122234817
Test: Build and flash manually.
Change-Id: Ia2f67983393696439020d5ea58976b9ed1662566
2019-01-11 16:54:11 +09:00
Dichen Zhang
c54940f204 Merge "jWakeLock" 2019-01-10 01:26:35 +00:00
TreeHugger Robot
f85b3162d7 Merge "MediaRecorder:add note for setMaxFileSize/Duration" 2019-01-09 21:37:04 +00:00
TreeHugger Robot
ed954eb7e6 Merge "MediaPlayer2: add back convenient API's for current data source." 2019-01-09 01:09:21 +00:00
TreeHugger Robot
95cb8e40ca Merge "Make PlaybackInfo implement Parcelable" 2019-01-09 00:27:30 +00:00
Dichen Zhang
8022ba126a jWakeLock
replace native binder with java PowerManager in JWakeLock

Test: MediaPlayer2Test
Bug: 122470692
Change-Id: I1e5871a50ecac4b0785f064801107e4b6035889a
2019-01-08 14:30:18 -08:00
Ray Essick
4c2d5d8c63 Merge "Synchronize mediarecorder.h and MediaRecorder.java" 2019-01-08 17:22:54 +00:00
TreeHugger Robot
e6baf1a446 Merge "Resolve hidden API usage of Handler constructor" 2019-01-08 04:41:31 +00:00
Ray Essick
be2e0e8824 Synchronize mediarecorder.h and MediaRecorder.java
These two files: frameworks/base/media/java/android/media/MediaRecorder.java
and frameworks/av/media/libmedia/include/media/mediarecorder.h have
separate definitions of output formats. The java side was missing the
definition for HEIF format.

Bug: 120134664
Test: manual
Change-Id: I1176aa1b7b688c9670183652461169fbe19682df
2019-01-07 18:37:12 -08:00
Hyundo Moon
98e819216c Make PlaybackInfo implement Parcelable
This CL makes MediaController.PlaybackInfo implement Parcelable, and
replaces ParcelableVolumeInfo with the class.

Bug: 122243794
Test: make update-api -j; make -j;
Change-Id: I89d3df721a43e8c1454dbb3bdcb0b34c943339ce
2019-01-07 15:23:04 +09:00
TreeHugger Robot
48c2c2751a Merge "MediaSession2: Tell framework about new MediaSession2" 2019-01-07 06:00:10 +00:00
Insun Kang
2166933f2f Resolve hidden API usage of Handler constructor
Previous code uses hidden constructor of Handler to set its messages
to be asynchronous. This replaces it with Message#setAsynchronous(),
which is public.

Bug: 122047488
Test: build
Change-Id: I06a958d1bea1c3c0f104c4380fce6084f8e7bad9
2019-01-07 14:05:35 +09:00
Jaewan Kim
7ad39875fd MediaSession2: Tell framework about new MediaSession2
Bug: 122234817
Test: Build and flash manually.
Change-Id: If210762c51d33e72ea09e6328eea435b68d2eaa4
2019-01-07 10:40:18 +09:00
TreeHugger Robot
30635a95d2 Merge "Unhide MediaItem2" 2019-01-07 00:23:45 +00:00
TreeHugger Robot
38a00d89c5 Merge "MediaPlayer: handle concurrency on mTimeProvider" 2019-01-05 03:22:58 +00:00
Wei Jia
ab715166ee MediaPlayer: handle concurrency on mTimeProvider
Bug: 118341983
Test: cts
Change-Id: Ieaf082b7dbc3cb93c2398e935ead77ca1810c62a
2019-01-04 15:24:15 -08:00
Gopalakrishnan Nallasamy
40056f4afd MediaRecorder:add note for setMaxFileSize/Duration
Added note about the side effects of setting a very large file size and duration using methods
setMaxFileSize and setMaxDuration respectively.

Bug: 62071579

Test: make offline-sdk-docs
      Added notes were visible in MediaRecorder.html

Change-Id: I7542da0bb55af286ac0c4c736ef783d8f4a4918a
2019-01-04 10:49:02 -08:00
TreeHugger Robot
9839414d27 Merge "Remove unnecesaary constants of Session2Command" 2019-01-04 08:56:50 +00:00
Sungsoo Lim
d922e0d659 Unhide MediaItem2
Bug: 122334310
Test: pass MediaItem2Test
Change-Id: Icfdefec07071c897e1d70601fa3ff5d21e80e18c
2019-01-04 15:14:22 +09:00
Hyundo Moon
7053844db7 Revert "Introduce ControllerCallbackLink"
This reverts commit e521669b5d.

Reason for revert: Another CL will be uploaded which makes the APIs public, not @SystemApi.

Bug: 122169124
Change-Id: Ie9ed1067596fe1724879e81d768ac8252eda7841
2019-01-04 14:27:45 +09:00
Hyundo Moon
fcaaba066a Revert "Introduce SessionCallbackLink"
This reverts commit 8eee83e594.

Reason for revert: Another CL will be uploaded which makes the APIs public, not @SystemApi.

Bug: 121239657
Change-Id: I0537ffd487ab6889213b8917615156caaec17eb5
2019-01-04 14:20:47 +09:00
TreeHugger Robot
ecf7b4fed5 Merge "MediaController: Use Context#getPackageName() for RemoteUserInfo" 2019-01-03 19:51:16 +00:00
Jeff Sharkey
c54ffd28f7 Merge "MediaStore should reflect state on disk." 2019-01-03 17:56:17 +00:00
Jean-Michel Trivi
9958c94e4d Merge "Dynamic audio policies: multi-zone through uid/device affinity" 2019-01-03 16:16:50 +00:00
TreeHugger Robot
a9ccb72194 Merge "Implement cancelSessionCommand" 2019-01-03 10:02:56 +00:00
Sungsoo Lim
2d4fe896e2 Remove unnecesaary constants of Session2Command
As ABI, we don't need to have all the constants defined
in AndroidX media2.

Bug: 121230641
Test: build
Change-Id: Ic6a8e1bfa8a3251a97fa5609542eabbfda1ebbac
2019-01-03 15:32:18 +09:00
Sungsoo Lim
c6cfa0f74b Implement cancelSessionCommand
Also this CL adds missing getter methods of MediaSession2.

Bug: 122055262
Test: build
Change-Id: I4a3108ca89982e9482b8c0aa8920caad9a4d79c8
2019-01-03 14:47:13 +09:00
Jean-Michel Trivi
d6f65dea01 Dynamic audio policies: multi-zone through uid/device affinity
Augment dynamic audio policies with audio device affinity for
 apps (a.k.a multi-zone handling), to enable associating apps
 with a set of audio devices (which may form a "zone" in cars).

Bug: 111647296
Test: requires device with routing policy started by CarService
Change-Id: I2994ae80624556d9321f788a0575d9f732157228
2019-01-02 12:38:12 -08:00
Jeff Sharkey
96afa169f7 MediaStore should reflect state on disk.
It's an index of data scanned from disk, and it's been misleading to
let people mutate that data directly in MediaStore, since those
edits aren't durable in any way.  We never updated the metadata in
the underlying files, so any changes would be lost when moving
between devices.

This change moves to always re-scan files after they've been edited,
to ensure we pick up metadata changes.  It also ignores direct edit
attempts from apps.

Bug: 120711487
Test: atest android.media.cts.MediaScannerTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I4cc3ae24d6c6b5f01fe4bb47610ccf162c81ce83
2019-01-02 11:46:50 -07:00
Jaewan Kim
ffdb53d759 MediaController: Use Context#getPackageName() for RemoteUserInfo
Bug: 111817607, Bug: 111817367
Test: Manual test, incluing the scenario at b/110525559
Change-Id: I8dd39073dd8ae4a912e2a20db5493767b9e1d400
2019-01-02 20:18:34 +09:00
Hyundo Moon
c61fc6897c Merge "Introduce SessionCallbackLink" 2019-01-02 11:03:50 +00:00
Hyundo Moon
8eee83e594 Introduce SessionCallbackLink
In order to avoid direct AIDL usages in framework, this CL introduces a
new class SessionCallbackLink which can prevent usages of
ISessionCallback.

Also, this CL renames ControllerCallbackLink.asBinder() to
ControllerCallbackLink.getBinder().

Bug: 121239657
Test: make update-api -j / make -j
      atest CtsMediaTestCases:android.media.cts.MediaSessionTest
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest
Change-Id: Icbcc4b045b1f6933c63d0d87aedc23b28c03d2de
2019-01-02 15:40:16 +09:00
Sungsoo Lim
aea2438616 Provide a way to get the command result
Bug: 122055262
Test: build
Change-Id: Icc6c2c791461df5d47479e82592895fc84b1974e
2018-12-31 20:40:43 +09:00
Sungsoo Lim
e7fe2a260d Implement sendSessionCommnad
Bug: 122055262
Test: build
Change-Id: Ia3269e6bafa4b79ab94bfafedc2c14f75fe84dd8
2018-12-31 20:40:29 +09:00
TreeHugger Robot
b7f8f718d6 Merge "Handle disconnection of MediaSession2/Controller2" 2018-12-31 11:14:17 +00:00
Sungsoo Lim
cfd36a5ab5 Handle disconnection of MediaSession2/Controller2
Bug: 122055262
Test: build
Change-Id: I388ab76beb8fc41b47e8f6310cc0bcb79b6acc9f
2018-12-31 17:01:53 +09:00
TreeHugger Robot
1ebc3f0d7e Merge "Introduce ControllerCallbackLink" 2018-12-31 07:43:55 +00:00
Hyundo Moon
e521669b5d Introduce ControllerCallbackLink
In order to avoid direct AIDL usages in framework, this CL introduces a
new class ControllerCallbackLink which can prevent usages of
ISessionControllerCallback.

Bug: 122169124
Test: make update-api -j / make -j
      atest CtsMediaTestCases:android.media.cts.MediaSessionTest
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest
Change-Id: I860ea56afc046dd91e065ef207d374c0aa490c8f
2018-12-31 15:05:15 +09:00
TreeHugger Robot
4c4d22265d Merge changes I9cab65f9,I1773aa05
* changes:
  Add MediaSession2 builder and update JAVADOCs
  Add init MediaSession2 and MediaController2
2018-12-31 04:08:11 +00:00
TreeHugger Robot
6118bf44cc Merge "Change the value of AudioManager#FLAG_FROM_KEY" 2018-12-31 03:50:26 +00:00
Sungsoo Lim
938e8e91e8 Add MediaSession2 builder and update JAVADOCs
Bug: 122055262
Test: build
Change-Id: I9cab65f9b09cbe5d5570e4de649ffdff09b20b80
2018-12-31 11:46:04 +09:00
Sungsoo Lim
f894f77d49 Add init MediaSession2 and MediaController2
This CL only covers the connection logic between MediaSession2
and MediaController2.

Bug: 122055262
Test: build
Change-Id: I1773aa053ea1fce0cc548f334416e47d373f7f86
2018-12-31 11:45:46 +09:00
Andy Hung
2e961480fe MediaCodecInfo: Fix getSupportedSampleRates for null array
Test: MediaCodecTest#testPCMEncoding
Bug: 122116282
Change-Id: I3d7e16d130a6653e95e285b38678a8b4946319d7
2018-12-28 15:19:20 -08:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
Jaewan Kim
5999fd7ec3 Merge "Media2: Initial commit of Session2Token" 2018-12-28 04:38:40 +00:00
Jaewan Kim
e1af131a37 Media2: Initial commit of Session2Token
Test: Build
Bug: 121233595
Change-Id: Ib568013f3b7a2d358fd38a937faddaa17925923a
2018-12-27 22:56:39 +09:00
Sungsoo Lim
bf37bd47fd Add Session2Command and Session2CommandGroup
Bug: 121230641
Test: build
Change-Id: Id9d79c90e99db7b78467cf3811d6dff667335a2e
2018-12-27 15:08:44 +09:00
Hyundo Moon
ca0080d919 Change the value of AudioManager#FLAG_FROM_KEY
As suggested by API review, this CL changes the value of FLAG_FROM_KEY
from 1 << 12 to 1 << 16. Also expands Javadoc of the flag as suggested.

Bug: 121325822
Test: make update-api -j / make -j
Change-Id: Ie40c609c717c68a97b01d88f68ce8ff465e3a89e
2018-12-27 13:47:52 +09:00
TreeHugger Robot
51cf66745a Merge "MediaRecorder:edit javadoc for vorbis encoder" 2018-12-26 21:48:46 +00:00
Gopalakrishnan Nallasamy
2675ac3c16 MediaRecorder:edit javadoc for vorbis encoder
MediaRecorder.AudioEncoder has unsupported VORBIS audio encoder constant declared. Edited javadoc
comment for the same as optional support.

Bug: 120211083

Test: make offline-sdk-docs
      - edited comment visible in MediaRecorder.AudioEncoder.html#VORBIS

Change-Id: I3294d9a768a8f439579f238ee2f1db93f20bc178
2018-12-26 11:48:41 -08:00