Commit Graph

8451 Commits

Author SHA1 Message Date
Jeff Sharkey
1307f428af Allow sending of bulk Uri change notifications.
MediaProvider makes heavy use of Uri change notifications, which
currently need to be delivered one at a time through the Binder
interface.  To optimize this, allow callers to provide a collection
of multiple Uris to notify with a single Binder call.

Bug: 134170767
Test: atest cts/tests/tests/content/src/android/content/cts/ContentResolverTest.java
Change-Id: Ifef778e88bb772b5580f70929c6f2e9c166d1c0e
2019-11-13 18:17:02 -07:00
TreeHugger Robot
fd74d7645a Merge "Update SyncStorageEngine to use protos." 2019-11-12 17:55:03 +00:00
Varun Shah
816cf63bc5 Update SyncStorageEngine to use protos.
Status and Statistics info within SyncStorageEngine was being stored
using Parcels, which is not recommended. Updating both of them to use
protos now. Additionally, because of protos, storage space on disk
consumed by these files are reduced by more than 50%.

Also added unit tests for SyncStorageEngine.

Bug: 38177679
Test: atest com.android.server.content.SyncStorageEngineTest
Test: build and flash - no errors in logs
Change-Id: I187cb6c271333f366f5c7f651f75b4161fee90d4
2019-11-11 10:56:08 -08:00
Jorim Jaggi
5fdaa0c9af Merge "Remove FEATURE_SWIPE_TO_DISMISS functionality" 2019-11-11 13:10:30 +00:00
Meng Wang
d4976c4f46 Merge "System API: Context#registerReceiverForAllUsers" 2019-11-08 18:03:02 +00:00
Joanne Chung
b26a6c567a Merge "Allow to use ExtService as TextClassifierService" 2019-11-08 05:15:30 +00:00
Sudheer Shanka
a83671193b Merge "Add a new system service for blob store management." 2019-11-08 04:05:35 +00:00
Joanne Chung
0ad8fe3b87 Merge "Grant permissions to ContentCapture and remove permission for TC." 2019-11-08 01:51:15 +00:00
Andrew Solovay
61d29f3953 Merge "docs: Clarified behavior of TypedArray.getBoolean()" into qt-dev am: de21a30cda am: c5f06a08c8 am: 8e351a1c14
am: 3657108803

Change-Id: I70677fe070b1c1ac101e53490cf81d4983c62133
2019-11-07 17:47:09 -08:00
Andrew Solovay
3657108803 Merge "docs: Clarified behavior of TypedArray.getBoolean()" into qt-dev am: de21a30cda am: c5f06a08c8
am: 8e351a1c14

Change-Id: I13175f879d36c6e89e1a6772098455496904f907
2019-11-07 17:41:20 -08:00
Andrew Solovay
8e351a1c14 Merge "docs: Clarified behavior of TypedArray.getBoolean()" into qt-dev am: de21a30cda
am: c5f06a08c8

Change-Id: Ic61f305c81ebeaa0e4002c4f23007f2edacc6e4a
2019-11-07 17:35:10 -08:00
TreeHugger Robot
de21a30cda Merge "docs: Clarified behavior of TypedArray.getBoolean()" into qt-dev 2019-11-08 01:17:29 +00:00
Meng Wang
3f9e036f11 System API: Context#registerReceiverForAllUsers
Bug: 141193711
Test: make
Change-Id: Ie692d2ac27474b9fe11f5548bc504aa00c5ad53c
2019-11-07 15:03:13 -08:00
Sudheer Shanka
f5b36964e0 Add a new system service for blob store management.
This change adds a bare-bones system service, implementation will follow
later.

Bug: 143559646
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Change-Id: Idf21dfcd11dd32a42b62c6ad965d6f5ad7eed1b4
2019-11-07 13:37:14 -08:00
TreeHugger Robot
861e255614 Merge "Add an override for getUser in ContextWrapper" 2019-11-07 11:12:43 +00:00
James Lin
5da87df5bb Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." am: 303c5dc0fb am: b815ee2bb9
am: 35a357814c

Change-Id: I6790023bd43b6787e2e9a46e6ec4f645a69b95ee
2019-11-06 19:47:30 -08:00
James Lin
35a357814c Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." am: 303c5dc0fb
am: b815ee2bb9

Change-Id: I58e1e01f6901cc1630a6f34358e3008a1bbb1da7
2019-11-06 19:41:37 -08:00
James Lin
b815ee2bb9 Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony."
am: 303c5dc0fb

Change-Id: Ibcd4e3ab7c60c1446019d652e5603b02ca9f34b2
2019-11-06 19:33:36 -08:00
James Lin
303c5dc0fb Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." 2019-11-07 03:26:08 +00:00
Bill Lin
bc687cd1f3 Merge changes from topic "apex_migration" am: 8eacf37ef3
am: 42a049c287

Change-Id: Ic951da75a0b4548fe30f583b5af59b811f6b3db5
2019-11-06 18:40:45 -08:00
Bill Lin
42a049c287 Merge changes from topic "apex_migration"
am: 8eacf37ef3

Change-Id: If897274a7d2b9258142a55a628525821d713af4b
2019-11-06 18:30:09 -08:00
Joshua Baxter
8ee6203bcb Merge "docs: fix typo" into qt-dev am: 4fa49b4541 am: 5cc0a67503 am: ffbebe1fde
am: 3cccaaf983

Change-Id: I8c3efd39e090ed07931afc4b80992fc6a874b561
2019-11-06 14:15:17 -08:00
Joshua Baxter
3cccaaf983 Merge "docs: fix typo" into qt-dev am: 4fa49b4541 am: 5cc0a67503
am: ffbebe1fde

Change-Id: I2e9a580dad500431c1eca2aabed8d2c723009bd4
2019-11-06 14:01:24 -08:00
Joshua Baxter
ffbebe1fde Merge "docs: fix typo" into qt-dev am: 4fa49b4541
am: 5cc0a67503

Change-Id: I1558247d9dfdb621288b3f419447985ca0dbf88f
2019-11-06 13:46:35 -08:00
Joshua Baxter
f4d07d459c docs: fix typo
Change-Id: I843a3d94e48335babffdf8a226fa9e3d00c5bbf1
test: make ds-docs
bug: 144041941
2019-11-06 21:02:33 +00:00
kholoud mohamed
b7eb15dfa8 Add an override for getUser in ContextWrapper
This is to fix an issue when calling getUser for a context that
is different than the context of the current foreground user.
getUser for a ContextWrapper would call the base
class Context#getUser which returns the user of the current foreground
process rather than returning the user of the calling context.

Currently, this is a bug that does not meet the ContextWrapper class Javadoc.
It looks like the ContextWrapper call was missed in Ib772ec4438e57a2ad4950821b9432f9842998451.

Fix: 144024489
Test: called the API from a test App with a different context than the
current application context.

Change-Id: I2d24f5141e8cbc2546c8dc5894a1aeab376b7632
2019-11-06 17:03:38 +00:00
Oli Lan
1138012b54 Clean up generatePackageInfoFromApex() API
This changes the API for generatePackageInfoFromApex in PackageParser
in response to review suggestions made in ag/6701090.

The method is renamed to generatePackageInfo with a PackageParser.Package
parameter (as well as an ApexInfo and flags). The implementation is combined
with the main generatePackageInfo method. Callers are changed to perform
the parsing themselves, including the collection of certificates if
necessary.

Note: the method signature and implementation had already changed since
ag/6701090, so the suggestions from that CL may not apply directly.

Bug: 129261524
Test: atest PackageParserTest
Test: atest CtsStagedInstallHostTestCases

Change-Id: Iee213e025583c2201ff9d65c447e4278b925a2f0
Merged-In: I495539679812110f89d5e3d93f2622ba2dab36c0
(cherry picked from commit c2c7a22333)
2019-11-06 23:15:21 +08:00
Joanne Chung
b50ab4bab8 Allow to use ExtService as TextClassifierService
1. Define a trust TextClassifierService list which contains ExtService. And
also define a DeviceConfig flag which can be set to the TextClassifierService
we would like to use. Because the TextClassfierService can be set to a side-load
app, e.g. CTS tests. If the override flag is not one of the packages in the
trust TextClassifierService list, it should be able to see only text from
its own UID.
2. Made TextClassifierService available for testing.
3. Fix the incoreect order for onConnected().
4. Fix API Lint errors.

Bug: 141111813
Bug: 143249163
Test: atest FrameworksCoreTests:android.view.textclassifier
Test: Manual. dumpsys to check current TextClassifierService. Change flag
to another service, and then check TextClassifierService changing to
expected TextClassifierService.
Test: Manual. Use local TextClassifierService to make sure the service
call order of connection callback and API call is correct.
Change-Id: I37ff298f0c65ae0469bd54e30f1ebf48b77c126c
2019-11-06 13:38:56 +08:00
Jorim Jaggi
e06b1fd0f5 Remove FEATURE_SWIPE_TO_DISMISS functionality
Not used anymore by any product.

Bug: 143346248
Test: Boots
Change-Id: I21286e62f73ec34f7d5ca040cd614838c9cd4276
2019-11-05 19:14:54 +01:00
Jordan Liu
2493a630a6 Merge "Expose Context.sendOrderedBroadcast with appop" am: 08a94a2236
am: 43b6116549

Change-Id: I556cbff8a4aa8ca1f507cd1f63c435506b09cf0f
2019-11-04 13:31:04 -08:00
Jordan Liu
43b6116549 Merge "Expose Context.sendOrderedBroadcast with appop"
am: 08a94a2236

Change-Id: I8dd6fe3a9a70eba9d95cfd1e4cefd14c4ba376ed
2019-11-04 12:20:47 -08:00
Jordan Liu
08a94a2236 Merge "Expose Context.sendOrderedBroadcast with appop" 2019-11-04 19:59:28 +00:00
Chen Xu
626f4cdb81 Merge "new TelephonyRegistryManager" am: 7a79194fcb
am: 44d0c2a7dc

Change-Id: I2a8f753c2c9fbceb4a3cde9b31fdb3d7d82ea028
2019-11-04 10:46:46 -08:00
Chen Xu
44d0c2a7dc Merge "new TelephonyRegistryManager"
am: 7a79194fcb

Change-Id: I89e60de64c4c3b8b760413c136241b6c9c0fc98f
2019-11-04 10:35:20 -08:00
Chen Xu
7a79194fcb Merge "new TelephonyRegistryManager" 2019-11-04 18:21:51 +00:00
James.cf Lin
2bc9cd4c6c [RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony.
Bug: 139260938
Test: Manual
Change-Id: I9f70c8fe4167b51fa82bfb68ae9eacc422194309
2019-11-04 21:04:01 +08:00
Evan Rosky
5998c1831f Merge "Add a remote control mechanism for window containers" 2019-11-02 00:26:59 +00:00
Jordan Liu
a32e6fcb03 Expose Context.sendOrderedBroadcast with appop
Bug: 143100231
Test: atest ContextTest#testSendOrderedBroadcastWithAppOp
      atest ContextTest#testSendOrderedBroadcastWithAppOp_NotGranted

Change-Id: Ia75d0db11f337769eaf3cf5436e09a7d38b0564c
Merged-In: Ia75d0db11f337769eaf3cf5436e09a7d38b0564c
2019-11-01 16:25:15 -07:00
Jordan Liu
8e9d9055b0 Merge "Expose Context.sendOrderedBroadcast with appop" 2019-11-01 23:21:57 +00:00
Andrew Solovay
ee07a8cadb docs: Clarified behavior of TypedArray.getBoolean()
Doc currently says "The method will return whether [the attribute] is equal to zero", which could be read as "returns true if the attribute is zero", which is incorrect. Rephrased as: "...returns false if the attribute is equal to zero, and true otherwise."

Change-Id: Ie7d763ac2784ecc3a7fb522b4fa583ec8d2644d4
BUG: 143049875
Test: make ds-docs
2019-11-01 16:07:39 -07:00
Chen Xu
1f1c25e815 new TelephonyRegistryManager
today telephonyRegistry lives in system process
this is intended to persists all telephony listeners when
phone process crash. Telephony today notify system server by
using AIDL APIs directly. Instead, we are exposing a proper API
surface: telephonyRegistryManager where only phone app and
carrier privileged apps are allowed to use APIs in
TelephonyRegistryManger to notify telephony related status update.

Bug: 140908357
Test: Build & Manaul
Change-Id: I1b750751148925b4a7bd94553318907654012fc1
(cherry picked from commit 288b71c8c1)
Merged-in: I1b750751148925b4a7bd94553318907654012fc1
2019-11-01 22:44:36 +00:00
Philip P. Moltmann
cdc4a55cd1 Merge changes from topic "networklocationFeatureId"
* changes:
  Pipe through featureId for network location checks
  Support feature context in TelephonyManager
2019-11-01 22:01:59 +00:00
Jordan Liu
54735539fb Expose Context.sendOrderedBroadcast with appop
Bug: 143100231
Test: atest ContextTest#testSendOrderedBroadcastWithAppOp
      atest ContextTest#testSendOrderedBroadcastWithAppOp_NotGranted

Change-Id: Ia75d0db11f337769eaf3cf5436e09a7d38b0564c
2019-11-01 14:01:09 -07:00
Philip P. Moltmann
2d628b73bb Support feature context in TelephonyManager
...Managers are supposed to use the passed in context to support e.g.
alternate user or package contexts. Not sure why this is not the case
for TelephonyManager.

Hence special case the support for feature-contexts.

Test: atest CtsAppOpsTestCases:android.app.appops.cts.AppOpsLoggingTest#getCellInfo
Bug: 136595429
Change-Id: I7f498e282a34e39da6a1f6c129eff09674dce795
2019-11-01 08:54:36 -07:00
Philip P. Moltmann
98a24bf961 Add featureId to PermissionChecker
Test: Built
Change-Id: I645d578ccecc27122d2d44be828a9dac6dda7600
2019-10-30 16:16:00 -07:00
Xin Li
6f48900f50 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
Joanne Chung
fba3e88ef9 Grant permissions to ContentCapture and remove permission for TC.
1. Grant default permissions to ContentCapture app.
2. Remove unnecessary permissions for TC.
3. Made getContentCaptureServicePackageName() available for testing.

Bug: 139523153
Test: Manual. Use dumpsys pm to check the runtime permissions are grant.
Change-Id: If0d1669ac7d99785002c25cc783f1cf40ed7f13b
2019-10-30 21:48:00 +08:00
Tony Huang
40d8da39d2 Merge "Prevent return giant size thumbnail" 2019-10-30 06:39:53 +00:00
Philip P. Moltmann
128b70364e Note with featureId from ContentProvider
This takes the Context#getFeatureId from the calling context and pipes
it all way through to the noteOp calls done by the content provider.

Bug: 136595429
Test: atest CtsAppOpsTestCases (new test added to capture this case)
            TelecomUnitTests:CallLogManagerTest
	    ContentProviderClientTest
	    TelecomUnitTests:MissedCallNotifierImplTest
	    TelecomUnitTests:BasicCallTests
	    MediaInserterTest
	    PreferencesHelperTest
	    RankingHelperTest
	    PinnedSliceStateTest
	    FrameworksCoreTests:ContentResolverTest
Change-Id: I53b1035626229c920b353509a5bece157b52fb51
2019-10-29 15:41:28 -07:00
Evan Rosky
ddedfd46a9 Add a remote control mechanism for window containers
This adds a "IWindowContainer" interface which is an opaque
handle to a window-container in WM. It has very minimal
functionality and is intended to be used mostly as an
identifier.

Along with this handle, there is a WindowContainerTransaction
which can collect a set of container + configuration changess
and apply them all together. This will be used for remote
rotation control and other batched operations in the future.

Bug: 124011688
Test: Added some wm/core tests.
Change-Id: I691e7c11cd8c30f1a24fd64c6018a18933047847
2019-10-29 14:52:52 -07:00