Commit Graph

11799 Commits

Author SHA1 Message Date
Jeremy Meyer
b21e7cee30 Fix a ConcurrentModificationException when dumping resources
Since the sResourcesHistory set is synchronized, an attemp to modify the
set will block while the forEach() method is running in the rare case
resources are being dumped. With a normal for loop, modifying the set
while in the loop results in a ConcurrentModificationException.

Fixes: 219609463
Test: Manual
Change-Id: I9b7bb965aa390e5dec696be07599f777c807c1e3
2022-03-01 19:23:07 +00:00
Nikita Ioffe
8056335fcd Merge "Rename SupplementalProcess to SdkSandbox" into tm-dev 2022-03-01 17:07:16 +00:00
Nikita Ioffe
df5971335b Rename SupplementalProcess to SdkSandbox
Bug: 218314884
Bug: 220320098
Test: presubmit
Test: atest PackageManagerShellCommandTest
Test: atest SdkSandboxPermissionTest
Change-Id: I9fb98e0caee75bdaaa35d11d174004505f236799
2022-02-28 17:29:55 +00:00
Nate Myren
6510aa238e Implement API feedback for Safety Center QS
Implements API feedback about the safety center constants. Also renames
Safety Hub to Safety Center

Fixes: 215301946
Test: build
Change-Id: Ie07e8fc3ae7371e94d23ac6dfa9a446ef92da074
2022-02-25 16:56:30 +00:00
Jon Eckenrode
033c0d99bd Merge "Added return value to overloaded bindService method." am: 59d082af63 am: 7756ed8db8 am: 2348bd2d17
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1995510

Change-Id: Ice2ac318fa773a406a416316e66e92bbca5b5b1e
2022-02-25 01:25:19 +00:00
Jon Eckenrode
2348bd2d17 Merge "Added return value to overloaded bindService method." am: 59d082af63 am: 7756ed8db8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1995510

Change-Id: I2ce6164ecb95dc3ea49cc0e9c04edc4782659e81
2022-02-25 00:52:40 +00:00
Jon Eckenrode
7756ed8db8 Merge "Added return value to overloaded bindService method." am: 59d082af63
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1995510

Change-Id: I5868cc709613ee77b9cd40866582b58614dcc249
2022-02-25 00:30:46 +00:00
joneckenrode
ecbb809686 Added return value to overloaded bindService method.
Staged: https://android.devsite.corp.google.com/reference/android/content/Context#bindService(android.content.Intent,%20int,%20java.util.concurrent.Executor,%20android.content.ServiceConnection)

Test: Built API documentation
Signed-off-by: joneckenrode <joneckenrode@google.com>
Change-Id: I9b5466441b7b5cb4deb5a8cc25cfd01a83be80ca
2022-02-24 16:21:58 +00:00
Jeremy Meyer
6a6b931306 Change ApplicationInfo create timestamp to uptimeMillis
Bug: 188059515
Test: Manual testing on device
Change-Id: Id03a95684b4bf3ae2938bdd1b7a99f8965b24cc1
2022-02-17 17:44:13 +00:00
Jon Eckenrode
0569c3d46c Merge "Revised API documentation of Context and ServiceConnection. See b/213625234." am: 08bb407612 am: e5a25d1d7c am: 5577fb24aa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1975966

Change-Id: I5b946df3374fc6ab223378d018135f78806cd001
2022-02-15 22:37:58 +00:00
Jon Eckenrode
5577fb24aa Merge "Revised API documentation of Context and ServiceConnection. See b/213625234." am: 08bb407612 am: e5a25d1d7c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1975966

Change-Id: I3725bf4a04aaa5eb00cae32a2effd654893dc8bd
2022-02-15 22:18:57 +00:00
Jon Eckenrode
e5a25d1d7c Merge "Revised API documentation of Context and ServiceConnection. See b/213625234." am: 08bb407612
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1975966

Change-Id: I608e10bbd7208ed90f23ab25ac28c5512a3ea4ca
2022-02-15 22:02:50 +00:00
Vadim Caen
a70bdd8739 Merge "Add enableOnBackInvokedCallaback manifest attribute" 2022-02-15 19:07:27 +00:00
Winson Chiu
2fd963f3a4 Merge "Build splitPermissions manually for PackageParser" 2022-02-15 18:27:25 +00:00
Richard Gaywood
aaf134e040 Puller for PendingIntentController
Populate a new stats atom with information about PendingIntents; per-uid: (1) the total number of intents and (2) the total size of any extras bundled with the intents.

Change-Id: I04e6b368a76623c80ead6f846baf85b1a6c5ce70
Test: statsd_testdrive 10151
Bug: 217162457
2022-02-15 08:41:36 +00:00
TreeHugger Robot
1ad48aa8b6 Merge "Recycle obtained TypedArrays" 2022-02-15 04:49:13 +00:00
Winson
d0fb8ac83a Build splitPermissions manually for PackageParser
Through the PackageManager#getPackageArchiveInfo API, legacy
PackageParser can be invoked before the app process's Application
is available, so instead manually build the split permissions from
the PermissionManager service directly.

Bug: 219211480

Test: manual, re-install GMS per steps from bug

Change-Id: I7f9316a53752fa372002c387653a97e03ca222ac
2022-02-14 15:58:39 -08:00
Vadim Caen
625f5e286f Add enableOnBackInvokedCallaback manifest attribute
Add a manifest flag for applications to opt-out of the new back
navigation system.

Test: atest
CtsWindowManagerDeviceTestCases: android.server.wm.BackNavigationLegacyTest
Bug: 217709328
Change-Id: I43d09a37b126e59bdb8f20bb83cf6d99e53a1e91
2022-02-14 22:27:10 +01:00
Aaron Labiaga
5cec0fdb6a Merge "Update broken javadoc code ref. Use class fully-qualified class name" 2022-02-12 08:31:18 +00:00
Galia Peycheva
178b755646 Merge "Add API for expanded picture-in-picture" 2022-02-12 08:25:58 +00:00
Aaron Labiaga
5458f07e94 Update broken javadoc code ref. Use class fully-qualified class name
Change-Id: I15a7a7a05acb77321195f1722ff586e81cbfa3cb
2022-02-12 05:13:57 +00:00
Antony Sargent
0b677034e7 Merge "KeyguardManager#isDeviceSecure()" 2022-02-11 23:47:34 +00:00
Galia Peycheva
eb54e50617 Add API for expanded picture-in-picture
Bug: 208797488
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatio
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxWidth
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxHeight

Change-Id: I7d91ce1db197cf7dac1af8bdf4ee2579b8a70869
2022-02-11 21:39:11 +01:00
TreeHugger Robot
8eb30b3b30 Merge changes from topic "cross_uid_embedding_verification"
* changes:
  Verify cross-uid activity embedding
  Add Cross-UID ActivityEmbedding trust model APIs
2022-02-11 07:42:58 +00:00
Xin Li
5ad6db7742 Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I8cfa435bb6233818adb9cc99dadeeb06a03443d5
Change-Id: Ib93992d88fd1704179009a3872798b9e7b83a6d1
2022-02-11 07:25:43 +00:00
Xu Cao
f04d752fec KeyguardManager#isDeviceSecure()
KeyguardManager#isDeviceSecure() shall return false when called on a virtual display

Bug: 210153811
Test: atest CtsVirtualDevicesTestCases:DefaultDisplayIsDeviceSecureTest CtsVirtualDevicesTestCases:StreamedAppBehaviorTest#isDeviceSecure_shouldReturnFalseOnVirtualDisplay

Change-Id: I5149b08fde8d3a09e484ea965035bd5e7d2bff7b
2022-02-10 18:15:34 -08:00
Winson Chung
ab4e152e05 Merge "Allow dragging to launch multiple instances of the same activity" 2022-02-10 18:59:35 +00:00
Alan Viverette
7d1188244c Merge "Migrate frameworks/base javadocs references to androidx" 2022-02-10 18:02:28 +00:00
Ömer Yaveroğlu
5d08fb7a9c Merge "Add a new install-time integrity formula type to check the lineages of the app certificate." 2022-02-10 17:13:34 +00:00
Nate Myren
65c07eea84 Merge "Add information to grant permissions intent for continue messages" 2022-02-10 16:26:18 +00:00
Ömer Yaveroğlu
70a8f68db5 Add a new install-time integrity formula type to
check the lineages of the app certificate.

Bug: 218486995
Test: atest frameworks/base/core/tests/coretests/src/android/content/integrity
Test: atest services/tests/servicestests/src/com/android/server/integrity
CTS-Coverage-Bug: 218679238
Change-Id: I3bee5b95be7217967764b7bd304a2fe3a6ee52e9
2022-02-10 16:18:33 +00:00
Nikolas Havrikov
32947847dd Recycle obtained TypedArrays
Bug: 218835043
Test: make
Change-Id: Ib5a8659e42b9550af607a1e685f7e6ed3425145a
2022-02-10 15:03:38 +01:00
Andrii Kulian
d21447ccd2 Add Cross-UID ActivityEmbedding trust model APIs
By default activity embedding should be restricted, and apps have to
opt in explicitly to allow other hosts to embed them. An app can
declare a list of known trusted embedding host certificates in
AndroidManifest for individual activities or entire application.
Alternatively, an app can allow embedding by all hosts in untrusted
mode. In this case interactions and operations that the client host
can perform on the embedded container will be limited to prevent
tapjacking and overlay attacks.

Bug: 197364677
Test: ActivityEmbeddingCrossUidTests
Change-Id: I78c303237fdc77bdf55bd74580ac0b19c8de622b
2022-02-09 23:56:36 -08:00
Charles Chen
ba29cdb63e Enable to add ComponentCallbacks to Activity
This CL is mainly from the requirements to receive WindowMetrics
updates in Jetpack Library. It also benefits the developers if
they want to listen to Activity's configuration changes outside
Activity

Test: atest RegisterComponentCallbacksTest
Bug: 199442549
Change-Id: Iff5c0a4d9c61d30b84ff9aee465f1b6b06f1a48d
2022-02-10 14:55:33 +08:00
Alan Viverette
406e0f6553 Migrate frameworks/base javadocs references to androidx
Does not remove Support Library artifacts from docs classpath (ApiDocs.bp)
because they are still used in development/samples, which is not as easy
to migrate as javadoc.

Bug: 158779503
Test: make docs
Exempt-From-Owner-Approval: Mass find/replace for androidx migration
Change-Id: Icf7f53ec36a0e970413352e2ebf40ce9d60ed17e
2022-02-09 22:25:14 +00:00
Jon Eckenrode
8f3f42fba0 Revised API documentation of Context and ServiceConnection.
See b/213625234.

Test: Built API documentation
Signed-off-by: joneckenrode <joneckenrode@google.com>
Change-Id: Icb2eb3eb13c291dca9fc6857db3a8657a23856f7
2022-02-09 22:11:28 +00:00
TreeHugger Robot
a903f53919 Merge changes from topic "presubmit-am-0d13c95295c446889fc51032ba336d89" into sc-qpr1-dev am: 459761c7a3 am: e83f686acc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16778744

Change-Id: I4785ca39baefb31700c721f75195feb58c3987e2
2022-02-09 18:16:08 +00:00
TreeHugger Robot
e83f686acc Merge changes from topic "presubmit-am-0d13c95295c446889fc51032ba336d89" into sc-qpr1-dev am: 459761c7a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16778744

Change-Id: I22db74620ad1ba4baf8d4421e59f4b06230f1c8f
2022-02-09 18:10:53 +00:00
Nate Myren
86d226366a Add information to grant permissions intent for continue messages
After first launch, remember T+ apps which had the review required flag
cleared on launch, until a grant permission request comes in.

Also modifies some behavior of the upgrade code grants.

Bug: 194833441
Test: atest NotificationPermissionTest
Change-Id: Iafef8348e6cdb05fb214382b945cc7886beaff4b
2022-02-09 10:01:26 -08:00
Winson Chung
f4ed441e18 Allow dragging to launch multiple instances of the same activity
- When dragging to launch a new app, apply MULTIPLE_TASK to the launch
  intent to allow apps that support it to show side-by-side
- This requires the pending intent resolved from LauncherAppsService to
  be mutable (should be ok since we only use this api from SysUI)
- Also remove some unused members and duplication of getting the running
  task when dragging

Bug: 207686016
Test: atest WMShellUnitTests

Change-Id: Ib233ad754a6c6e3c4e0d0e10ed788ab8e055cccc
2022-02-09 07:21:44 +00:00
Presubmit Automerger Backend
167749b462 [automerge] Security fixes for PendingIntent related apis in LauncherApps 2p: e41e04bb8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16778744

Bug: 209607104
Change-Id: Ie671aa785fd13e9389b2fec0a02318e7b5e05861
Merged-In: Id262b9a0de58d8834c85d925cf84bb44b8b99742
2022-02-09 03:12:23 +00:00
Pinyao Ting
e41e04bb8c Security fixes for PendingIntent related apis in LauncherApps
Allowing arbitrary activityOptions during the creation of PendingIntent
is a source of security vulnerability. This CL removes activityOptions
from the call-site.

Bug: 209607104
Test: manual
Change-Id: Id262b9a0de58d8834c85d925cf84bb44b8b99742
Merged-In: Id262b9a0de58d8834c85d925cf84bb44b8b99742
2022-02-09 03:12:10 +00:00
Pinyao Ting
04f5f72355 Merge "Security fixes for PendingIntent related apis in LauncherApps" 2022-02-09 03:10:56 +00:00
Eva Chen
f43fc83ff8 Merge "Add TYPE_HEADING sensor type to PackageManager features." 2022-02-08 22:04:36 +00:00
Aman Gupta
fb361c92ab Merge "Adding feature flag for MEP APIs" 2022-02-08 21:50:37 +00:00
Kholoud Mohamed
e5734f2358 Merge "Add new intent action to show all work apps" 2022-02-08 17:12:18 +00:00
Ricky Wai
9edd4f669e Merge "Add a new API to let app installer to flag package source." 2022-02-08 14:40:29 +00:00
Eva Chen
7e84bdea74 Add TYPE_HEADING sensor type to PackageManager features.
Bug: 189983308
Test: Compiled
Change-Id: I87234af6d3dd92b5fdc16b295225cae62ba03e8e
2022-02-07 14:30:10 -08:00
Eva Chen
eb338ad900 Merge "Add limited axes sensor types to PackageManager features." 2022-02-07 22:08:53 +00:00
Aman Gupta
a976dab414 Adding feature flag for MEP APIs
Test: Build
Bug: 200812798
Change-Id: I1f0d6811ef2e5597969b23dade2170731654d5e7
2022-02-07 22:01:50 +00:00