Commit Graph

11673 Commits

Author SHA1 Message Date
Pedro Loureiro
2b2ddee296 Merge "Allow framework-res APK splits from Apexes" 2022-01-25 15:28:01 +00:00
Charles Chen
19e1e118e1 Merge "Override (un)registerComponentCallbacks for ContextWrapper" 2022-01-25 14:18:58 +00:00
Himanshu Dagar
8ceb94806d Merge "Review Changes for Media CP Redirection CL" 2022-01-25 12:17:48 +00:00
Pedro Loureiro
c6d1dec22c Allow framework-res APK splits from Apexes
Test: m FrameworkResApkSplitsHostTest

Bug: 195732042

Change-Id: I516e6267c661e112c234aed27e2eef2ce9ffaf9a
2022-01-25 10:05:57 +00:00
Charles Chen
a4059c2f19 Override (un)registerComponentCallbacks for ContextWrapper
Bug: 193247900
Test: WindowContextTest
Test: ContextWrapperTest

Change-Id: Ia070b12eea5631d70a96d6e41d03ab08f6b44caa
2022-01-25 12:30:47 +08:00
Himanshu Dagar
9c8f641254 Review Changes for Media CP Redirection CL
This CL is in continuation to ag/16214441 CL and takes care of few review comments which were pending from the media content provider redirection CL.

Bug: 202035750
Test: atest CtsAppCloningHostTest
Change-Id: I408f985d257b03faef9b934acb43dd5c4cbdb508
2022-01-24 21:29:49 +00:00
Winson Chiu
489e97dff0 Clean up AndroidPackageApi
Prepares for mainline @SystemApi by getting interfaces to a state where
metalava runs correctly. Doesn't actually expose anything for now.

Bug: 173455397
Bug: 173807334

Test: build

Change-Id: Ie33e883c755d4dd1a0b6c59df4ccde4b11a2a981
2022-01-24 12:40:56 -08:00
Kholoud Mohamed
35216e0275 Merge "Allow updating enterprise strings in the framework" 2022-01-24 15:09:02 +00:00
Kathy Chen
50460ddd32 Merge "AmbientContext (aka Ambient PCC) Framework API, with a client API for apps to subscribe for AmbientContextEvents, and a provider API for AiAi to implement and provide the detected events." 2022-01-23 01:54:29 +00:00
Kathy Xiaoming Chen
5d568eda62 AmbientContext (aka Ambient PCC) Framework API, with a client API for apps to subscribe for AmbientContextEvents, and a provider API for AiAi to implement and provide the detected events.
Client apps need the ACCESS_AMBIENT_CONTEXT_EVENT permission to use the service. The permission protection level is internal|role.

API overview: http://go/ambient-framework-api
PRD: http://go/ambient-attribution-prd
Design doc: http://go/ambient-service-api

Test: CTS test
Bug: 192476579
Change-Id: I9daede83af34f215c278cb0530238faba1be5c70
Ignore-AOSP-First: to prevent new feature leak.
2022-01-22 22:07:22 +00:00
Minche Li
03a3c96b49 Merge "Adds PackageManager#FEATURE_WINDOW_MAGNIFICATION" 2022-01-22 02:59:57 +00:00
Roman Kalukiewicz
c143c946af Merge "Add ability to send double extras from adb." 2022-01-21 23:08:33 +00:00
Shubang Lu
bcf19024d3 Merge "TIAF: rename IApp -> InteractiveApp." 2022-01-21 18:04:09 +00:00
kholoud mohamed
9b24fdfb32 Allow updating enterprise strings in the framework
Bug: 188410712
Bug: 211422509
Test: manual
Change-Id: Ia27b22b6cad14c8b62f3415a4967e479c21eb30c
2022-01-21 17:10:33 +00:00
Thomas Vannet
d5aa1c4270 Merge "Rename selfRevokePermissions to revokeOwnPermissionsOnKill" 2022-01-21 15:03:35 +00:00
Himanshu Dagar
29e2888eea Merge "Media CP queries redirection from clone profile to its parent" 2022-01-21 09:06:26 +00:00
Thomas Vannet
395f8deeff Rename selfRevokePermissions to revokeOwnPermissionsOnKill
Test: atest android.permission.cts.RevokeOwnPermissionTest
Bug: 215555831
Bug: 210575642
Bug: 210387494
Change-Id: I94e29f66d13ac76669fab2ccc08879c30c26b7ea
2022-01-21 05:50:22 +00:00
Pinyao Ting
418e742560 Merge "Adds capability related setters in ShortcutInfo.Builder" 2022-01-20 19:34:14 +00:00
shubang
a0ac8f6713 TIAF: rename IApp -> InteractiveApp.
based on advice from API Council
And unhide TvInteractiveAppView and TvInteractiveAppInfo

Bug: 213836031
Bug: 205738783
Test: atest android.media.tv.interactive.cts.TvInteractiveAppViewTest

Change-Id: I6b97f89dd29efed1b4248faae366fbf1a56b0614
2022-01-20 18:34:58 +00:00
Himanshu Dagar
a0f1107f19 Media CP queries redirection from clone profile to its parent
As of now when a clone profile user [android.os.usertype.profile.CLONE] queries any content provider (e.g. media, ...etc), it gets served by the corresponding content provider running in that user space. So, in case of the media content provider, sharing of media items of the owner user space is not possible in the clone profile user space. To facilitate the same, media content provider queries are getting redirected to the owner user space's content provider as a part of this CL.

Bug: 202035750
Test: atest CtsAppCloningHostTest
Change-Id: I09500f86dbd149739422695b6dbd9f1a9717b4e6
2022-01-20 10:39:14 +00:00
mincheli
634b425e63 Adds PackageManager#FEATURE_WINDOW_MAGNIFICATION
Check if the platform has the system feature
1. skip CTS if it doesn't support
2. hide settings if it doesn't support

Bug: 213414385
Test: manual test
Change-Id: I23928f6ac8eaecc4ed5ed3c123afe32e64208c3a
2022-01-19 21:54:02 +00:00
Bernardo Rufino
1a5cb387d6 Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""
This reverts commit 331be9a643.

Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).

Original commit message:

Migrate unsafe parcel APIs in framework-minus-apex

Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
2022-01-19 11:13:18 +00:00
Pinyao Ting
8c9f13f1e1 Adds capability related setters in ShortcutInfo.Builder
Bug: 202872648
Test: atest ShortcutManagerTest2
Change-Id: Idbb79779564b9fce704be19a13695b6e08cb1088
2022-01-19 05:06:10 +00:00
Winson Chiu
156cb611e6 Merge "Move package parsing to services.jar" 2022-01-18 23:58:53 +00:00
Lucas Silva
92cae130d0 Merge "Clean up CommunalManagerService" 2022-01-18 21:15:15 +00:00
Winson
efbb319630 Move package parsing to services.jar
This facilitates exposing the Parsed_ classes as
@SystemApi(client = SYSTEM_SERVER) while keeping everything inside
services.jar rather than having it split across both jars.

This reverts getPackageArchiveInfo to use legacy PackageParser, since
framework.jar can no longer access the moved classes.

Bug: 214038417

Test: presubmit, no logic changes

Change-Id: I152d70fb4f643d32efb012cfb20b0fbc5f88f2d8
2022-01-18 12:47:45 -08:00
Adam Bookatz
b738e3353f Merge "Allow bindServiceAsUser without _FULL if same app" 2022-01-18 19:04:56 +00:00
Lucas Silva
b292ef1910 Clean up CommunalManagerService
This system service is no longer needed, as there is no longer a shared
lockscreen.

Test: locally on device
Bug: 206054365
Ignore-AOSP-First: cleanup
Change-Id: Ib2db06c377cf632da77dc41c629debfe658bfc48
2022-01-18 17:04:02 +00:00
Pedro Loureiro
b4e39e5e91 Merge "Revert "Introduce initOrder for apex-system-services."" 2022-01-18 15:08:27 +00:00
Pedro Loureiro
1352272eb6 Revert "Introduce initOrder for apex-system-services."
This reverts commit 8308d9e981.

Reason for revert: breaking presubmit b/214602009

Change-Id: I55b9635419a621caa0b7603dd45aa915c3457882
2022-01-18 13:52:17 +00:00
Josh Hou
9e02fbf652 Merge "APP languages detection" 2022-01-17 10:58:05 +00:00
Roman Kalukiewicz
fc284c9001 Add ability to send double extras from adb.
Bug: 214637849
Change-Id: I5c52068b436b5bae6a06f5b6bcd5ccf098b9c2b2
2022-01-15 01:56:04 +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
Adam Bookatz
a482921588 Allow bindServiceAsUser without _FULL if same app
Previously we allowed bindServiceAsUser in the following situations:
* caller has INTERACT_ACROSS_USERS_FULL
* caller has INTERACT_ACROSS_USERS and is in same profile group
* caller has INTERACT_ACROSS_PROFILES and is in same profile group and is the same app as the service

We now additionally allow:
* caller has INTERACT_ACROSS_USERS and is the same app as the service
(regardless of whether it is in the same profile group)

Bug: 209989958
Test: tested locally that granting the permission allows access to bindServiceAsUser
Test: atest UserControllerTest
Change-Id: I47d6f86fd159aa993971366ee9d7d334644d391e
2022-01-12 16:18:00 -08:00