Commit Graph

96149 Commits

Author SHA1 Message Date
Jeff Sharkey
7b28a9f743 Merge "Public APIs for ID-specific Uris, misc items." 2019-08-23 04:24:31 +00:00
TreeHugger Robot
a68d535199 Merge "Defined a more generic way to let services "opt-out" from certain user types." 2019-08-22 20:59:41 +00:00
Jeff Sharkey
ec19e9b107 Public APIs for ID-specific Uris, misc items.
We have getContentUri() for entire collections of items, but we
only have ID-specific overloads for some of the MediaStore classes;
let's get them all added for consistency.

Remove primary/secondary directory logic, which was replaced by
new RELATIVE_PATH column before Q launched.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial API refactoring
Change-Id: Iae4e7fe57adff071c35af459e31223a1fd05fef2
2019-08-22 14:43:24 -06:00
TreeHugger Robot
62d5c878e8 Merge "Hold a strong reference to the callback in TextClassifierService" 2019-08-22 19:37:44 +00:00
Jeff Sharkey
0be6fcd0d9 Merge changes from topic "activez"
* changes:
  Public API to check and note media operations.
  Public API to watch for "active" operations.
2019-08-22 17:17:22 +00:00
Jeff Sharkey
5997cc8516 Public API to check and note media operations.
These operations are used by MediaProvider when checking and noting
interactions with specific media types on the device.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Id452ad121bd8a0b7c1c337a2b7fe030135a9d776
2019-08-22 11:12:57 -06:00
Jeff Sharkey
7095ab9f52 Public API to watch for "active" operations.
We already have startOp() and finishOp() to provide a mechanism to
mark an operation as being "active".  This change publishes a set of
APIs to check the status of these active operations, matching the
naming of similar existing APIs on the same class.

Bug: 139128842
Test: atest com.android.server.appop.AppOpsActiveWatcherTest
Test: atest android.media.cts.AudioRecordAppOpTest
Exempt-From-Owner-Approval: trivial API refactoring
Change-Id: I9fb381d748ff23ff24dd363ed5b117bd661793ab
2019-08-22 11:12:45 -06:00
Martin Stjernholm
b36a5bc699 Merge "Update path to the new ART APEX." 2019-08-22 15:00:09 +00:00
Tony Mak
cdc81e8aff Hold a strong reference to the callback in TextClassifierService
Issue:
TextClassifierService failed to invoke the callback to send the result back
to client occasionally because  the callback object may be GCed.
And thus smart selection failed occasionally, as the client doesn't get
a response back when it hits this issue. It won't fallback to local
textclassifier due to the timeout specified in TextView.

Cause:
We thought that ITextClassifierCallback is a "cross process" reference, and
so we only store a weak reference of it to avoid leak.
And it turns out that it is wrong. As soon as the weak ref gets GCed in
the service, that counts as dropping the callback. The service doesn't
know about any strong references the client has.

Bug: 138865849

Test: Try smart selection over 30 times, make sure smart action is shown
for every single time.

Change-Id: Ia9218cf67e8d67697a0fdff22c7918a55efc39ca
2019-08-22 15:17:09 +01:00
Neil Fuller
173720587d Merge "Switch from android.text.format.Time" 2019-08-22 12:20:18 +00:00
Joanne Chung
d38b888249 Merge "Log the error of TCS, TCMS and SysTC." 2019-08-22 02:03:14 +00:00
Felipe Leme
501a514ba7 Defined a more generic way to let services "opt-out" from certain user types.
SystemService now defines a isSupported(UserInfo), which is used by SystemServiceManager to
skip the service for the unsupported types.

Also added a new argument to SystemService.onSwitch() to indicate which user is
being switched from.

Finally, also fixed VoiceInteractionManagerService so it doesn't start for headless user 0.

Test: manual verification
Test: atest CtsVoiceInteractionTestCases CtsAssistTestCases # on automotive and walleye

Bug: 133242016
Bug: 137878080

Change-Id: Ife4bd875f412f85cccf9c9fd03115abd238d7eab
2019-08-21 15:15:30 -07:00
TreeHugger Robot
dd32e3c0a8 Merge "Avoid using sListeners outside of synchronized block." 2019-08-21 20:49:25 +00:00
TreeHugger Robot
2a6df07afa Merge "Address static cache access issues." 2019-08-21 20:15:41 +00:00
Jayant Chowdhary
70809a1847 Merge "Add SYSTEM_CAMERA capability to camera2 and define @SystemApi SYSTEM_CAMERA permissions." 2019-08-21 19:53:16 +00:00
Neil Fuller
e0b066df35 Merge "Fix Y2038 issue in DateUtils.isToday()" 2019-08-21 18:34:54 +00:00
Julia Reynolds
9ef59c953d Merge "Make some APIs used by ExtService module @SystemApi" 2019-08-21 13:05:11 +00:00
Zimuzo Ezeozue
74c76a2c59 Merge "Add ExternalStorageService API" 2019-08-21 10:30:54 +00:00
Martin Stjernholm
3de5cbbd1c Update path to the new ART APEX.
Test: atest CtsJniTestCases
Bug: 135753770
Change-Id: Ica35fc7f6adade19160cbb16adf5647d189ecc45
2019-08-21 10:49:47 +01:00
Joanne Chung
0b7c2c4135 Log the error of TCS, TCMS and SysTC.
TextClassifierService passes the error message to onFailure() when it fails
to process the task. But the error message was dropped at TextClassifierService
right away which makes debugging hard. Log the error at the place where the
error happens to help debugging.

Bug: 139114128
Test: Manual. Use DefaultTCService to pass error message and make sure
the error log is printed.

Change-Id: I7c848a6e96db85d6e5b4f90ee9677dfe5b703149
2019-08-21 16:47:53 +08:00
Zim
e1c49ce35d Add ExternalStorageService API
The ExternalStorageService implementation will live in android.process.media
It will orchestrate filesystem IO from apps coming from an upper filesystem
to a lower filesystem

Test: m
Bug: 135341433
Change-Id: I9b132ce7e5e5985ef3307c75ce7db50affc65a8e
2019-08-21 08:02:47 +01:00
Joanne Chung
14275a9388 Merge "Move disable autofill from AutofillManagerService to AutofillOptions." 2019-08-21 06:29:18 +00:00
Kweku Adams
f6ea6733b0 Address static cache access issues.
ArrayMap and ArraySet are not thread safe, so callers are expected to
lock around their instances before calling any methods. However, if a
caller fails to lock, there can be races that end up corrupting the
cache pool (despite having the class level lock held). A corrupted pool
causes issues for other ArrayMap/Set instances, even if those instances
are properly used under locks. There's no way to guard against cache
pool corruption without making ArrayMap/Set fully thread-safe, changing
the pool structure, or appropriately locking around each ArrayMap/Set
instance.

For now, we make ArraySet throw ConcurrentModificationException on a best
effort basis to provide better awareness when an ArraySet is accessed
concurrently without any locks and try to detect when the cache is
corrupted.

Bug: 62282384
Bug: 73549921
Bug: 122969275
Bug: 139015193
Bug: 139401479
Test: atest CtsUtilTestCases:ArrayMapTest
Test: atest CtsUtilTestCases:ArraySetTest
Test: atest FrameworksCoreTests:ArrayMapTest
Test: atest FrameworksCoreTests:ArraySetTest
Change-Id: Icd76630b25afd9f3627239301ffa5c37da25ea18
2019-08-20 19:13:15 -07:00
Jayant Chowdhary
393ad6e0ad Add SYSTEM_CAMERA capability to camera2 and define @SystemApi SYSTEM_CAMERA permissions.
In order to access system-only cameras client processes need
SYSTEM_CAMERA permissions in addition to CAMERA permissions. A
permission was preferred over other mechanisms such as having private
connections would need to hard-code the package name(s) of clients using
system only camera devices. A system | signature permission on the other hand,
would make this more flexible and would be better for security.

Bug: 133508924

Test: cts CameraManagerTest, CameraDeviceTest
Test: Give cts test SYSTEM_CAMERA permissions by using
      adoptShellPermissions and run some camera tests.

Change-Id: Ibcd6ccdb231dcca949ed4fb14712d033a5801d36
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-08-20 15:24:28 -07:00
Joshua Imbriani
b0ae1fd1e5 Merge "Adding a new overloaded API for synthesizeToFile taking a FileDescriptor instead of a File object" 2019-08-20 15:36:57 +00:00
Shafik Nassar
bb021e3b1b Merge "Add API to create GestureLibrary from FileDescriptor" 2019-08-20 15:21:03 +00:00
Neil Fuller
f7a60ec323 Merge "Simplify APIs exposed for time zone lookups" 2019-08-20 11:01:57 +00:00
shafik
69bbb72be8 Add API to create GestureLibrary from FileDescriptor
GestureLibraries#fromFile takes a file path and returns a
GestureLibrary object. This change adds an equivalent API
GestureLibrary#fromFd that takes a FileDescriptor.

Test: GestureBuilder.apk still works properly
Bug: 139182427
Change-Id: Ie50f3a624703cf128d6ee34bb450bbe971ad1730
2019-08-20 11:43:17 +01:00
PO HUNG CHEN
35fa063e89 Merge "Use Ashmem to reduce buffer copies" 2019-08-20 08:18:58 +00:00
Rhed Jao
2b1f8ce42b Merge "More logs for UiAutomation" 2019-08-20 02:59:57 +00:00
Jeff Sharkey
7585618d96 Merge "Check for mTransport before trying to configure." 2019-08-20 01:03:27 +00:00
Jeff Sharkey
570926daef Merge "Migrate MediaScannerConnection to using call()." 2019-08-20 00:29:26 +00:00
Sally Yuen
b3d0111b46 Merge "Add more ScrollDeltaX/Y support to AccessibilityRecord." 2019-08-19 23:10:07 +00:00
Jeff Sharkey
316a617795 Check for mTransport before trying to configure.
Bug: 139554125
Test: atest FrameworksCoreTests:android.content.ContentProviderTest
Change-Id: I4a2d78de257cb898b75543dcbfde4b6317b3393f
2019-08-19 16:04:57 -06:00
Nate Fischer
200e1233f5 Merge "WebView: prettyprint docs" into qt-dev am: 20f2f0b5ea am: 6201d28952 am: e838a0353f
am: 095e1c1328

Change-Id: Ia247d0f5467886faea98d9055899a33daa8fe170
2019-08-19 14:45:51 -07:00
Mihir Patel
7e2700d328 Merge "Fixing a bug where content capture sessions with child sessions could get stuck in a state where no event flushing other than forced flushes would occur" into qt-r1-dev am: 4aa0aeadff am: c1b765e744
am: 6b365322d4

Change-Id: Idcce863bc63e9fb38d5a54080dcd9b86e192941c
2019-08-19 14:38:34 -07:00
Steven Liu
21078b6b27 Merge "Remove settings and resources about CarrierNetworkNotifier" 2019-08-19 21:24:11 +00:00
Nate Fischer
095e1c1328 Merge "WebView: prettyprint docs" into qt-dev am: 20f2f0b5ea am: 6201d28952
am: e838a0353f

Change-Id: I7042cc96f8dfd5151e41c4af780c7f420ec6896b
2019-08-19 14:08:07 -07:00
Mihir Patel
6b365322d4 Merge "Fixing a bug where content capture sessions with child sessions could get stuck in a state where no event flushing other than forced flushes would occur" into qt-r1-dev am: 4aa0aeadff
am: c1b765e744

Change-Id: Ie4ed8565ad223fb751dded6414288ae619cd8aaa
2019-08-19 13:58:27 -07:00
Alex Light
92ac76bb7d Merge "Add agent startup-attach" into qt-dev-plus-aosp am: 74f191c782
am: 25abf4d99a

Change-Id: I4caa4c4af263544bf76278397e67b283c2f6ef40
2019-08-19 13:54:04 -07:00
Nate Fischer
e838a0353f Merge "WebView: prettyprint docs" into qt-dev am: 20f2f0b5ea
am: 6201d28952

Change-Id: I06fdaa6d8f5b5d1cc75263338c8bb56da9bcca51
2019-08-19 13:41:11 -07:00
Mihir Patel
c1b765e744 Merge "Fixing a bug where content capture sessions with child sessions could get stuck in a state where no event flushing other than forced flushes would occur" into qt-r1-dev
am: 4aa0aeadff

Change-Id: I5fbd4bbc0d08b0a43c12d36b2b172e2df1edb64a
2019-08-19 13:37:01 -07:00
Mihir Patel
245fc50ce7 Merge "Fixing a bug where content capture sessions with child sessions could get stuck in a state where no event flushing other than forced flushes would occur" into qt-r1-dev
am: 4aa0aeadff

Change-Id: Iadf1c43fc5b38ab432e4bc2f47d50dd911f725ed
2019-08-19 13:34:24 -07:00
Alex Light
25abf4d99a Merge "Add agent startup-attach" into qt-dev-plus-aosp
am: 74f191c782

Change-Id: I45f82e0c1efa8d312971cb84ab51888c4595498f
2019-08-19 13:29:49 -07:00
Nate Fischer
6201d28952 Merge "WebView: prettyprint docs" into qt-dev
am: 20f2f0b5ea

Change-Id: Iad51d33c434a42272c448ba7a807bdcbe6cb51d0
2019-08-19 13:22:49 -07:00
Jeff Sharkey
aac9878b43 Migrate MediaScannerConnection to using call().
As part of getting MediaProvider to compile against supported APIs,
we're moving to the call() method instead of IMediaScannerService.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Change-Id: Ie959daa7576214024150faf84b44cdba00119257
2019-08-19 14:14:28 -06:00
Mihir Patel
4aa0aeadff Merge "Fixing a bug where content capture sessions with child sessions could get stuck in a state where no event flushing other than forced flushes would occur" into qt-r1-dev 2019-08-19 20:11:44 +00:00
Neil Fuller
400efa36ef Simplify APIs exposed for time zone lookups
The libcore.timezone APIs may form the basis for some
new SystemApis. Before starting that process the API
surface is being rationalized to establish the core
use cases.

Test: Treehugger
Bug: 139091367
Change-Id: I6c8b791524d16223c414612913b22f4d70c27d61
2019-08-19 20:39:30 +01:00
TreeHugger Robot
20f2f0b5ea Merge "WebView: prettyprint docs" into qt-dev 2019-08-19 19:06:32 +00:00
TreeHugger Robot
646582de1e Merge "Listen for changes to IME and show/hide nav bar" 2019-08-19 17:42:47 +00:00