Commit Graph

45 Commits

Author SHA1 Message Date
Mathew Inwood
36292fc9e2 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: I6518440a7b0de8292ad05b4df9f0f9580d18b2a5
2019-06-28 09:21:36 +00:00
Hyundo Moon
bb07e9bc5c Remove MediaParceledListSlice
Bug: 132233794
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
      atest CtsMediaTestCases:android.media.cts.MediaSessionManagerTest;
      atest CtsMediaTestCases:android.media.cts.MediaSession2Test;
      atest CtsMediaTestCases:android.media.cts.MediaController2Test;
      atest CtsMediaTestCases:android.media.cts.MediaSession2ServiceTest;
Change-Id: I0a5c576b3fc9d2e236256d8f9f4e992914b147be
2019-05-09 17:11:44 +09:00
Hyundo Moon
83ff14c310 Move Media 1.0 files in mainline back to framework
Test: make update-api -j; make -j;
atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
Change-Id: Ie30f0ca86bd9303683bf6573f2f5858c6fb3206a
2019-01-30 22:03:04 +09:00
Sungsoo Lim
4e475438ad Move MediaBrowser API into updatable media
Bug: 119539966, Bug: 119538799
Test: build and boot,
    atest CtsMediaTestCases:android.media.cts.MediaBrowserTest,
    atest CtsMediaTestCases:android.media.cts.MediaBrowserServiceTest
Change-Id: I7afed77e61506a1b4ea57ac41eee62bfcda01a74
2019-01-24 04:45:47 +09:00
Hyundo Moon
eb9bf73b21 Remove Constructor of RemoteUserInfo which takes IBinder
This CL reverts the API change in previously merged CL
"b505f0a: AML: Unhide 4-params constructor of RemoteUserInfo".

Bug: 119752205, Bug: 122550211
Test: make update-api -j; make -j;
      atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserServiceTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserServiceTest;
Change-Id: I5d6835af4d931c001287126c394db48d65bb09f8
2019-01-23 14:41:37 +09:00
Hyundo Moon
3e8c1c9d71 AML: Apply changes under frameworks/av to frameworks/base
This CL copies the AML-related changes under frameworks/av to
frameworks/base. This CL includes changes in following merged commits:

a003298 AML: Replace ParceledListSlice
b82512b AML: Remove use of Bundle#setDefusable
70b92a4 AML: Use config_mediaMetadataBitmapMaxSize which is @SystemApi
b4dbc2d Replace hidden Parcel.(read|write)CharSequence usages

Bug:122711373, Bug:122432476
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserServiceTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserServiceTest;
Change-Id: I1a13e0ae71097caa90f677bc19b7864929dbc20f
2019-01-22 12:09:40 +09:00
Mathew Inwood
e3807372f7 Add @UnsupportedAppUsage annotations
For packages:
  android.service.wallpaper
  android.service.vr
  android.service.voice
  android.service.trust
  android.service.textservice
  android.service.restrictions
  android.service.resolver
  android.service.quicksettings
  android.service.power
  android.service.pm
  android.service.persistentdata
  android.service.oemlock
  android.service.notification
  android.service.media
  android.service.gatekeeper
  android.service.fingerprint
  android.service.euicc
  android.service.dreams
  android.service.diskstats
  android.service.chooser
  android.service.carrier
  android.service.battery
  android.service.autofill
  android.service.appwidget
  android.service

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I51645d8a8cdce3015749fc27e34830e822ef41ae
2018-08-10 09:51:03 +01:00
Jaewan Kim
74ee5b36a0 Differentiate MediaBrowsers in a process for MediaBrowserService
MediaBrowserService#getCurrentControllerInfo() can have more fine
grained differentiation for multiple MediaBrowser in a package/process

Bug: 79728675
Test: Run CtsMediaTestCases
Change-Id: Ibc5076ea5ec40f059297b1e7bda9edef7107556e
2018-05-19 08:37:03 +09:00
Hyundo Moon
c2f557a49e MediaBrowserService: Create getCurrentBrowserInfo()
Bug: 65739365
Test: Ran MediaBrowserServiceTest
Change-Id: I629d74bcf9a08a2271463fecbacc2d998dce4387
2018-03-29 11:28:28 +09:00
Kai Wang
bbf55bb7ae Merge "MediaBrowserService: Clean up ConnectionRecord when browser is dead" into oc-mr1-dev 2017-09-05 20:40:25 +00:00
kai
8e67b4d9f1 MediaBrowserService: Clean up ConnectionRecord when browser is dead
This CL cleans up connectionRecords when binder dead and the connection
is lost.

Bug: 65132577
Test: check the number of ConnectionRecord, kill the media app, check
      the number again.
Change-Id: I8b31745bcee220b9e70c3f43d7fc9d8dc3f6b83a
2017-09-01 10:50:01 -07:00
Sungsoo Lim
be87b68039 Do not call ItemCallback after disconnected
Bug: 64119114
Test: Passed MediaBrowserTest
Change-Id: Icf3283710abe7c03f4a73532b33ec2a306d2280b
2017-08-03 04:48:48 +00:00
Sungsoo
10993ea5a3 MediaBrowser: Revert Search API
Bug: 36844917, Bug: 36524926, Bug: 36525667
Test: Pass MediaBrowserTest and MediaBrowserServiceTest
Change-Id: I07db20cc5ea30e8b68faa1dd6fc955a2a2153259
2017-04-13 09:38:59 +09:00
Hyundo Moon
0e6215391d Modify JavaDoc of MediaBrowserService.getBrowserRootHints
The method MediaBrowserService.getBrowserRootHints can be called
inside of onSearch(), but the JavaDoc does not mention it.
This CL adds this information in the JavaDoc.

Test: Called getBrowserRootHints inside of onSearch method.
Change-Id: If82a371c8d06aab396e29141827c8991cff2cd3e
2017-03-03 13:24:53 +09:00
TreeHugger Robot
cc2a4210d7 Merge "Revert "MediaBrowserService: Add a constant for suggestion keywords"" 2017-01-18 23:35:29 +00:00
Sungsoo
8fb6addcbe MediaBrowser: Introduce the search API
Bug: 28210241
Test: passed cts test (MediaBrowserServiceTest and MediaBrowserTest)
Change-Id: I73c58f5385637c626da1503d27e518b4f0c9ea80
2016-12-12 11:27:33 +09:00
Sungsoo Lim
cab79f7d59 Revert "MediaBrowserService: Add a constant for suggestion keywords"
This reverts commit 43635ca3f7.

Change-Id: I328f7e0add71c54cc4806810f784732ff17a16bb
2016-11-21 04:48:51 +00:00
Sungsoo
d570d5ca3c MediaBrowser: Make ItemCallback can take a null media item
When the implementation of MediaBrowserService returns null,
ItemCallback.onError was called, but the JavaDoc is saying that
ItemCallback.onItemLoaded can be called with a null result.

This CL makes ItemCallback.onItemLoaded be able to take a null result,
and ItemCallback.onError be called when the implementation doesn't override
the onLoadItem method or when the returned object is not MediaItem.

Bug: 27808084
Change-Id: I97cfd83786f8f857dc9551e5b0a358962f98e4a2
2016-08-30 14:23:38 +09:00
Sungsoo Lim
43635ca3f7 MediaBrowserService: Add a constant for suggestion keywords
EXTRA_SUGGESTION_KEYWORDS will be used for denoting specific keywords
which will be considered when the browser service suggests media items.

Bug: 28210241
Change-Id: I3831c0819f9d3ffa3fdd628031063069a5a62006
2016-07-01 15:57:59 +09:00
Sungsoo Lim
6d1910fc0d MediaBrowserService: Fix ConcurrentModificationException
Bug:29438709
Change-Id: Ide54ef7daf4ef78d43485c72e91fd63bc4f99144
2016-06-20 09:28:14 +09:00
Jae Seo
bd6c16908d MediaBrowserService: Add more explanation on getBrowserRootHints()
Bug: 28840985
Change-Id: If4dbcaaa23093b2e6d5ab6158db67b1248464fb8
2016-05-19 14:17:27 -07:00
Sungsoo Lim
6b7bda0bc3 MediaBrowser: Make support lib v23.x available in N release
A workaround change for supporting support lib 23.x in N release.
This change should be reverted in some point before O release.

Bug: 28572934
Change-Id: I7e6afc0293688e425736bc93da0ea10233c07e9a
2016-05-07 17:45:40 +09:00
Sungsoo Lim
51ccdb0f39 MediaBrowserService: Provide a way to retrieve root hints
Bug: 28075963
Change-Id: Id8993e67732a2dda5bf75ecab6037dbbba8c8c99
2016-04-15 14:37:36 -07:00
Sungsoo Lim
84c462d322 Use a binder instead of a bundle in removeSubscriptionWithOptions
Bug: 27845319
Change-Id: I0264b39940481f6571187a42ec859ecf4967ae62
2016-04-12 16:28:33 +09:00
Sungsoo Lim
0799bd07d7 MediaBrowser: Make EXTRA_PAGE zero-based
Bug: 27948393
Change-Id: I97fb6b5f13ffb8e006ed4a7efc06e7f45fb5121a
2016-04-04 11:14:10 +09:00
Sungsoo Lim
88a03d6e62 MediaBrowser: Applying API Review
unsubscribe() should accept the Callback used to call subscribe()
as the identifying key for what to unsubscribe, not the options
Bundle used to call subscribe.

Bug: 27384292
Change-Id: I0a5664d35983fcbdb6f9e60fd35acac813daf0c7
2016-03-14 17:18:03 +09:00
Sungsoo Lim
97243a8ff2 MediaBorwserService: Update javadoc
Bug: 26733259
Change-Id: I7240149c0cbbacf221e466908e6ebc201d603c5f
2016-03-04 14:47:23 +09:00
Sungsoo Lim
64f16f1dc1 MediaBrowserService: Make SubscriptionCallback.onError be called
Bug: 26733259
Change-Id: I8324e1c56e87071e781550ac0701e632a4122e73
2016-03-02 14:08:18 +09:00
Sungsoo Lim
77dc4bb09e Minor changes on MediaBrowser
- Rename add and remove in Subscription putCallback and removeCallback
  for better readability.
- Fix a broken link of javadoc.

Change-Id: If41941d1134d4ee6ef953932ca572f5d445a2aff
2016-02-16 15:20:44 +09:00
Jae Seo
0cc5a9d8f6 MediaBrowser: Add extra lookup keys to specify media items to retrieve
Bug: 25821318, Bug: 25153123, Bug: 25153113
Change-Id: I50cc99439a4a6dd714cf7bfd0950e2583554668a
2016-02-05 12:52:17 +09:00
Sungsoo Lim
8e3fb58621 MediaBrowser: Minor fixes
- Change double spaces to a single space.
- Add IntDef annotation.
- Use a plural noun for 'flag'.
- Check parentId using TextUtils.isEmpty().

Change-Id: Ic268e543a60fbe281a4deaa24d4d9bde9c0bc22d
2016-02-01 21:54:52 +09:00
Sungsoo Lim
d67933e271 MediaBrowser: Make support lib work properly
Do not change the methods signature and order of methods in
MediaBrowser related AIDL files. A change of the method signatures
or the order could break the support library.

Bug: 26841304
Change-Id: Id8c013eafc38c1a716df63dd86f446bc9c9ff21d
2016-01-29 15:21:07 +09:00
Sungsoo Lim
41c28a3eb1 MediaBrowser: Support pagination of child media items
Bug: 23289404, Bug: 25564520
Change-Id: I156d34735d6c00bca6f4d63fe754951febf552a5
2016-01-27 13:19:26 +09:00
Jae Seo
082e873999 Add a class Javadoc for MediaBrowser.MediaItem
Also fixed a typo in MediaBrowserService.

Bug: 26181781, Bug: 26182458
Change-Id: I1f672f8111a70ad9c16e9969d0fad0e504fefb8a
2015-12-19 14:38:48 +09:00
Sungsoo Lim
2189f58ec5 MediaBrowser: Handle null results properly in onLoadChildren
Bug: 19127753
Change-Id: I7ddad87e5ec6338a74c340485fed583107709acf
2015-11-16 14:46:29 +09:00
Jeff Brown
b7eff8828f Fix MediaBrowser.getItem() API inconsistencies.
Bug: 21668207
Change-Id: Idc8d3a079f66cc7bc4fa1016f84cddb26fe7f0f8
2015-06-10 20:06:24 -07:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
RoboErik
b1c88103fe Add getMediaItem API to MediaBrowser
This adds all the plumbing for supporting a getMediaItem call in
MediaBrowser.

Will also need to add a support lib component to make it backward
compatible.

Change-Id: I528e9ebaf4e0fe386f346ef85c14973168a380df
2015-01-26 14:37:05 -08:00
RoboErik
7554d099e7 Reload MediaBrowser children on each call to subscribe
Only one callback can be set on a given media id on MediaBrowser. When you
try to subscribe with a new callback it replaces the old callback, but it
wasn't resending the child data for the id. This causes calling subscribe
again also cause the data to be reloaded and sent to the app again.

bug:18683452
Change-Id: I2d30dbbbfe07cb9a720fb6d65664c1c4c58cb637
2015-01-07 10:14:04 -08:00
RoboErik
fd228a383c Make setting the session token in MediaBrowserService synchronous
The MusicDemo was depending on the fact that setting the session token
is done synchronously and that getSessionToken can be called immediately
after. This makes setting the token synchronous again but leaves the
post to update any MediaBrowsers that are waiting on a connection.

This does introduce a small race condition if an app tries to set it
twice from different threads, but this is a very unlikely situation
and MediaBrowserService is not guaranteed to be thread safe.

bug:18603085
Change-Id: Id934c9f3b6520225cd92d1d8a6e2b3d606b8c6c8
2014-12-04 14:48:38 -08:00
RoboErik
d64c425f32 Delay calling onConnected until a session is set in MediaBrowser
This will delay all calls to onConnected from the MediaBrowserService
until a session token has been set. This also requires making it an
exception to try setting the session twice.

bug:18052336
Change-Id: Iecf186c53364183e1696af83a855c8db3294a5d0
2014-11-24 12:35:20 -08:00
Andrew Solovay
4034546812 docs: Removed broken link to non-existent method.
Doc had included link to method MediaBrowserService.onLoadIcon().
Per bug http://b/17205016 that method was removed before release.

Revised doc is staged to:

http://asolovay.mtv.corp.google.com:9650/reference/android/service/media/MediaBrowserService.Result.html

(Note that the other "See Also" link, which I didn't remove, is badly
formatted because Javadoc seems to choke on links to methods that are
passed generic types. JoeFernandez@, if you can suggest a better way
to format that link I'll make that change too.)

bug: 18229650
Change-Id: Ic55ae8b9edc6dd314cf5acc306abd8a9d5f71134
2014-11-04 01:25:26 +00:00
RoboErik
92e565f715 rename SERVICE_ACTION to SERVICE_INTERFACE
For API consistency this intent is suppose to be named SERVICE_INTERFACE.

bug:17390782
Change-Id: I4c3b1d8476dd6c939792f73615e92d7bfa6d5758
2014-09-04 14:06:34 -07:00
RoboErik
c692d05951 Update MediaBrowser to use String ids instead of Uris
Since we converted MediaDescription over to using a String media id
for identifying everything we should also use Strings in the browser
service to make it clear that it should re-use that field.

bug:17333205
Change-Id: I5fd5762bdad05068f5b1aa36074306b43432e686
2014-08-29 15:16:19 -07:00
RoboErik
3625bf72cb Update to MediaBrowser APIs per council feedback
Does all the updates in the bug except the loadIcon/loadBitmap
methods, which are removed per feedback from Sharkey.

bug:17205016
Change-Id: Ie84d4d25a59c6985ce16972c26c8d1e5c02ff5c9
2014-08-28 21:11:22 +00:00