Commit Graph

23556 Commits

Author SHA1 Message Date
TreeHugger Robot
e6e13284bf Merge "Add Introspection API to retrieve AudioProductStrategies" 2019-02-20 10:51:30 +00:00
Michal Karpinski
4e7129df7a Merge "Add a way for holders of START_ACTIVITIES_FROM_BACKGROUND to allow bg activity starts starts from specific receivers" 2019-02-20 10:50:32 +00:00
TreeHugger Robot
d4455890cb Merge "MediaSession2: Add SessionCallback#onPostConnect()" 2019-02-20 08:06:05 +00:00
Jeff Sharkey
3f2385b97f Merge "Respond to various API council feedback." 2019-02-20 07:07:33 +00:00
TreeHugger Robot
c3ace54919 Merge "Changed ContentCaptureManager API so service can only disable itself." 2019-02-20 06:54:10 +00:00
TreeHugger Robot
9a71920b02 Merge "New Augmented Autofill APIs: onConnected() and onDisconnected()" 2019-02-20 04:04:18 +00:00
Hongwei Wang
e0aeee65be Merge "Adds android.media.HwAudioSource class" 2019-02-20 03:09:16 +00:00
Etan Cohen
9f69d22441 Merge "[RTT] Deprecate old feature availability APIs" 2019-02-20 01:45:19 +00:00
Hongwei Wang
8ddef890e7 Adds android.media.HwAudioSource class
The new HwAudioSource (inherits PlayerBase) serves as a player backed by
a hardware audio source device.

Sample usage

```
HwAudioSource player = new HwAudioSource.Builder()
        .setAudioDeviceInfo(deviceInfo)
        .setAudioAttributes(new AudioAttributes.Builder()
                .setUsage(AudioAttributes.USAGE_MEDIA)
                .build())
        .build();
player.start();
```

Bug: 112161027
Test: Launch FM Tuner application
Change-Id: Id1f49c88cbbdb2b9156137ed8920713aa29b2d1c
2019-02-19 14:54:35 -08:00
Jeff Sharkey
924f620c9f Merge "Map MediaStore items to StorageVolume." 2019-02-19 20:23:05 +00:00
François Gaffie
c01fa3a7de Add Introspection API to retrieve AudioProductStrategies
Bug: 124767636
Test: Build
Change-Id: I24b95f11217e80310d123c7183bdcb0e17b5f02b
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
2019-02-19 19:17:42 +00:00
Jeff Sharkey
b91eaa54a8 Respond to various API council feedback.
Handle many simple, smaller changes in a single CL.  Hide
CPC.closeQuietly(), now that it implements AutoCloseable.  Add more
details to CR.set/getCache() docs.  Add many @Nullable/@NonNull
annotations.

Bug: 124507578, 124447751, 124302519, 123697622
Bug: 123661322, 122887179, 122528742, 122527812, 116224797
Test: manual
Change-Id: Icee556a6ed76bbdf4c8e42b59d69d5580d461b95
2019-02-19 11:09:22 -07:00
Felipe Leme
72e83d8c3d Changed ContentCaptureManager API so service can only disable itself.
To re-enable, it will need to launch a Settings intent
(Settings.ACTION_REQUEST_ENABLE_CONTENT_CAPTURE).

Bug: 123286662
Test: atest CtsContentCaptureServiceTestCases

Change-Id: I0dd03013aba645c188af4034e530492d8294180e
2019-02-19 09:29:14 -08:00
Jeff Sharkey
aa7b682699 Merge "MediaStore API and docs polishing." 2019-02-19 15:58:57 +00:00
TreeHugger Robot
d8b240cbb0 Merge "Add TEST_MAPPING for GtsUnofficialApisUsageTestCases" 2019-02-19 03:35:39 +00:00
Jeff Sharkey
f8fa940405 Map MediaStore items to StorageVolume.
Add missing getStorageVolume() method to provide mapping from Uri
to underlying StorageVolume.

Bug: 124013019
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I91e246d29629eec84956ff113ef976e153fc69f7
2019-02-18 20:38:07 +00:00
Jeff Sharkey
9f05e0ea17 MediaStore API and docs polishing.
Initial efforts at cleaning up MediaStore docs, including deprecation
of crufty methods, and annotations to communicate stored units.

Bug: 120429729, 124013019
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I87828f19030b6b354472c1b3ce767de166f86134
2019-02-18 13:04:25 -07:00
Jeff Sharkey
c2b55eb98f Merge changes from topic "wrapz"
* changes:
  Add tests for DocumentsContract/Provider.
  Replace ContentInterface with wrapping.
2019-02-18 16:42:07 +00:00
Svetoslav Ganov
bdea76f9ae Merge "Add request object for querying historical ops" 2019-02-18 15:48:19 +00:00
Santos Cordon
c34d735f43 Merge "Add force suspend API to PowerManager." 2019-02-18 10:23:04 +00:00
TreeHugger Robot
4e3524229b Merge "MediaSession2: Make getConnectedControllers() public" 2019-02-18 04:05:21 +00:00
Jaewan Kim
6023b6727c MediaSession2: Add SessionCallback#onPostConnect()
Bug: 124482497
Test: Run CTS
Change-Id: I280a657c10393253479f773b17b0de3c5f4780af
2019-02-18 12:11:09 +09:00
Michal Karpinski
d19ed85255 Add a way for holders of START_ACTIVITIES_FROM_BACKGROUND
to allow bg activity starts starts from specific receivers

Leverage the existing infrastructure we have - BroadcastOptions.

Bug: 124159654
Test: manual (with the other CL on the topic - try to call someone
      from Contacts app and see that the flag gets applied correctly)
Change-Id: I1220eb14d86d549a18d0d229ffb19a94a8affd66
2019-02-17 20:54:32 +00:00
Svet Ganov
23c88db8f4 Add request object for querying historical ops
Test: atest CtsAppOpTestCases

bug:123253745

Change-Id: Ia473f9298a83214f2fdfb1062992b48357965003
2019-02-17 07:35:52 -08:00
TreeHugger Robot
cbb05a317b Merge changes I9ed87db1,Ic0b766f6
* changes:
  Make PermissionControllerManager user aware
  Check same uid for permission and app-op
2019-02-16 22:35:22 +00:00
Philip P. Moltmann
0d05e48371 Check same uid for permission and app-op
In permission checker we used to check the permission for the passed in
uid but the opp-op for the Binder.getCallingUid. In the case the calling
identity was cleared, PermissionChecker ended up checking the app-op of the
current process (often the system server).

Now we check the uid for both the permission and the app-op.

Test: Called PermissionChecker.checkPermission with the calling indentity
cleared.
Fixes: 124116218
Change-Id: Ic0b766f6c75bba1b9dae3e91c6adce85a76ae68f
2019-02-16 12:08:25 -08:00
TreeHugger Robot
2188365b44 Merge "Annotated mTheme field on ContextThemeWrapper with maxTargetSdk P" 2019-02-16 03:48:19 +00:00
Felipe Leme
c4b4cb8a16 Merge "Added DeviceConfig properties to fine tune ContentCapture:" 2019-02-16 03:46:13 +00:00
TreeHugger Robot
d2d04c6e81 Merge "AudioService: Make suspended apps lose audio focus" 2019-02-16 03:30:26 +00:00
Jeff Sharkey
a13887fa63 Replace ContentInterface with wrapping.
After much discussion, we can't safely introduce ContentInterface,
so instead offer ContentResolver.wrap() methods.

Bug: 120974438
Test: manual
Change-Id: I0b399192a19948a8986146efa916375022c38b59
2019-02-15 19:45:18 -07:00
Felipe Leme
d32d8f6f3c Added DeviceConfig properties to fine tune ContentCapture:
- DEVICE_CONFIG_PROPERTY_MAX_BUFFER_SIZE
- DEVICE_CONFIG_PROPERTY_IDLE_FLUSH_FREQUENCY
- DEVICE_CONFIG_PROPERTY_TEXT_CHANGE_FLUSH_FREQUENCY
- DEVICE_CONFIG_PROPERTY_LOG_HISTORY_SIZE
- DEVICE_CONFIG_PROPERTY_LOGGING_LEVEL

Test: manual verification
Test: atest CtsContentCaptureServiceTestCases

Bug: 123096662
Fixes: 121044064
Fixes: 121044306

Change-Id: I08623516bb7ebbe9c900987be853f4f395250016
2019-02-15 17:32:04 -08:00
Jean-Michel Trivi
b2251826e9 AudioService: Make suspended apps lose audio focus
Handle ACTION_PACKAGES_SUSPENDED in AudioService.
Send FOCUS_LOSS to any suspended app that is in the focus
  stack and remove it from the stack
Annotate nullability of package name, AudioAttributes
  and clientId for audio focus.

Bug: 119328282
Test: suspend app with focus, check output of dumpsys audio
Change-Id: I34103f8910146fc573c9efc806e8f1a1ffc722c9
2019-02-15 15:34:55 -08:00
TreeHugger Robot
f7ecba9f15 Merge "APIs for developers to use DeviceDefault.DayNight." 2019-02-15 23:21:19 +00:00
Philip P. Moltmann
7d717842c5 Merge changes from topic "actuallyUsePermissionControllerToRestoreBackup"
* changes:
  Expose permission flag APIs for tests
  Move permission restore code into permission controller.
2019-02-15 21:15:36 +00:00
Jeff Sharkey
23dbb2b498 Merge changes from topic "columnz"
* changes:
  Annotation for ContentProvider columns.
  Add accessor methods to aid testing.
2019-02-15 19:33:48 +00:00
TreeHugger Robot
cba028bc11 Merge "Add API to expose ignore settings whitelist for GTS" 2019-02-15 19:29:12 +00:00
Soonil Nagarkar
5140e4fb86 Add API to expose ignore settings whitelist for GTS
Bug: 124517571
Test: manually
Change-Id: I846f9112c3cc3dde1466ff13e740ccf72c16b833
2019-02-15 19:29:06 +00:00
TreeHugger Robot
54db20ba52 Merge "Un-@hide MicrophoneDirection API" 2019-02-15 19:28:08 +00:00
Nader Jawad
a1eef72673 Annotated mTheme field on ContextThemeWrapper with maxTargetSdk P
Added ContextThemeWrapper#setTheme(Theme) method to programmatically
assign the theme without using a resource id

Change-Id: I043253e65a535abdf8d89d9421d2cff2b41bdb05
Fixes: 123768723
Test: Added CTS test to verify setTheme
2019-02-15 19:06:51 +00:00
Julia Reynolds
fd2ec469ed Merge "Fix API errors" 2019-02-15 18:47:06 +00:00
Santos Cordon
12f92eb6cf Add force suspend API to PowerManager.
Add a hidden system API (protected by DEVICE_POWER) that forces suspend,
ignoring any existing wakelock.  Add a shell cmd to trigger the API
to run.

Bug: 111991113
Test: 'adb shell svc power forcesuspend'
Change-Id: I5a258e1b7c8b1391fe1baf3930dd9d9af47235c9
2019-02-15 17:23:18 +00:00
Philip P. Moltmann
3e4961757b Expose permission flag APIs for tests
tests need to make sure the flags are set correctly.

Bug: 116738135
Test: atest CtsBackupTestCases:android.backup.cts.PermissionTest#testRestorePermReviewed
Change-Id: Ia1000de3594e910c3345e205679bee37be898d17
2019-02-15 08:57:16 -08:00
Amin Shaikh
705ccdee1b APIs for developers to use DeviceDefault.DayNight.
Without this, developers would have to create their own DayNight version
for DeviceDefault. Adding the ThemeOverlay.DeviceDefault.Accent.DayNight
makes it easier to developers to retrieve accent color in xml.

Bug: 123999734
Test: make
Change-Id: I85f0ad6a467b7a6eb0626ce0bc9808b0559c3fa6
2019-02-15 11:56:31 -05:00
Julia Reynolds
79f0277f29 Fix API errors
APIs that were @SystemApi in the last release cannot be changed.

Test: atest CtsSystemApiSignatureTestCases
Bug: 124209375
Change-Id: I631b7dea09e723f509581f82a85da99344b42a09
2019-02-15 11:38:48 -05:00
Jiyong Park
d5acf18a17 Add TEST_MAPPING for GtsUnofficialApisUsageTestCases
Bug: 123701384
Test: m and watch if treehugger triggers the test
Change-Id: Ib1793c778e97e130e33049e962752fbe4c684222
2019-02-15 08:25:42 +00:00
Jaewan Kim
1d20148e8a MediaSession2: Make getConnectedControllers() public
Bug: 124478505
Test: Build
Change-Id: Iee132fca34ccdf89b263a74d727c5bcc5e75d196
2019-02-15 14:52:29 +09:00
Remi NGUYEN VAN
6616e2ab5d Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 05:39:14 +00:00
TreeHugger Robot
3a5211e744 Merge "Changed ContentCaptureService.setContentCaptureWhitelist() to use Set instead of List." 2019-02-15 04:20:23 +00:00
Ralston Da Silva
b3f0928223 Merge "Removing hidden api usage from AutoCompleteTextView" 2019-02-14 23:34:02 +00:00
Felipe Leme
f3d317c80d New Augmented Autofill APIs: onConnected() and onDisconnected()
Test: m update-api # they're not implemented yet
Bug: 124456706

Change-Id: Ia313b093178204bf7ddc2c6bd664c3c840b0ed5a
2019-02-14 14:30:02 -08:00