Commit Graph

19661 Commits

Author SHA1 Message Date
Chalard Jean
fdcef03493 Merge "Deprecate most of NetworkInfo." am: 92a9847de9
am: c8b846e1ac

Change-Id: Ia00fbfa38a28583198278df2a94642ed8139d7d1
2018-03-09 13:12:08 +00:00
Chalard Jean
8117f93a49 Deprecate most of NetworkInfo.
getType, getTypeName, isConnectedOrConnecting, isConnected,
isAvaisable, isFailover, isRoaming, getState, getDetailedState,
getReason, and the TYPE_* constants in ConnectivityManager
along with methods that use them are now stacked on a boat
bound for the other side of the Styx.

Test: no code changes
Bug: 62844794
Change-Id: Idd70763de5b1af5580b4734cd443ac4b570069cc
2018-03-09 15:38:25 +09:00
Tarandeep Singh
7dba49739b Merge "Make few of the new IMS API methods final" into pi-dev
am: 8e64eee8dc

Change-Id: Iba222fe7e0752b7161e82b77d28dbe636f1bca7a
2018-03-09 06:10:43 +00:00
Changwan Ryu
dd6ec01ece Merge "Expose WebView#onCheckIsTextEditor" into pi-dev
am: ebe856a90e

Change-Id: I1aa2c3d27c4b11248451aec3723d4eeef8bdbb90
2018-03-09 06:05:45 +00:00
TreeHugger Robot
8e64eee8dc Merge "Make few of the new IMS API methods final" into pi-dev 2018-03-09 02:01:24 +00:00
TreeHugger Robot
ebe856a90e Merge "Expose WebView#onCheckIsTextEditor" into pi-dev 2018-03-09 01:57:57 +00:00
Tyler Gunn
d34cd5eb0a Merge "New intent for microphone mute change notification" 2018-03-08 23:26:57 +00:00
Leon Scroggins III
6bb1069965 Merge "ImageDecoder: Add getters. Rename setAsAlphaMask" into pi-dev
am: 2b6db8d278

Change-Id: Id750dc84a3fe3bd007afec4079aece9737f86be6
2018-03-08 22:28:20 +00:00
Rohan Shah
03a1c80d56 Merge "[QS] Update Cellular/data usage tile" into pi-dev
am: a24322afc6

Change-Id: I659a19a12780249b9d8fe3e7bf1355f070b7931b
2018-03-08 22:10:37 +00:00
Jean-Michel Trivi
ab2e956360 New intent for microphone mute change notification
AudioManager: define ACTION_MICROPHONE_MUTE_CHANGED.
AudioService:
 - broadcast intent when setMicrophoneMute() is called
   with FLAG_RECEIVER_REGISTERED_ONLY.
 - remove outdated (invalid) comments.

Bug: 70857126
Test: m -j ; make -j offline-sdk-docs ; make -j cts ; \
      cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.AudioManagerTest#testMicrophoneMuteIntent

Change-Id: I7391522f0195d06592e4f853e9b672fdec66d37a
Merged-In: I7391522f0195d06592e4f853e9b672fdec66d37a
2018-03-08 22:04:21 +00:00
TreeHugger Robot
2b6db8d278 Merge "ImageDecoder: Add getters. Rename setAsAlphaMask" into pi-dev 2018-03-08 21:40:22 +00:00
TreeHugger Robot
a24322afc6 Merge "[QS] Update Cellular/data usage tile" into pi-dev 2018-03-08 21:36:59 +00:00
Tarandeep Singh
4513699583 Make few of the new IMS API methods final
d8d03a8e1b added new methods to
InputMethodService.
Allowing IME developers to override some of these methods would introduce
unnecessary complexity. Making these methods final makes sure developers
cannot inject some unexpected behavior when called by system.

Bug: 73701052
Test: atest InputMethodServiceTest
Test: atest CtsInputMethodServiceHostTestCases
Change-Id: I1af4ed05a0b7306d840a21129e921a57b4a5fc33
2018-03-08 19:25:38 +00:00
Leon Scroggins III
746a9fee93 ImageDecoder: Add getters. Rename setAsAlphaMask
Bug: 73788928
Test: I1606cbb4e71579160ffaef12c1ed738fad882cd1

This will allow Kotlin developers to treat the setters as properties.

Part of the motivation for the rename is that "getAsAlphaMask" sounds
like it returns an alpha mask itself. Rename both to
_etDecodeAsAlphaMask.

Change-Id: I8f9b04f8381840490b662c3bcd37a95442af8110
2018-03-08 14:22:56 -05:00
Changwan Ryu
15e9afcb3b Expose WebView#onCheckIsTextEditor
WebView was never returning correct return value in
onCheckIsTextEditor(). However, startinput optimization work at
ag/3455281, requires a correct return value when switching between
windows. Chrome-side change (crrev.com/c/952217) has dropped into
66.0.3359.14.

BUG: 74199870
Test: manually verified
Change-Id: I954365a70f1ff2680ed9a6d76e695c1193a4cfa3
2018-03-08 11:13:28 -08:00
Tyler Gunn
b6956c92bc Merge "API Documentation and Constant cleanup." into pi-dev 2018-03-08 18:59:53 +00:00
Rohan Shah
53f3f15654 [QS] Update Cellular/data usage tile
Updated intent and API. We were using an explicit intent and there's
changes going on in the Settings team that change the activity name and
enabled states. Updating to an implicit event as with other parts of the
Settings app (e.g. Bluetooth).

Test: Visually
Bug: 73586207
Change-Id: Ifa5125b4770927521d9267569d487319efdb9f9f
2018-03-08 18:12:33 +00:00
Peeyush Agarwal
16f0af89b4 Merge "Tag @SystemApi to ambient brightness stats API" into pi-dev
am: 9a2857d927

Change-Id: Id5d1003e81427ccf6a4d93928a250ce67dc454ac
2018-03-08 16:10:51 +00:00
TreeHugger Robot
9a2857d927 Merge "Tag @SystemApi to ambient brightness stats API" into pi-dev 2018-03-08 15:59:50 +00:00
Jason Monk
1e4188caba Merge "Remove registerSliceCallback and formalize setCallerNeeded" into pi-dev
am: 8d15ff047d

Change-Id: If8eb4ea7aafcbf926fbcd62465c2606c36d08840
2018-03-08 15:20:29 +00:00
Jason Monk
8d15ff047d Merge "Remove registerSliceCallback and formalize setCallerNeeded" into pi-dev 2018-03-08 15:02:26 +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
Tyler Gunn
3a09dc185b API Documentation and Constant cleanup.
1. Update handover API docs for clarity.
2. Added an unknown value per API review comments.
3. Renamed HANDOVER_FAILURE_DEST_USER_REJECTED to
HANDOVER_FAILURE_USER_REJECTED
3. Removed the HANDOVER_FAILURE_DEST_INVALID_PERM constant since it isn't
used (methods which deal with permissions throw security exceptions).

Test: Make doc and verify documentation.
Fixes: 73751004
Fixes: 73750515
Fixes: 73750817
Merged-In: I7860fcd813f25adaaccf632f2c61dd4138a0a889
Change-Id: I7860fcd813f25adaaccf632f2c61dd4138a0a889
(cherry picked from commit c7a86b14a8)
2018-03-07 23:17:54 +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
168a77237f Merge "API Documentation and Constant cleanup." am: 8882c55b21
am: 8917fc21cc

Change-Id: Ic4a159b838c952594b0860ded69fc07c74180961
2018-03-07 20:56:29 +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
23b73c45fb Merge "Remove BIND_SLICE" into pi-dev 2018-03-07 18:01:26 +00:00
Treehugger Robot
322ff16301 Merge "Address the API review comments." 2018-03-07 17:40:20 +00:00
TreeHugger Robot
5a169cf2f6 Merge "System sounds get its own dnd toggle" into pi-dev 2018-03-07 16:39:40 +00:00
Peeyush Agarwal
90eabcc288 Tag @SystemApi to ambient brightness stats API
Bug: 72931803
Test: Manual
Change-Id: I41ac5569e97cc33c57af55a37135a3f7617a2385
(cherry picked from commit 1584fa6f08)
2018-03-07 16:13:08 +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
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
Jason Monk
b8e5fa9dee Remove registerSliceCallback and formalize setCallerNeeded
Test: update-api
Change-Id: I690064fb416f017f7175a63980827a4ad773ad37
Fixes: 73124257
2018-03-06 17:51:30 -05: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
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
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