Commit Graph

16835 Commits

Author SHA1 Message Date
Kholoud Mohamed
b848a1017c Merge "Add default cross-profile package APIs" 2020-01-07 11:29:09 +00:00
Kholoud Mohamed
ae9545e102 Merge "Add INTERACT_ACROSS_PROFILES appop" 2020-01-07 11:28:18 +00:00
Automerger Merge Worker
8303c9def2 Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756 am: ef100e45fe
Change-Id: Ie4ab2ecaa0778fa6ff7d75e5677dfb4bed1d443d
2020-01-07 10:45:04 +00:00
Automerger Merge Worker
ef100e45fe Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756
Change-Id: Ie3b6457ba196f7aa00ffb6e2fa77e5acbb926374
2020-01-07 10:30:35 +00:00
Neil Fuller
48247d9223 Merge "Change NetworkTimeUpdateServiceImpl behavior" 2020-01-07 10:07:08 +00:00
Jeffrey Huang
89e95d5b5f Merge changes I1510e44b,I9313299e,I7df5c644
* changes:
  Update setBroadcastSubscriber
  Update activeConfigsChangedBroadcast
  Creating PendingIntentRef
2020-01-07 02:18:22 +00:00
Automerger Merge Worker
2d3c66da00 Merge "Clean up SmsApplication and expose getDefaultSmsPackage" am: 2ada7fbac2 am: b128b793c7 am: cccf7a2b84
Change-Id: Id3b15d9d4d58235034405c85b7e10fc42f3e4172
2020-01-07 01:12:52 +00:00
Automerger Merge Worker
cccf7a2b84 Merge "Clean up SmsApplication and expose getDefaultSmsPackage" am: 2ada7fbac2 am: b128b793c7
Change-Id: Icee2c41d635883c6b9ede6bf6ec3bbfda22cdc1f
2020-01-07 01:01:54 +00:00
Hall Liu
2ada7fbac2 Merge "Clean up SmsApplication and expose getDefaultSmsPackage" 2020-01-07 00:36:51 +00:00
Jeffrey Huang
4f2e6bd68d Update setBroadcastSubscriber
change #setBroadcastSubscriber and #unsetBroadcastSubscriber
to avoid using intentsender

Bug: 146074295
Test: Ran GTS Tests
Change-Id: I1510e44bcdf49b579fd49f51081c6a40618039fa
2020-01-06 16:25:41 -08:00
Jeffrey Huang
47537a1c58 Update activeConfigsChangedBroadcast
avoid using intentsender in #sendActiveConfigsChangedBroadcast
and #removeActiveConfigsChangedBroadcast.

Bug: 146074295
Test: Ran GTS Tests
Change-Id: I9313299ea0bc89f092b1c62fbfc34e06a127eaa9
2020-01-06 16:25:41 -08:00
Jeffrey Huang
ad21374842 Creating PendingIntentRef
Update #setDataFetchOperation to avoid using intentsender.

Bug: 146074295
Test: Ran GTS Tests
Change-Id: I7df5c6441725aa4e46fac18925664c9455f50fb9
2020-01-06 16:25:41 -08:00
Winson Chiu
b07e14152b Merge "Test InstantAppResolverService method fallback" 2020-01-07 00:20:51 +00:00
Automerger Merge Worker
070e602547 Merge "Add new permissions" am: 62ace8c46a am: c0f9b27214 am: ec776dfda9
Change-Id: I8193a10bef4d829f41fd2609b571c9fa52365783
2020-01-06 21:35:59 +00:00
Automerger Merge Worker
ec776dfda9 Merge "Add new permissions" am: 62ace8c46a am: c0f9b27214
Change-Id: I2114c613729f0d84d773b7e8b58402cda302a8c8
2020-01-06 21:20:53 +00:00
Neil Fuller
62ace8c46a Merge "Add new permissions" 2020-01-06 19:38:25 +00:00
Automerger Merge Worker
9db2625b56 docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8 am: edcfda720b am: fc94ebae09 am: fe03e4c510
Change-Id: Ic7f014d01c361f43d91b811d8dbfb48aa66d0a1a
2020-01-06 19:01:10 +00:00
Automerger Merge Worker
fe03e4c510 docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8 am: edcfda720b am: fc94ebae09
Change-Id: I24a825364458eafd6d101d47a1cd467d7401cc42
2020-01-06 18:41:36 +00:00
Automerger Merge Worker
fc94ebae09 docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8 am: edcfda720b
Change-Id: Id0683ebab467f7baaac1650b15dd8e98f8057306
2020-01-06 18:24:58 +00:00
Automerger Merge Worker
edcfda720b docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8
Change-Id: I32360f63be584c4223c6aae692beb48c0bdf4802
2020-01-06 18:13:01 +00:00
kholoud mohamed
fff057610a Add default cross-profile package APIs
Add cross_profile_apps.xml and
DevicePolicyManager#getAllCrossProfilePackages. This sets the list of default package names set by the OEM for the user to approve/disapprove for
cross profile communication during managed provisioning setup.

Some Javadoc can be improved once all CLs are in, since different APIs
should refer to each other.

BUG: 136249261
BUG: 144577776
BUG: 145970297
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest

Change-Id: I214b521ffc7fb0179bff1ca65d6bc2a9f8decea3
2020-01-06 17:52:02 +00:00
kholoud mohamed
20ded1f79a Add INTERACT_ACROSS_PROFILES appop
Also, removes the 'privileged' protection level from the INTERACT_ACROSS_PROFILES permission and replaces it with 'appop'. 'Wellbeing' is also added temporarily, which will also be removed in this release.

This is part of a change to enable users to consent to cross profile app communications

BUG: 136249261
BUG: 144577776
BUG: 141690885
Test: atest AppOpsTest
Test: atest PermissionPolicyTest

Change-Id: I910daf7605f83946af171f38db002b920079f30b
2020-01-06 16:55:05 +00:00
Alex Johnston
e81f05cbce setTime and setTimeZone callable by profile owner of org-owned device
Modified setTime and setTimeZone to be callable by a a profile owner
of an organization-owned device as well as a device owner.

Bug: 138709470
Test: Manual testing with testdpc and the set auto time zone toggle
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetTime
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetTimeZone
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetTime
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetTimeZone
      atest com.android.cts.devicepolicy.DeviceOwnerTest#testSetTime

Change-Id: I2de94035c20fc53cdd629860c84f237f3e7eaa1f
2020-01-06 11:06:36 +00:00
Shafik Nassar
729e4d7422 Merge "Add permission for MANAGE_EXTERNAL_STORAGE AppOp" 2020-01-06 07:09:11 +00:00
Philip P. Moltmann
54354063a9 Merge "Collect AsyncNotedAppOp in same call as noteOp" 2020-01-04 03:24:00 +00:00
TreeHugger Robot
a812432da3 Merge "Remove obsolete comment from AppOpManager" 2020-01-03 20:49:33 +00:00
Philip P. Moltmann
da554e4de0 Collect AsyncNotedAppOp in same call as noteOp
This reduces the overhead of collecting noted app-ops to the same amount
of binder calls as if we would not have the feature

Before (conceptionally):
---------------------------------
mode = service.noteOp()
if (mode == allowed && shouldCollectAsyncOp) {
   fixup(message)
   service.noteAsyncOp()
}
----------------------------------

After (conceptionally):
----------------------------------
if (shouldCollectAsyncOp) {
   fixup(message)
}
mode = service.noteOp(shouldCollectAsyncOp, message)
----------------------------------

Bug: 136505050
Test: atest CtsAppOpsTestCases
Change-Id: If1b535a7c4b0f431f251c5d06cdf496c34920e23
2020-01-03 12:37:23 -08:00
Kevin Hufnagle
08a4e470b8 docs: Fix typo in IMPORTANCE_SERVICE description
Test: make ds-docs -j32

Bug: 140783404

Change-Id: Ife86109eebefe9c87f7c9ed4a0587676e3392d90
Exempt-From-Owner-Approval: Docs-only change
2020-01-03 20:05:31 +00:00
shafik
fc2130239d Remove obsolete comment from AppOpManager
Test: build
Change-Id: I6222c5f21b45adec10fbbf3b81030769424a8931
2020-01-03 19:40:43 +00:00
shafik
77cabc750b Add permission for MANAGE_EXTERNAL_STORAGE AppOp
Add new MANAGE_EXTERNAL_STORAGE permission. Couple it with
OP_MANAGE_EXTERNAL_STORAGE. Protection level for the permission is
currently signature|appop but will probably change later to |preinstalled.

Bug: 146425146
Test: device boots
Test: atest CtsPermission2TestCases:android.permission2.cts
            .RuntimePermissionProperties#allAppOpPermissionNeedAnAppOp
Change-Id: I0298ca0f6f463c88b95da6ba9853d061c6983da2
2020-01-03 19:32:07 +00:00
Philip P. Moltmann
d8c0bda6a6 Use Pools for noteOp related data objects
... to avoid too frequent allocations of small objects.

There is no pool for NoteOpEvent objects as they are only freed in very
uncommon situation. Hence they are directly reinited instad of going
through a pool.

Test: atest CtsAppOpsTestCases
Bug: 136595429
Change-Id: Ia39ca9682771cbc44ddbeaadc55f7e3f17c86449
2020-01-03 10:08:03 -08:00
TreeHugger Robot
f0031d2eba Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" 2020-01-03 17:58:18 +00:00
Automerger Merge Worker
08c2f021de Merge "Use ro.product.vndk.version for unbundled product apks" am: cbfcd44f68 am: e0e165f06e am: bbce9e0c5a
Change-Id: I781e0f1f9e70e584b986d5b2c7e7e87804c52157
2020-01-03 07:51:13 +00:00
Automerger Merge Worker
bbce9e0c5a Merge "Use ro.product.vndk.version for unbundled product apks" am: cbfcd44f68 am: e0e165f06e
Change-Id: I6507b31c3a1b36830a231064e560d978b9427f5c
2020-01-03 07:36:52 +00:00
Justin Yun
1ef374f98b Use ro.product.vndk.version for unbundled product apks
Instead of using "ro.product.apps.unbundled", use
"ro.product.vndk.version" to determine if product apks are unbundled.
"ro.product.vndk.version" will be defined by
PRODUCT_PRODUCT_VNDK_VERSION. If it is defined, all product apks must
be unbundled.

Bug: 144534640
Bug: 127738095
Bug: 128557860
Test: boot and check logs if product apps are loaded successfully
Change-Id: I6d0f7c20e131dfe12203c63a14e6254a8223893b
2020-01-02 06:30:02 +00:00
Hall Liu
35c243caa4 Clean up SmsApplication and expose getDefaultSmsPackage
- Clean up usages of hidden AppOpsManager APIs in SmsApplication
- Add unit tests for SmsApplication
- Expose RoleManager#getDefaultSmsPackage for use in SmsApplication.

Bug: 146834818
Test: atest SmsApplicationTest
Change-Id: I4ab49d7f6274389e7de7cd7223cab3c433936044
2019-12-31 14:41:02 -08:00
Tej Singh
b8f296da22 Unit tests for PullAtomMetadata
Bug: 146385269
Test: bit FrameworksCoreTests:android.app.PullAtomMetadata
Change-Id: I4c78d2744348dbab6ee792caa0a7a8bbd3c17f28
2019-12-30 13:04:46 -08:00
Daulet Zhanguzin
0af97d60d7 Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: I42117ebfb640e3b0b133183e5e146860bed8471a
2019-12-30 15:41:28 +00:00
Chavi Weingarten
9ec9264138 Merge "Removed regionId from updateTapExcludeRegion request." 2019-12-27 16:24:50 +00:00
chaviw
aa0d74e6c6 Removed regionId from updateTapExcludeRegion request.
There was no need for regionId in the request since you can just replace
the previous region with a new one. This reduces confusion and
simplifies the code. This also allowed TapExcludeRegionHolder to get
deleted and just store the excluded region in the WindowState.

Additionally, this fixed a bug where the excluded region would get
overwritten when the window region was smaller. If the window region was
resized later, the exclude region would remain small.

This is also preparing for more uses of this API with embedded windows
and window magnification.

Test: ActivityViewTest
Change-Id: Ia151115b5a5e8f2ce5e606fe627821dcfef5d9b5
2019-12-26 15:47:37 -08:00
Wale Ogunwale
194435b5a2 Introduce WINDOWING_MODE_MULTI_WINDOW
Generic multi-window with no presentation attribution from the wm-core.
Needed for wm-shell to correctly drive multi-window cases like Bubbles
and n-way-split.
Current windowing modes split and freeform will probably be migrated to
this once wm-shell drives their presentation.

Test: N/A
Bug: 139371701
Change-Id: I5247f41b4f67d21b2bb5929a52e8ec93c41644c2
2019-12-26 12:56:09 -08:00
TreeHugger Robot
1e4c5237df Merge "Add minimal post processing API to framework" 2019-12-25 13:14:51 +00:00
Ben Lin
eefcd54641 Merge "Add #onPictureInPictureRequested to Activity and ATM" 2019-12-23 22:08:59 +00:00
Michael Groover
8142ee3e61 Merge "Make DPM#checkDeviceIdentifierAccess a SystemApi" 2019-12-23 21:26:09 +00:00
TreeHugger Robot
3f7ef32b9f Merge "New API for query trust of a fs-verity certificate" 2019-12-23 20:18:40 +00:00
Victor Hsieh
20fe1f6f22 New API for query trust of a fs-verity certificate
The corresponding service is also added.

The API can be used by a store to know whether their certificate is
trusted on the device. As optimization, they only need to download
.fsv_sig signature file if it will be used.

The API can also be used to gradually switch to stronger key. The store
can query with their certificates in priority order and download the best
signature.

Test: Passed new GTS working in progress
Bug: 142573505
Change-Id: Ic788cd04aeaed35ad62113fe9e7535b8fa63b5ee
2019-12-23 09:21:19 -08:00
Galia Peycheva
056b3ee745 Add minimal post processing API to framework
This API allows applications to instruct the connected display to do minimal
post processing on the produced image or video frames. This will switch the
display to a low latency mode (ALLM, Game mode or some other custom
implementation thereof), reducing lag in the final images. Thus, minimal post
processing would greatly enhance performance for gaming and video
conferencing applications. It would not, however, suit applications that
prioritise image quality over performance.

This CL adds 2 public method:
 - Window.setPreferMinimalPostProcessing()
(this can also be set in WindowManager.LayoutParams.preferMinimalPostProcessing)
If minimal post processing is preferred, the connected display will be requested
to go into low latency mode, which reduces image processing, resulting in better
performance for gaming applications. If the Display sink is connected via HDMI,
the device will begin to send infoframes with Auto Low Latency Mode enabled and
Game Content Type. This will switch the connected display to a lower latency
mode (if available).
For more information, see HDMI 2.1 specification.

If the Display sink has an internal connection or uses some other protocol than
HDMI, effects may be similar but implementation-defined.

 - Display.isMinimalPostProcessingPreferred()
Returns true if the connected display supports either Low Latency Mode (ALLM or
some other custom low latency implementation) or Game content type.

Bug: 135116095

Test: make -> flash on ATV OTT device -> open an activity which requests minimal
post processing -> check SurfaceControl logs -> verify correct signals are
passed to native

Change-Id: I5508bb9e5c138b0f2b42d8f8fab10e1915ba3cb6
2019-12-23 17:27:55 +01:00
Eran Messeri
6125f5fdc6 Merge "Individual attestation: throw if unsupported" 2019-12-23 15:50:51 +00:00
Song Pan
6e3677c0c3 Implement methods in AppIntegrityManagerServiceImpl.
1. Pushing rules.
2. Getting version/rule provider.
3. Handle integrity verification request

Bug:143689885

Test: atest AppIntegrityManagerServiceImplTest
Change-Id: I0f2d554efbd3ba115eab10238908c9c2a3f2139c
2019-12-23 13:24:08 +00:00
TreeHugger Robot
41ffe9852c Merge "Allow pullAtomCallbacks to be unregistered in Java" 2019-12-21 08:41:45 +00:00