Commit Graph

19662 Commits

Author SHA1 Message Date
Tomasz Wasilczyk
ca507e9f90 Merge "Implement front-end support for HAL 2.0 metadata." into pi-dev am: 71b71dada7
am: 32b5f83b0a

Change-Id: Ibb4d123f0d59284a138f7d9630f4e8816225fefd
2018-03-08 02:00:13 +00:00
Tomasz Wasilczyk
32b5f83b0a Merge "Implement front-end support for HAL 2.0 metadata." into pi-dev
am: 71b71dada7

Change-Id: Ia6f5dedecdd7530c0df106cf24942eae958d832f
2018-03-08 01:33:27 +00:00
Tomasz Wasilczyk
fc67739432 Implement front-end support for HAL 2.0 metadata.
Bug: 73816100
Test: instrumentation
Change-Id: I1d4e9094f7a2eaf13a14f5fa560a391fcbae9804
2018-03-07 22:36:24 +00:00
Tyler Gunn
c7a86b14a8 Merge "API Documentation and Constant cleanup." am: 8882c55b21 am: 8917fc21cc
am: 168a77237f

Change-Id: I7860fcd813f25adaaccf632f2c61dd4138a0a889
2018-03-07 21:09:48 +00:00
Tyler Gunn
168a77237f Merge "API Documentation and Constant cleanup." am: 8882c55b21
am: 8917fc21cc

Change-Id: Ic4a159b838c952594b0860ded69fc07c74180961
2018-03-07 20:56:29 +00:00
yinxu
7374689302 Merge "Merge "Address the API review comments." am: 322ff16301 am: 904826d293" into pi-dev-plus-aosp
am: c71071cf89

Change-Id: I858ca48ed78a648beea729e4ddf3caacdf3b7740
2018-03-07 19:39:44 +00:00
Treehugger Robot
8882c55b21 Merge "API Documentation and Constant cleanup." 2018-03-07 19:33:52 +00:00
yinxu
cd56112962 Merge "Address the API review comments." am: 322ff16301
am: 904826d293

Change-Id: I4de5c601e23004c934684d995bb916b654a42247
2018-03-07 19:15:01 +00:00
Jason Monk
b3e0e62938 Merge "Remove BIND_SLICE" into pi-dev am: 23b73c45fb
am: e62fb572cf

Change-Id: I951e8666b455a6e2d288f6d7392c00a1964b32ac
2018-03-07 18:43:21 +00:00
Jason Monk
23b73c45fb Merge "Remove BIND_SLICE" into pi-dev 2018-03-07 18:01:26 +00:00
TreeHugger Robot
33d783fce6 Merge "TextClassifierService.onSelectionEvent" 2018-03-07 17:44:23 +00:00
Treehugger Robot
322ff16301 Merge "Address the API review comments." 2018-03-07 17:40:20 +00:00
Beverly
1cf28b4990 Merge "System sounds get its own dnd toggle" into pi-dev am: 5a169cf2f6
am: dd333ffb28

Change-Id: Idb2d6232174dffd81d26639e8041ef07b211f830
2018-03-07 17:09:36 +00:00
TreeHugger Robot
5a169cf2f6 Merge "System sounds get its own dnd toggle" into pi-dev 2018-03-07 16:39:40 +00:00
Abodunrinwa Toki
c6a56a31b7 TextClassifierService.onSelectionEvent
Bug: 67609167
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.logging.SelectionEventTest
Change-Id: Ib5af1ec80a38432d1201fbc913acdc3597d6ba82
2018-03-07 12:50:33 +00:00
Sungsoo Lim
b69db671b4 Merge changes from topics "mplc", "session2_onDataSourceMissingHelper" into pi-dev am: be1033fda2
am: e09bf4f7cd

Change-Id: I3180681e4ca55ace1b3de87a360b880208937598
2018-03-07 08:38:49 +00:00
Jaewan Kim
5c44f9f0ab MediaSession2: Add SessionCallback#onCurrentMediaItemChanged() am: 87086f59ad
am: 37e3316bde

Change-Id: Ie202cea8fd16670180552428fd913cf161aed67e
2018-03-07 08:35:01 +00:00
Jaewan Kim
87e1bc08b1 MediaSession2: Add onDataSourceMissingHelper am: 4d4a8c95ae
am: a062aa3afe

Change-Id: I279f108ae063907910178fc74f073705fc0ed87e
2018-03-07 08:32:41 +00:00
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
Tarandeep Singh
01041c97ff Merge "IME API: rename IMS methods." into pi-dev am: 2b00eaed27
am: 327c666924

Change-Id: I49cfc349a87cd6b9d116b67102178d0bf6219f3d
2018-03-07 03:38:54 +00:00
Jaewan Kim
f45bfd9336 Merge changes from topic "session2-pi-listcallback" into pi-dev am: ccf41b87a9
am: f5dbd73523

Change-Id: Ic2612572d94d08c81777abf0a9f7100b0770f75e
2018-03-07 02:41:04 +00:00
Dianne Hackborn
5e2b2444fe Merge "Fix issue #72116995: Add permission guarding Service#startForeground" into pi-dev am: 16268a69d6
am: e1d41bd8fa

Change-Id: I54e0f981b267dbd6ad3e956bac8505187baeffea
2018-03-07 01:36:41 +00:00
TreeHugger Robot
2b00eaed27 Merge "IME API: rename IMS methods." into pi-dev 2018-03-07 00:19:55 +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
Dianne Hackborn
16268a69d6 Merge "Fix issue #72116995: Add permission guarding Service#startForeground" into pi-dev 2018-03-06 23:04:16 +00:00
Chen Xu
b15225cd88 Merge "API review: rename CarrierIdentification to Carrier id" into pi-dev 2018-03-06 22:57:32 +00:00
Andrew Grieve
1a8248a3b1 Merge "Merge "Expose Process.isIsolated()" into pi-dev am: 6ddf443d15" into pi-dev-plus-aosp
am: 8b2817d0e1

Change-Id: I496fef1dad9c8c62f0d0ccbeab5d5a05ef092cee
2018-03-06 20:26:43 +00:00
Andrew Grieve
e7bb5673fe Merge "Expose Process.isIsolated()" into pi-dev
am: 6ddf443d15

Change-Id: I02cb0a0bb503201ea4b4e9ca4961e5687a51e6d8
2018-03-06 19:45:12 +00:00
Jason Monk
0f73c65958 Remove BIND_SLICE
Its not being used anymore and shouldn't be API.

Test: update-api
Fixes: 74240589
Change-Id: I27d8e3fa5e0570ff268e6160c683d7190c96ef9b
2018-03-06 18:39:15 +00:00
Andrew Grieve
0fec93682e Expose Process.isIsolated()
Rather than have a process attempt to perform IO / IPC and check if it
fails, it makes much more sense to expose this getter.

My specific motivation for exposing this information more directly is to
be able to perform process-specific initialization logic in
Application.attachBaseContext():

https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java?rcl=ac2e180a1265f88dd4030bb35d69f5d0b2dc488d&l=54

Bug: 73343822
Test: Same code that's used in Chrome via reflection.
Change-Id: I1505962679da36ac42401230b204bff7b3376b73
2018-03-06 17:17:43 +00:00
Treehugger Robot
c18b175d87 Merge "Update the RTT features constant." 2018-03-06 16:07:16 +00:00
Jaewan Kim
42a36c341d MediaSession2: Pass player info for the callbacks from MediaPlayerBase
Player can be updated meantime, and player event from the previous
player can be sent after the update. Providing player information will
provide developers more opportunity to filter out unecessary callbacks.

Bug: 64098437
Test: Run MediaComponents test
Change-Id: I9c23101df139e26351c008462c726ae7069130eb
2018-03-07 00:12:14 +09:00
Jaewan Kim
273130dc9a MediaSession2: Add MediaPlaylistController.PlaylistEventCallback
This includes following changes per offline discussion
  - Add MediaPlaylistController.PlaylistEventCallback
  - Add following APIs to the MediaPlaylistController
    * registerPlaylistControllerCallback() /
      unregisterPlaylistControllerCallback()
    * getRepeatMode() / setRepeatMode()
    * getShuffleMode() / setShuffleMode()
    * setPlaylist() with metadata
    * setPlaylistMetadata() / getPlaylistMetadata()
  - Add following APIs to the SessionCallback
    * onMediaPrepared()
    * onPlayerStateChanged()
    * onBufferingStateChanged()
  - Remove following methods from ControllerCallback
    * onPlaylistChanged()

Bug: 64098437
Bug: 74157064
Test: passed MediaComponentTest
Change-Id: I5ad12a9a5d6a7d9e23a577dca8ea26fbacb8f259
2018-03-07 00:11:25 +09:00
Beverly
d696476fb3 System sounds get its own dnd toggle
- Added logic for streams to be muted by dnd (unassociated with ringer)

Test: runtest -x frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
Bug: 73362490
Change-Id: I1101e67282f7331497e91eb510d2bf4f1ea6b4b1
2018-03-06 09:08:29 -05:00
Wei Jia
8e398bb1cf Merge "MediaPlayer2: clarify sync/async for API's" into pi-dev am: 97d579d1ee
am: 3a4a27cf4c

Change-Id: Ic95343af3d1e190e2ad71ce31e0f616d86416e29
2018-03-06 10:03:29 +00:00
Wei Jia
3a4a27cf4c Merge "MediaPlayer2: clarify sync/async for API's" into pi-dev
am: 97d579d1ee

Change-Id: I26d1541c0d016181be09afdb172715fda3dc41dc
2018-03-06 08:07:34 +00:00
Chen Xu
c42ad0ceae Merge "API review: rename CarrierIdentification to Carrier id" am: f01600d5f9 am: ce7404744f
am: 1f56d18fd1

Change-Id: If3f000c6213fb24fc964c8450cfb55a70653b863
2018-03-06 02:37:52 +00:00
Tarandeep Singh
164cfba536 IME API: rename IMS methods.
Incorporating API Review feedback:
* Use IMS.switchInputMethod(id) instead of IMS.setInputMethod()
* Use IMS.switchInputMethod(id, subtypeId) instead of
  IMS.setInputMethodAndSubtype()
* Renamed switchToLastInputMethod() to switchToPreviousInputMethod()

Bug: 73954137
Test: atest InputMethodServiceTest
Test: atest CtsInputMethodServiceHostTestCases
Change-Id: I6efd5ca473e33e6faeadb7eea7772b9d2b8ca12b
2018-03-06 02:23:15 +00:00
Chen Xu
1f56d18fd1 Merge "API review: rename CarrierIdentification to Carrier id" am: f01600d5f9
am: ce7404744f

Change-Id: Iad12593f9e027052185f9efcb65a1983dda22a16
2018-03-06 01:00:36 +00:00
Dianne Hackborn
dd027b3ab2 Fix issue #72116995: Add permission guarding Service#startForeground
Now requires permission if targeting P.

Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services.  The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.

Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: I883c9515c307ed8e39f0bf888c4045944c8183ac
2018-03-05 16:59:21 -08:00
Wei Jia
d526bc3b88 MediaPlayer2: clarify sync/async for API's
Test: MediaPlayer2 plays
Bug: 63934228
Change-Id: I48b73c75311dbb31dcebe7c7a38e444d7dc65ed8
2018-03-05 16:40:59 -08:00
fionaxu
62bc747275 API review: rename CarrierIdentification to Carrier id
Bug: 73953797
Test: unit test
Change-Id: Id89c9100e8963a3cb890ebec347e4aabcd5fd4b8
(cherry picked from commit 4281d0ff57)
Merged-in: Id89c9100e8963a3cb890ebec347e4aabcd5fd4b8
2018-03-05 15:50:34 -08:00
Chen Xu
f01600d5f9 Merge "API review: rename CarrierIdentification to Carrier id" 2018-03-05 22:59:21 +00:00
Abodunrinwa Toki
2013208587 Merge "Merge textclassifier/logging/ into textclassifier/" 2018-03-05 15:07:40 +00:00
TreeHugger Robot
ca4aef51f6 Merge "Tag @SystemApi to ambient brightness stats API" 2018-03-05 14:50:07 +00:00
Adrian Roos
9bbd9661c0 DisplayCutout API: Make constructor public and adjust javadoc
Change-Id: I093cf4f9ea60f00e187aeb4a548f3f5789d87fa1
Fixes: 73953880
Test: make update-api
(cherry picked from commit d61db603fe)
2018-03-05 13:52:32 +00:00
Adrian Roos
c95edd4704 Merge "DisplayCutout API: Make constructor public and adjust javadoc" 2018-03-05 12:50:56 +00:00
TreeHugger Robot
3a4f974c91 Merge "AID: Change loop to repeat and set from xml" 2018-03-05 01:23:19 +00:00