Commit Graph

11641 Commits

Author SHA1 Message Date
Josh Hou
9e02fbf652 Merge "APP languages detection" 2022-01-17 10:58:05 +00:00
David Zeuthen
d1fdef6927 Merge "identity: Add multi-document presentation support." am: 91b96e3454 am: ae0d53c78d am: 62c776a7c2 am: 2bf36b756d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824674

Change-Id: I3ab418b52a3915ac324baa59f38fb936e2eee5b4
2022-01-14 22:14:15 +00:00
David Zeuthen
2bf36b756d Merge "identity: Add multi-document presentation support." am: 91b96e3454 am: ae0d53c78d am: 62c776a7c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824674

Change-Id: Idb4d1ddd89a5ca58ccc852c67f098dad04cb1c5c
2022-01-14 21:56:18 +00:00
David Zeuthen
62c776a7c2 Merge "identity: Add multi-document presentation support." am: 91b96e3454 am: ae0d53c78d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824674

Change-Id: I8b5ade103c4275871e990369c36480013f47f129
2022-01-14 21:39:07 +00:00
David Zeuthen
91b96e3454 Merge "identity: Add multi-document presentation support." 2022-01-14 21:07:03 +00:00
Kweku Adams
aec1bdf2ac Merge "Indicate that UID_REMOVED has EXTRA_REPLACING." 2022-01-14 17:18:51 +00:00
Artur Satayev
8b326737de Merge "Introduce initOrder for apex-system-services." 2022-01-14 13:15:44 +00:00
Felka Chang
255f348a49 Tidy up CtsAppSecurityHostTestCases for PM test plan
According to the go/audit_pm_test_plan_sheet_2021, the following tests
are necessary to run for the presubmit process.
* android.appsecurity.cts.ApkVerityInstallTest (ag/15434575)
* android.appsecurity.cts.AppSecurityTests (ag/16473520)
* android.appsecurity.cts.ApplicationVisibilityTest (ag/15151833)
* android.appsecurity.cts.EphemeralTest (ag/16097868)
* android.appsecurity.cts.ExternalStorageHostTest (ag/16473520)
* android.appsecurity.cts.InstantAppUserTest (ag/16097868)
* android.appsecurity.cts.IsolatedSplitsTests (ag/15509173)
* android.appsecurity.cts.OverlayHostTest (ag/15938874)
* android.appsecurity.cts.PackageVisibilityTest (ag/15461803)
* android.appsecurity.cts.PkgInstallSignatureVerificationTest
  (ag/16095666)
* android.appsecurity.cts.PrivilegedUpdateTests (ag/15744081)
* android.appsecurity.cts.SharedUserIdTest (ag/7013394)
* android.appsecurity.cts.SplitTests (ag/15509173)

CtsAppSecurityHostTestCases contains some tests not belonging
to PackageManager. It annotates @Presubmit for those classes belonging
to PackageManager. It will be triggered via
frameworks/base/core/java/android/content/pmTEST_MAPPING by the
presubmit process.

Test: TP="CtsAppSecurityHostTestCases:android.appsecurity.cts"; atest \
     ${TP}.ApkVerityInstallTest \
     ${TP}.AppSecurityTests \
     ${TP}.ApplicationVisibilityTest \
     ${TP}.EphemeralTest \
     ${TP}.ExternalStorageHostTest \
     ${TP}.InstantAppUserTest \
     ${TP}.IsolatedSplitsTests \
     ${TP}.OverlayHostTest \
     ${TP}.PackageVisibilityTest \
     ${TP}.PkgInstallSignatureVerificationTest \
     ${TP}.PrivilegedUpdateTests \
     ${TP}.SharedUserIdTest \
     ${TP}.SplitTests

Bug: 180650365
Change-Id: I0b626e311a598d0fb953019a016a1dbafc380f81
2022-01-14 03:47:13 +00:00
Felka Chang
6d3144beae Merge "Add StaticSharedLibsHostTests as PackageManager presubmit" 2022-01-14 03:46:04 +00:00
Josh Hou
e19a1c6836 APP languages detection
Parse the contents of LocaleConfig's XML to obtain the app-specific supported locales

Bug: 203015582
Bug: 193787310
Test: atest LocaleConfigTest
      Local test APK
Change-Id: Ie9314e4c09f881f834bf7ea3cc0780d1545e6ce7
2022-01-14 04:26:49 +08:00
Kweku Adams
159ca40bc5 Indicate that UID_REMOVED has EXTRA_REPLACING.
Bug: 140731248
Change-Id: Ia24a688f277580ed4edc1fac12ad05b8f7deb919
Test: N/A
2022-01-13 18:56:52 +00:00
satayev
8308d9e981 Introduce initOrder for apex-system-services.
This allows to have a relative order between apex system services if
needed due to dependencies.

Bug: 192880996
Test: atest ApexSystemServicesTestCases PackageParserTest ApexManagerTest
Change-Id: Ib9700be48390f8a78135c76e79ad2bc4cb6e8577
2022-01-13 14:06:13 +00:00
Gareth Vaughan
6856e6804f Merge changes from topic "START_CROSS_PROFILE_ACTIVITIES"
* changes:
  Add START_CROSS_PROFILE_ACTIVITIES to startActivity
  Add new permission START_CROSS_PROFILE_ACTIVITIES
2022-01-13 13:17:37 +00:00
TreeHugger Robot
8fb380494d Merge "BaseParceledListSlice: remove List reference once transfer completes" 2022-01-13 02:50:15 +00:00
Treehugger Robot
9b21bb0fec Merge "Make ACTION_SETTING_RESTORED SystemApi" am: 2e2a97c04b am: d8ef70a405 am: 2f68d6bc5c am: 082f6e9f08
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1945287

Change-Id: I87c03ec850e15670db5884d619bd1e52784d5954
2022-01-13 02:35:34 +00:00
Treehugger Robot
082f6e9f08 Merge "Make ACTION_SETTING_RESTORED SystemApi" am: 2e2a97c04b am: d8ef70a405 am: 2f68d6bc5c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1945287

Change-Id: I447d2f861e1c05f9483fe60e48e45918c448adfd
2022-01-13 02:24:11 +00:00
Chun-Wei Wang
1227d3af24 Merge "Rename STAGED_SESSION* error codes (2/n)" 2022-01-13 02:15:16 +00:00
Treehugger Robot
2f68d6bc5c Merge "Make ACTION_SETTING_RESTORED SystemApi" am: 2e2a97c04b am: d8ef70a405
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1945287

Change-Id: Ia012adfcf1febe63dc5dc8a89d5b2133fe909590
2022-01-13 02:09:42 +00:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
Thomas Vannet
4c09f45a59 Merge "Add self revocation public API" 2022-01-12 21:44:32 +00:00
Michael Groover
5af00f9e0f Merge "Fix typo for userFilter when registering for ACTION_USER_REMOVED" 2022-01-12 21:12:15 +00:00
William Escande
543d84f6b2 Make ACTION_SETTING_RESTORED SystemApi
Because Bluetooth is going mainline, we need to remove call to hidden
API.
Intent.ACTION_SETTING_RESTORED and extra are currently hidden.
There is no known alternative, so this CL make them SystemApi.

Bug: 211851706
Test: Build + start bt
Tag: #refactor
Change-Id: I7a105946f075819f21b91a39bc37c6e167439bf4
2022-01-12 19:33:02 +00:00
Gareth Vaughan
4851724447 Add START_CROSS_PROFILE_ACTIVITIES to startActivity
This allows holders of START_CROSS_PROFILE_ACTIVITIES permission to start an activity of the caller package in the other profile.

Test: atest CrossProfileAppsHostSideTest (with new tests in change I661d4b7132291950c8bcb4690d90154a78751b1e)
Ignore-AOSP-First: seeking internal review on WIP change prior to merging in AOSP
Bug: 207117478
Change-Id: I5afa2e458b2eda4f53cfceabe3af950c0df63ad7
2022-01-12 12:47:03 -05:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00
Rhed Jao
58f8fb0e20 Merge "Fix queries tag for browsers matches intent filters incorrectly" 2022-01-12 10:44:57 +00:00
JW Wang
af8ff1c9a3 Rename STAGED_SESSION* error codes (2/n)
Rename the error codes as they will be used by
non-staged sessions as well.

Bug: 210359798
Test: atest StagingManagerTest \
            PackageInstallerSessionTest \
            CtsStagedInstallHostTestCases

Change-Id: Iec572d7a85f2615204ac069a42edb569ecadb294
2022-01-12 15:12:13 +08:00
TreeHugger Robot
02bfe89079 Merge "Add CtsInstallHostTestCases/ApkVerityTest into PM test plan" 2022-01-12 05:22:27 +00:00
Michael Groover
c91f86ea34 Fix typo for userFilter when registering for ACTION_USER_REMOVED
This commit fixes a typo in the RegisteredServicesCache when
registering for the ACTION_USER_REMOVED broadcast; previously this
action was added to the sdFilter that was defined for the previous
call to registerReceiver, but then the last call to registerReceiver
used the empty userFilter.

Fixes: 214122859
Test: Manually verified receiver was successfully registered with action
Change-Id: I72b49fa02845844fe7788817430f289f2aad7bc4
2022-01-11 19:00:28 -08:00
Thomas Vannet
af615e7baf Add self revocation public API
Test: Manual test using a non-privileged app, atest
android.permission.cts.SelfRevokeRuntimePermissionTest

When calling the API, the permission (along with any other permissions
from the same group) for the current package is downgraded to a one-time
permission, and a one-time permission session is started.

Bug: 210387494

Change-Id: I9f061cbc8c3db720127c96200fe94a644246b6d7
2022-01-11 16:32:40 -08:00
Bernardo Rufino
c6ebb14b7d Merge "Migrate unsafer parcel APIs [2]" 2022-01-11 19:20:36 +00:00
David Zeuthen
6fc37331a6 identity: Add multi-document presentation support.
This new PresentationSession interface enables an application to do a
multi-document presentation, something which isn't possible with the
existing API. As a practical example of this consider presenting both
your Mobile Driving License and your Vaccination Certificate in a single
transaction.

Also update the documentation for IdentityCredential to clarify that
the same AuthKey is used for multiple getEntries() calls on the same
credential.

Also deprecate existing IdentityCredential.getEntries() method and
related methods and classes.

Bug: 197965513
Test: New CTS tests and new screen in CtsVerifier
Change-Id: I74534969143882552407917a82f44d43da12711c
2022-01-11 10:40:51 -05:00
Yurii Zubrytskyi
8fe59ba86d Merge "add FrameworkCoreTest for AndroidResources test plan" 2022-01-11 07:18:41 +00:00
Darrell Shi
a2b8c40161 Merge "Add FEATURE_DREAM_OVERLAY feature flag." 2022-01-11 00:33:07 +00:00
TreeHugger Robot
7d24159ba2 Merge "Intercept activity start to check for notification permissions" 2022-01-10 19:54:45 +00:00
TreeHugger Robot
c83044be74 Merge "Add SDK to the IntDef" 2022-01-10 19:19:41 +00:00
Felka Chang
55ed77a79b Add CtsInstallHostTestCases/ApkVerityTest into PM test plan
This patch adds the followingtest packages into PackageManager
test plan.
* ApkVerityTest
    * http://ab/I95200010006888354
    * 1 minute and 50.2 seconds
    * presubmit
* CtsInstallHostTestCases
    * http://ab/I17400010007073846
    * 1 hour and 25 minutes
    * postsubmit
    * ag/16118712

Test: atest ApkVerityTest
Test: atest CtsInstallHostTestCases

Bug: 180650365
Change-Id: I165412b791865707628a49e67236001ee2faf3d1
2022-01-10 23:15:57 +08:00
Rhed Jao
0815ac1372 Fix queries tag for browsers matches intent filters incorrectly
The queries tag in the manifest that declares intent's visibility
with the uri data without the host name should only match browsers'
intent filters. This CL fixes intent filters with a wildcard prefix
in the host name are matched incorrectly by the queries of browsers.

Bug: 210405218
Test: atest AppEnumerationTests
Test: atest IntentFilterTest
Change-Id: Ib4e968c1f9e6e543c1d3dece230579def10ee306
2022-01-10 20:09:54 +08:00
Makoto Onuki
8b84813b99 Merge "Do not run unnecessary code in the common case" 2022-01-07 19:26:43 +00:00
Darrell Shi
40330dfe5e Add FEATURE_DREAM_OVERLAY feature flag.
Bug: 213235276
Test: manual
Change-Id: I4228861e7bcb80274df1b2200bcebc56cb8f680f
2022-01-07 09:25:18 -08:00
Xiaoyu Jin
e67f2a5b65 Merge "Add documents for the required permission" 2022-01-07 09:50:30 +00:00
Makoto Onuki
c5b2de9dec Do not run unnecessary code in the common case
`processes` is initialized as an empty map, so we're currently always
hitting the loop case. We should avoid it.

Bug: 213021110
Test: atest PackageManagerPerfTest#testGetApplicationInfoWithFiltering
Test: atest CtsProcessTest
Test: atest PackageManagerServiceUnitTests
Change-Id: I49fa8adb0cf10e405b2251e7de78caea1bbd8fa1
2022-01-06 16:48:11 -08:00
Alex Buynytskyy
89d3f2f367 Add SDK to the IntDef
Bug: 210622326
Fixes: 210622326
Test: presubmit
Change-Id: Ib1910f18e03fa21a9c3b431c2d3e496744ae0a13
2022-01-06 15:40:47 -08:00
Lee Shombert
9a686c07ba Merge "Prepare PropertyInvalidatedCache for SystemApi" 2022-01-06 23:14:05 +00:00
Bernardo Rufino
74ee11c3f4 Migrate unsafer parcel APIs [2]
Manually migrate the few cases of:
* readArray()
* readParcelableArray()

To the new parcel APIs that take the expected type as the last
parameter. This enhances security because it prevents unexpected types
*before* running unparcelling code. More details at go/safer-parcel.

Owners, please check that the type of the objects expected is always a
subtype of the type provided as the 3rd parameter. This is usually easy
to verify due to casts that happen shortly after.

These changes often allowed further transformations but I decided to
avoid them to keep this change small and targeted.

This was manual since it's tricky to get lint to infer the type in
those cases and it was only a few.

Bug: 195622897
Test: TH passes
Change-Id: I262ed7cd6d3bc15b32e9296e88a8a67fdb59e880
2022-01-06 18:35:31 +00:00
Nikita Ioffe
1b2bd1e83a Merge changes from topic "no_app_data_storage"
* changes:
  Don't bind mount app storage for app with NO_APP_DATA_STORAGE
  Don't create app data dirs if app requests not to
2022-01-06 16:36:01 +00:00
TreeHugger Robot
c452e34460 Merge "Add 6 CTS packages into PM test plan" 2022-01-06 08:05:52 +00:00
TreeHugger Robot
efa662ec64 Merge "Integrate LauncherApps API with AppSearch" 2022-01-06 07:40:19 +00:00
Jackal Guo
2648ce4633 Merge "Add enforcement for duplicate permissions" 2022-01-06 01:53:45 +00:00
Xinyi Zhou
e0784e05bd Merge "Expose Conext.NEARBY_SERVICE as SystemApi" 2022-01-05 21:50:01 +00:00
Xinyi Zhou
1a07c53231 Expose Conext.NEARBY_SERVICE as SystemApi
Change-Id: Ie9fb547e166e6c881dfd04383050375a11f84a9b
Test: Built successfully
Bug: 189954300
2022-01-05 21:49:39 +00:00