Commit Graph

361191 Commits

Author SHA1 Message Date
Sungsoo Lim
df0e8fdffd Remove MediaPlaylistController, add MediaPlaylistAgent
MediaPlaylistAgent is the abstract class an application needs to
derive from to pass an object to a MediaSession2 that will override
default playlist handling behaviors. It contains a set of notify*
methods to signal MediaSession2 that playlist-related state has
changed.

Bug: 64098437
Test: make update-api
Change-Id: Icb3c57ddc14eba276f49d4ba85f11adbeb3e0917
2018-03-07 16:41:19 +09:00
Jaewan Kim
87086f59ad MediaSession2: Add SessionCallback#onCurrentMediaItemChanged()
Added callback for session to know the currently playing media item has
changed.

Note that the callback is called in response to the
MediaPlayerBase#PlayerEventCallback#onCurrentDataSourceChanged(mpb, dsd
is called. Session will translate dsd to the media item and calls
onCurrentMediaItemChanged().

Following changes are also included
  - Removed MediaPlaylistController#getCurrentPlaylistItem(),
    because currently playing item is managed by the MediaPlayerBase.
  - Renamed ControllerCallback#onCurrentPlaylistItemChanged() to the
    ControllerCallback#onCurrentMediaItemChanged(), to make it more
    obvious that the event is from MediaPlayerBase, not
    MediaPlaylistController.
  - Added SessionCallback#onCurrentMediaItemChanged()

Bug: 64098437
Test: Run MediaComponents test
Change-Id: I78b124a7da0f968b097b2576507b9a73e36081ec
2018-03-07 16:31:56 +09:00
Jaewan Kim
4d4a8c95ae MediaSession2: Add onDataSourceMissingHelper
This allows a developer to create DataSourceDesc when the item is about
to be played. Typical example of the usages are,

    1. For a playlist consists of FileDescriptors, its developer may not
        want to open all files when MediaSession2.setPlaylist() is
        called.
    2. A controller has called setPlaylist(), addPlaylistItem(), or
        replacePlaylistItem(). Controller cannot know the
        DataSourceDesc, and only the session developer can know about
        it.

Bug: 64098437
Test: Run MediaComponents test
Change-Id: I73f27ca0a799b1cddf5046b41f0ca01d08037103
2018-03-07 16:31:53 +09:00
TreeHugger Robot
8c76ca0341 Merge "Fix Telecom dumpsys timestamps" into pi-dev 2018-03-07 03:52:28 +00:00
TreeHugger Robot
1eb1ff31fc Merge "Remove toString() for CarrierIdentifier." into pi-dev 2018-03-07 03:44:31 +00:00
TreeHugger Robot
9aa32d0e71 Merge "Add APP_AUTO_RESTRICTION_ENABLED" into pi-dev 2018-03-07 02:32:17 +00:00
TreeHugger Robot
1c22ed2712 Merge "Changing Slog.wtf to Slog.w" into pi-dev 2018-03-07 02:09:34 +00:00
Scott Main
655d98bdb5 Merge "Fix javadoc typo causing broken links" into oc-mr1-dev
am: ac2cdc0dba

Change-Id: Ib8d63b1bfcc20e398314501a51bd2fad76a8d10e
2018-03-07 01:54:15 +00:00
Scott Main
ac2cdc0dba Merge "Fix javadoc typo causing broken links" into oc-mr1-dev 2018-03-07 01:39:45 +00:00
Scott Main
bda0cc9c3c Fix javadoc typo causing broken links
Change-Id: I988e06100562c574bbda1bb530359da289062d65

bug: 74262753
2018-03-07 01:39:29 +00:00
TreeHugger Robot
d7cf0e1635 Merge "Add feature flag for audio output switcher." into pi-dev 2018-03-07 01:38:53 +00:00
TreeHugger Robot
948e1c502f Merge "Update background ANR setting text" into pi-dev 2018-03-07 01:09:44 +00:00
TreeHugger Robot
f9500e9c01 Merge "Atom: ResourceConfigurationChanged" into pi-dev 2018-03-07 00:41:35 +00:00
Holly Jiuyu Sun
435c213e9d Remove toString() for CarrierIdentifier.
We may get NPE if mCarrierIdentifier is null. + should convert it to
string by itself.

Test: test on phone
Merged-In: Ibd352d6d2a9b0cb33a494d108eb0d3a7c1dbc61b
Change-Id: Ibd352d6d2a9b0cb33a494d108eb0d3a7c1dbc61b
2018-03-06 16:40:27 -08:00
Chavi Weingarten
76439d832f Merge "Fix wallpaper screenshot" into pi-dev 2018-03-07 00:34:07 +00:00
Hall Liu
074d2338fa Fix Telecom dumpsys timestamps
Change the dumpsys timestamps to use java.time for processing and always
log events with local timezone that was in effect at the time the event
happened.

Bug: 74250969
Test: manual, run dumpsys
Change-Id: Ie53cff4400be1528b3224bd556536a689ef22c8c
2018-03-06 16:26:32 -08:00
TreeHugger Robot
04f2800d53 Merge "Fix GnssMeasurement JNI for 1.1" into pi-dev 2018-03-07 00:20:34 +00:00
TreeHugger Robot
2b00eaed27 Merge "IME API: rename IMS methods." into pi-dev 2018-03-07 00:19:55 +00:00
TreeHugger Robot
c6d01893aa Merge "Update strings that refer to the OS" into pi-dev 2018-03-07 00:11:33 +00:00
Jaewan Kim
ccf41b87a9 Merge changes from topic "session2-pi-listcallback" into pi-dev
* changes:
  MediaSession2: Pass player info for the callbacks from MediaPlayerBase
  MediaSession2: Add MediaPlaylistController.PlaylistEventCallback
2018-03-07 00:02:09 +00:00
Rob Carr
540a2903cd Merge "Assign leash layer when starting animations." into pi-dev 2018-03-06 23:45:37 +00:00
Suprabh Shukla
9550cd9577 Changing Slog.wtf to Slog.w
Removing a wtf that was added temporarily.

Test: Builds, boots.

Fixes: 70677313
Change-Id: I129920b4a4c96abcd7f40c8077f6597208ed84cc
2018-03-06 15:42:53 -08:00
TreeHugger Robot
c26a909f63 Merge "Move com.android.managedprovisioning package constant to config.xml" into pi-dev 2018-03-06 23:38:36 +00:00
TreeHugger Robot
b88b9640cb Merge "Hide overlay notification" into pi-dev 2018-03-06 23:33:28 +00:00
Doris Ling
1af6f81488 Add feature flag for audio output switcher.
Bug: 74130772
Test: rebuild
Change-Id: I06224975550ab4017d1546b182af083a36c0eacc
2018-03-06 15:17:10 -08:00
Ashutosh Joshi
196cf03f44 Merge "Update OWNERS" into pi-dev 2018-03-06 23:13:45 +00:00
TreeHugger Robot
e9238246b7 Merge "MediaSession2: Ask server whether a controller is trusted" into pi-dev 2018-03-06 23:06:18 +00:00
Mike Digman
4ef95e2531 Merge "Reset user rotate pref on navbar create" into pi-dev 2018-03-06 23:04:54 +00:00
Dianne Hackborn
16268a69d6 Merge "Fix issue #72116995: Add permission guarding Service#startForeground" into pi-dev 2018-03-06 23:04:16 +00:00
TreeHugger Robot
69598bbef5 Merge "Exclude from Recents Assistant in half-screen mode" into pi-dev 2018-03-06 23:00:25 +00:00
Chen Xu
b15225cd88 Merge "API review: rename CarrierIdentification to Carrier id" into pi-dev 2018-03-06 22:57:32 +00:00
TreeHugger Robot
d4033e8eac Merge "Add more tests for MemoryStatUtil" into pi-dev 2018-03-06 22:50:28 +00:00
Michael West
0d155259be Merge "Add set-time and set-timezone shell cmds to alarm service" into pi-dev 2018-03-06 22:41:40 +00:00
TreeHugger Robot
8fa420c261 Merge "Stop invoking secdiscard when deleting password data" into pi-dev 2018-03-06 22:37:43 +00:00
TreeHugger Robot
9015d24332 Merge "Using UserManagerInternal for access control instead of UserManager" into pi-dev 2018-03-06 22:37:09 +00:00
TreeHugger Robot
6ee203d632 Merge "Update default charging sound to new sound" into pi-dev 2018-03-06 22:33:24 +00:00
TreeHugger Robot
c0f025b253 Merge "Adds instant app visibility to instumentation" into pi-dev 2018-03-06 22:28:53 +00:00
TreeHugger Robot
4f22580938 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-03-06 22:27:20 +00:00
TreeHugger Robot
51239f23dc Merge "Import translations. DO NOT MERGE" into pi-dev 2018-03-06 22:26:22 +00:00
TreeHugger Robot
7ed02e2060 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-03-06 22:21:48 +00:00
TreeHugger Robot
344907b937 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-03-06 22:20:13 +00:00
TreeHugger Robot
6ae8c53786 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-03-06 22:19:54 +00:00
TreeHugger Robot
8e7bfb494f Merge "Import translations. DO NOT MERGE" into pi-dev 2018-03-06 22:19:50 +00:00
TreeHugger Robot
29d047bab8 Merge "WallpaperColors hint computation" into pi-dev 2018-03-06 22:16:50 +00:00
TreeHugger Robot
1543a4ea0d Merge "Import translations. DO NOT MERGE" into pi-dev 2018-03-06 22:06:58 +00:00
TreeHugger Robot
595dd3f75a Merge "Import translations. DO NOT MERGE" into pi-dev 2018-03-06 22:05:06 +00:00
Chavi Weingarten
fb6531d3df Merge "Only set appToken.setCanTurnScreenOn to false if screen was turned on." into pi-dev 2018-03-06 22:04:35 +00:00
Lucas Dupin
8715cf78f1 Merge "Increase char limit of keyguard messages" into pi-dev 2018-03-06 21:55:48 +00:00
TreeHugger Robot
45e75a9c4c Merge "Import translations. DO NOT MERGE" into pi-dev 2018-03-06 21:54:25 +00:00
TreeHugger Robot
67f9d52502 Merge "Add an app-ops check when registering for location" into pi-dev 2018-03-06 21:51:43 +00:00