Commit Graph

9104 Commits

Author SHA1 Message Date
Eugene Susla
2ac02b0d3e Add public API to check if current app is auto-revoke exempt
Test: presubmit
Bug: 146513245
Change-Id: I18ac5957eb9ae1ea0d7de2daf407e6d797079937
2020-03-13 22:44:00 +00:00
Eugene Susla
ff17a587a8 Merge "Introduce per-app manifest flags for autoRevoke" into rvc-dev 2020-03-13 22:40:36 +00:00
Evan Severson
a285890237 Merge "Update reserved permission controller flags name" into rvc-dev 2020-03-13 18:30:25 +00:00
Eugene Susla
db77bc14de Introduce per-app manifest flags for autoRevoke
This introduces extra attributes on <application/> tag corresponding to
requesting to be shown in UI for the user to disable auto-revoke
(allowDontAutoRevokePermissions)
and being whitelisted by the installer (dontAutoRevokePermissions)

Test: presubmit
Bug: 146513245
Change-Id: I07902632812b70ea418a667d343b74d7ae170bb9
2020-03-13 11:23:26 -07:00
Garfield Tan
7fcb7d59c4 Merge "Add window layout affinity." into rvc-dev 2020-03-13 16:16:18 +00:00
Philip P. Moltmann
d7a823623f Merge "Rename featureId -> attributionTag" into rvc-dev 2020-03-13 14:26:31 +00:00
Garfield Tan
5901e7ce4f Add window layout affinity.
Window layout affinity is used to combine launch params records for
activities from the same UID that have the same value.

I didn't choose to replace component name as the key to launch params
map by window layout affinity because keeping both has some good traits
when app is updated with some window layout affinity changes:
1) The record with component name is still updated even if it starts to
have a window layout affinity so we don't have to worry about the
orphaned record;
2) Activity that changes/loses window layout affinity can always use the
last launch param that activity saves, instead of starting from default
launch behavior again;
3) App removal can still naturally clean up all useless records.

Those come at a cost that we need to iterate all activities in the same
window layout affinity when getting the launch params, but it's OK
because it's not very common to have specific task affinities and in
cases where they do the number of activities sharing the same task
affinities is limited.

Bug: 146015757
Test: Manual test that 2 activities in a single test app shares the same
launch params record.
Test: atest LaunchParamsPersisterTests

Change-Id: Idb2e7509c6bdf22ac6c9cf41059e9c696419028b
2020-03-12 17:04:45 -07:00
Evgenii Stepanov
91482ccc8a Merge "Add "enableGwpAsan" tag to android manifest." into rvc-dev 2020-03-12 21:13:25 +00:00
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Patrick Baumann
987b12ddcf Merge "Do not set referrerUri on SessionInfo for non-owners" into rvc-dev 2020-03-12 19:16:40 +00:00
Alex Kershaw
6fa3741fdb Merge "Add overloaded API with activity options parameter" into rvc-dev 2020-03-12 17:47:59 +00:00
Evgenii Stepanov
102d3d8669 Add "enableGwpAsan" tag to android manifest.
This tag can be used to enable and disable gwp-asan on applications and
their components. The default setting is disabled, except for the system
applications which are enabled with a small probability (approx. 1% of
processes).

Enabling gwp-asan can be used to crowd test an app.

This change includes a compat feature that overrides the default value
of enableGwpAsan for an app.

Bug: 149991821
Test: atest CtsGwpAsanTestCases
Exempt-From-Owner-Approval: cherrypick
Merged-In: I5eb647c517e5487b1d1eed6b9a43242490f19289
Change-Id: I5b4db666f38af846927f88702cc690f0916cadb1
2020-03-12 17:19:23 +00:00
TreeHugger Robot
c688e204e1 Merge "Remove misleading comments" into rvc-dev 2020-03-12 03:39:07 +00:00
Alex Kershaw
a9f0052af5 Add overloaded API with activity options parameter
This is from calendar team's feedback. It allows them to
create a nice animation when launching the activity. This also mirrors
the implementation in the Activity class.

Fixes: 151150552
Test: atest com.android.cts.devicepolicy.CrossProfileAppsHostSideTest#testStartActivityIntent
Change-Id: Ie120896e50d8b2c033b9cb156357bd696eb033e0
2020-03-12 01:29:27 +00:00
TreeHugger Robot
592181386c Merge "Making time-zone an API constant" into rvc-dev 2020-03-12 01:23:28 +00:00
Pinyao Ting
021faf9d19 Remove misleading comments
The display order of the shortcuts is solely determined by launcher apps
implementation at their own discretion, the rank of the shortcut merely
serves as a guideline. Thus removing the misleading paragraph to prevent
confusions.

Bug: 150254995
Test: make
Change-Id: I4cdb9a5779edfdb5b56659e4787b3f13e7e3054e
2020-03-11 23:42:58 +00:00
TreeHugger Robot
76b221c84b Merge "WindowContext: Add @WindowType intdef" into rvc-dev 2020-03-11 22:02:27 +00:00
TreeHugger Robot
eaf14b274a Merge "Clarify InstallSourceInfo javadoc." into rvc-dev 2020-03-11 19:34:21 +00:00
Patrick Baumann
6bc126b040 Do not set referrerUri on SessionInfo for non-owners
This change leaves the referrerUri field null when the caller leading to
its production is not the owner of the session.

Bug: 142125338
Test: atest SessionReferrerUriTest
Change-Id: I84679ea0636aa2097e25e23813c48134c9cc1d75
2020-03-11 11:47:05 -07:00
Adrian Roos
9c17e537c7 WindowContext: Add @WindowType intdef
Fixes: 151156902
Test: make checkapi
Change-Id: I966f8cd305189a54a5de48b03e5b4bdd51700fdf
2020-03-11 16:08:16 +01:00
Suprabh Shukla
2e7408eddb Making time-zone an API constant
This is already effectively an API the way it is documented.
Updating all the references of the hard-coded constant.

Test: make update-api && make

Bug: 151112929
Change-Id: Iadeb03c516215cfc51bc8604b67250348d5a4375
2020-03-10 18:05:02 -07:00
Patrick Baumann
93a9ab17ef Merge "Adds support for wildcards in IntentFilter" into rvc-dev 2020-03-11 00:30:51 +00:00
Jeff Sharkey
a7a96ad6f8 Merge "Give hidden API behavior to legacy apps." into rvc-dev 2020-03-10 23:03:41 +00:00
Jeff Sharkey
8b0cff7108 Give hidden API behavior to legacy apps.
Starting in R, there is a new public API overload that delivers a
flags argument.  Some apps may be relying on a previous hidden API
that delivered a userId argument, and this change is used to control
delivery of the new flags argument in its place.

There are dozens of these hidden API users are in the system UID,
either in the system process or the Settings app, so we hard-code
giving them the legacy behavior, since refactoring would be messy
between internal and AOSP branches.

Also adjust incoming and outgoing method signatures to use slightly
more flexible Collection<Uri>, which has handy methods like
contains() and isEmpty().

Bug: 150939131
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: If6a77449e19215cf1c60d4217e62fc04b0959bfc
2020-03-10 16:36:21 -06:00
Nate Myren
e9b4b0009b Merge "Add intent for auto revoke UI" into rvc-dev 2020-03-10 18:55:52 +00:00
Oli Lan
e6dbe2b880 Merge "Rename ApexContext to ApexEnvironment." into rvc-dev 2020-03-10 10:20:13 +00:00
Eugene Susla
623468289f Merge "Replace auto-revoke whitelist permission flags with appop" into rvc-dev 2020-03-10 02:53:51 +00:00
Jeff Sharkey
469263a457 Merge "More CTS for APIs used by Mainline." into rvc-dev 2020-03-09 22:44:08 +00:00
TreeHugger Robot
941e815aab Merge changes I696e3c5d,Iea7a5610,If627e613 into rvc-dev
* changes:
  update javadoc for InstallationFile
  fix error message
  remove incremental.check_loader
2020-03-09 21:47:43 +00:00
Nate Myren
716d0a48b8 Add intent for auto revoke UI
Add intent that signifies the desire to access the auto revoke UI inside
the Permission Controller.

Bug: 146513245
Test: none needed
Change-Id: I58d32d2c02941f65c52e054ad712541126086586
2020-03-09 13:55:18 -07:00
Jeff Sharkey
9ed18340ca More CTS for APIs used by Mainline.
Bug: 150641862, 150641715, 150641138, 150640123
Test: atest cts/tests/tests/content/src/android/content/cts/ContentResolverTest.java
Test: atest cts/tests/tests/os/src/android/os/cts/BinderTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/DocumentsContractTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/media/MediaStoreTest.java
Change-Id: I6f9ae1dcffd79fd6c422962d9ca64d4b98841766
2020-03-09 20:12:55 +00:00
Patrick Baumann
eb526105cb Adds support for wildcards in IntentFilter
This change adds support for wildcards when computing matching during
package add. This enables apps to define queries->intents tags that
match *all* actions, categories, schemes, authorities and/or
scheme-specific parts.

Fixes: 150451794
Test: atest AppEnumerationTests IntentFilterTest
Change-Id: I00508786c6a4b557fdceaec500ba4a69ce8d5362
2020-03-09 10:58:01 -07:00
Alan Stokes
45dfa1f115 Clarify InstallSourceInfo javadoc.
Added comments to better explain:
- How initiating differs from installing;
- When null might be returned from either (expanding on existing
  comments on the PM#getInstallSourceInfo method).

Bug: 150330937
Test: Still builds.
Change-Id: I03c5d92f643e97019b00778ca1d8e0c92e25dac8
2020-03-09 17:37:25 +00:00
Nick Cook
e41357fc9d Merge "docs: Among devices which support Vulkan 1.1, a subset support it via software emulation. Refer to the NDK docs on how to address these devices. See also cr/292399283." into rvc-dev 2020-03-09 16:38:16 +00:00
Songchun Fan
73358eb5f0 update javadoc for InstallationFile
Also hides the constructor which is only used internally.

BUG: 149299379
Test: builds
Change-Id: I696e3c5db7b7591276b741f68d50edf47c2f30a0
2020-03-09 08:57:26 -07:00
TreeHugger Robot
df5dff04db Merge "rename incremental service name" into rvc-dev 2020-03-09 14:12:08 +00:00
Winson Chiu
585c4df7d4 Merge "Clarify actor requirements in OverlayManager API" into rvc-dev 2020-03-06 22:46:53 +00:00
John Reck
e2e7cd5d4c Merge "Deprecate long-obsolete android:anyDensity" into rvc-dev 2020-03-06 20:37:53 +00:00
Winson
08f8c49f33 Clarify actor requirements in OverlayManager API
Bug: 135052950
Bug: 138458046

Test: none; docs only change

Change-Id: Ibe0d139cd0e7f819b8e85d109ea38fe853a0b080
2020-03-06 12:35:06 -08:00
John Reck
7ce90af518 Deprecate long-obsolete android:anyDensity
This API exists for compatibility with pre-Donut applications
that were not properly density aware. As such, there's no
current reason to use this. So deprecate it.

Bug: 150869482
Test: builds
Change-Id: Ie12957988d5f5d292277a291a20b565c2e3ef46e
2020-03-05 16:30:30 -08:00
Jeff Sharkey
189e00a46b Merge "Use flags to indicate reason for Uri changes." into rvc-dev 2020-03-06 00:04:24 +00:00
TreeHugger Robot
8caff7dc81 Merge "DO NOT MERGE: Remove AppSearch from Android R." into rvc-dev 2020-03-05 21:09:00 +00:00
Jeff Sharkey
d70325359e Use flags to indicate reason for Uri changes.
As part of MediaProvider becoming a Mainline module, some partners
need to understand more details about what triggered a Uri change
notification.  This helps listening apps avoid making expensive and
race-condition-prone calls back into MediaProvider; typically when
they're only interested in insert and delete operations.  This change
uses the existing "flags" argument to communicate the reason.

This change adds overloads to ContentObserver for listening apps to
receive these flags.  In addition, we add overloads that deliver a
clustered set of multiple Uris together in a single Binder transaction
to improve overall efficiency.  (This matches well with the existing
CR.notifyChange() API that we added earlier this year, since they
both work with Iterable<Uri>.)

Tests to verify that we only collapse Uris together when all other
method arguments are identical.

Bug: 147778404, 144464323
Test: atest CtsDatabaseTestCases
Test: atest CtsContentTestCases:android.content.cts.ContentResolverTest
Test: atest FrameworksServicesTests:com.android.server.content.ObserverNodeTest
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I0bbd8a8b4a898ab6f891d085de0ecb4d68cbe302
2020-03-05 11:01:23 -07:00
Evan Severson
be264b63be Update reserved permission controller flags name
Feedback from the api council advised on changing the name of reserved
permission controller flag mask constant and also update the
documentation to be more descriptive.

Fixes: 149216099
Test: Presubmit
Change-Id: I15db4204ef9c3468676d93331b760b39a3488c81
2020-03-05 09:57:14 -08:00
Songchun Fan
d1c62a4e89 rename incremental service name
Previously we had to use "incremental_service" because the proxy service
was using "incremental". Now that we have removed the proxy service, we
can just use "incremental".

Test: adb shell dumpsys incremental
Test: atest PackageManagerShellCommandIncrementalTest
BUG: 150406132
Change-Id: I0788cb90bf73b074506f9079253c433429eef782
2020-03-05 09:23:29 -08:00
Galia Peycheva
fc1430a39e Merge "Make ActivityInfo.preferMinimalPostProcessing a flag" into rvc-dev 2020-03-05 15:45:06 +00:00
Patrick Baumann
3b91ac3e6c Merge "Logs for test & debug blocks" into rvc-dev 2020-03-05 15:25:46 +00:00
Oli Lan
1573877a00 Rename ApexContext to ApexEnvironment.
This renames the new ApexContext class to ApexEnvironment, at the
request of the API Council.

Bug: 150685788
Test: atest ApexEnvironmentTest
Change-Id: I4340b0c7e78d240f4e48fdc94ec9e7d60e58d35c
2020-03-05 13:47:43 +00:00
Eugene Susla
5fc2d767ce Replace auto-revoke whitelist permission flags with appop
Bug: 146513245
Test: presubmit
Change-Id: I6f901b7e5dfe64840e7c3c0ee444730ac6eb4cfc
2020-03-04 18:46:22 -08:00
Khaled Abdelmohsen
759dbb7cf6 Merge "Extract source stamp during app install" into rvc-dev 2020-03-04 23:47:33 +00:00