Commit Graph

10972 Commits

Author SHA1 Message Date
Erik Wolsheimer
11d471fe33 Merge "Add application-level 'attributionsAreUserVisible' attribute" into sc-dev am: dba8fda0b3 am: e726e33c83 am: 6c705310a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14591918

Change-Id: I56ed0f338b4ed074be961ac768f785ee3c51c241
2021-05-21 01:08:25 +00:00
Erik Wolsheimer
6c705310a9 Merge "Add application-level 'attributionsAreUserVisible' attribute" into sc-dev am: dba8fda0b3 am: e726e33c83
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14591918

Change-Id: If70b2cd801500659dae2d01e57e474b1fd5cf8cc
2021-05-21 00:50:07 +00:00
Calin Juravle
496339ff01 Merge "Update the use of registerAppInfo" am: 95590e1a62 am: d922359e81 am: e409733954 am: 715a6c3c09
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1704169

Change-Id: Iefa37c3a9427b739f2e0718debe61b3799d2a8fd
2021-05-20 22:57:25 +00:00
Calin Juravle
e409733954 Merge "Update the use of registerAppInfo" am: 95590e1a62 am: d922359e81
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1704169

Change-Id: Iaf5781b354a3d3e93309f920341f7b7576fa1f44
2021-05-20 22:18:37 +00:00
Calin Juravle
95590e1a62 Merge "Update the use of registerAppInfo" 2021-05-20 21:46:00 +00:00
Erik Wolsheimer
afbc4fee9d Add application-level 'attributionsAreUserVisible' attribute
Bug: 176902658
Test: Manual
Change-Id: I56dc9caa6d98b75bc6732bbca0e5adc67bb745e5
2021-05-20 21:07:14 +00:00
Winson Chiu
17eb3ba04e Merge "Reset target sdk version of ParseTypeImpl" into sc-dev 2021-05-20 17:53:20 +00:00
liulvping
177a7200ab Reset target sdk version of ParseTypeImpl
In device booting, PackageParser2 uses a thread
local ParseTypeImpl obj as shared result and reset
it before parsing everty time. But it doesn't reset
the target sdk version, which could make deferError
returned unexpected error, cause apk scaned failed
and deleted by the system.

Bug: 188523844

Test: atest com.android.server.pm.parsing

Signed-off-by: liulvping <liulvping@xiaomi.com>

Merged-In: Ie6fbc4b79e94943c9282206b1ef6d20b4129fa0b
Change-Id: Ie6fbc4b79e94943c9282206b1ef6d20b4129fa0b
2021-05-20 15:58:39 +00:00
Corina Grigoras
dd4426d832 Merge "Clarify javadocs about mode to parse file." into sc-dev am: b84e828974 am: 9edbfddf0d am: 9e319ab210
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14621143

Change-Id: I1979aefaffb82e5aba3a7c4ca11fd87ca039baf4
2021-05-20 14:25:15 +00:00
Corina Grigoras
9edbfddf0d Merge "Clarify javadocs about mode to parse file." into sc-dev am: b84e828974
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14621143

Change-Id: I2621e13c20b79ec86cdc201afdeb2905e690e9a3
2021-05-20 14:20:48 +00:00
Corina Grigoras
b84e828974 Merge "Clarify javadocs about mode to parse file." into sc-dev 2021-05-20 14:10:22 +00:00
TreeHugger Robot
e7e7374c5c Merge "Deprecate Context#createApplicationContext" into sc-dev am: ee438f960a am: d95a9ebbfb am: 891659ba75
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14528644

Change-Id: I396eb97e5b36556757caf269b0e565459c62828b
2021-05-20 04:17:25 +00:00
Rhed Jao
deeee5745d Merge "Throttle the repeated silent installation requests" 2021-05-20 01:58:02 +00:00
James O'Leary
60524abb35 Merge "Connect ColorStateList to CAM" into sc-dev am: 671019f95c am: 6c72295195
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14269707

Change-Id: I2074baf5aa1cac7dafb3cfb0260e187a4adb361e
2021-05-20 00:23:41 +00:00
Treehugger Robot
2950ef0806 Merge "Reset target sdk version of ParseTypeImpl" am: 9635abafa0 am: 2124039b90 am: edd6684f88
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1710293

Change-Id: If6a5977fb2d7e2027444c218054a8927104deffa
2021-05-20 00:22:32 +00:00
Alexander Dorokhine
9d9c50216f Merge "Update framework from jetpack" into sc-dev am: 72ac81f5df am: 262babe7b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14533205

Change-Id: If1a0556507e02c49ad90ce83a508346240969e4e
2021-05-19 23:47:03 +00:00
TreeHugger Robot
c41972fae2 Merge "Revert "Temporary stop-gap for Chrome target SDK issue."" into sc-dev am: 8a6ffdc597 am: 05f0612630
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14604267

Change-Id: I81ce634f851456cfbf19db21e0f083907c217eec
2021-05-19 23:26:30 +00:00
Jeff Sharkey
40a2050e5c Merge "Guard against null BluetoothDevice extras." into sc-dev am: 53deb833da am: a19c83bd2c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14556719

Change-Id: I8776d128f2417a62e1221726a3924ceae4cec233
2021-05-19 22:47:55 +00:00
Jeff Sharkey
3e006db10d Merge changes from topic "may15" into sc-dev am: 63a1453832 am: b1b4de9ed7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14515460

Change-Id: I2d1036ca3b7876e5f07c267ae8b884368d60c599
2021-05-19 22:47:24 +00:00
Jeff Sharkey
e97c037d19 Apply AttributionSource during Intent delivery. am: dd6dd3b1fb am: 2d0e8e3d5d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14470318

Change-Id: Iac0646b8065a4e70ec0366db19943db33ba2e40b
2021-05-19 22:47:13 +00:00
TreeHugger Robot
891659ba75 Merge "Deprecate Context#createApplicationContext" into sc-dev am: ee438f960a am: d95a9ebbfb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14528644

Change-Id: Ic04a2c0b987e2646bff7872512b6645d0712160f
2021-05-19 15:59:13 +00:00
TreeHugger Robot
08e7de9d46 Merge "Deprecate Context#createApplicationContext" into sc-dev am: ee438f960a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14528644

Change-Id: Idb9578a41fe9b53f2dcce14b80ebe5a61471e52a
2021-05-19 15:40:21 +00:00
TreeHugger Robot
ee438f960a Merge "Deprecate Context#createApplicationContext" into sc-dev 2021-05-19 15:35:09 +00:00
James O'Leary
6c72295195 Merge "Connect ColorStateList to CAM" into sc-dev am: 671019f95c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14269707

Change-Id: Iac6f93aef88b8f21a4525c889119a04768bbfd2f
2021-05-19 00:05:53 +00:00
James O'Leary
671019f95c Merge "Connect ColorStateList to CAM" into sc-dev 2021-05-18 23:44:22 +00:00
Treehugger Robot
edd6684f88 Merge "Reset target sdk version of ParseTypeImpl" am: 9635abafa0 am: 2124039b90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1710293

Change-Id: Ib131a9d079831781ef25d2c049d1377a76f3401d
2021-05-18 23:16:32 +00:00
Corina
8cd8c9901d Clarify javadocs about mode to parse file.
Bug: 185900460
Test: atest
Change-Id: I72b743affd9c1c47650c4249e855676203033f5e
2021-05-18 17:17:27 +00:00
Ryan Mitchell
c54ebba25b Deprecate Context#createApplicationContext
If an application caches an ApplicationInfo and uses it to call
Context#createApplicationContext, the app will not get the most recent
version of the overlays for that application. To make things worse, the
LoadedApk stored in ActivityThread#mResourcePackages is updated using
the old ApplicationInfo causing further uses of the cached LoadedApk to
return outdated information.

Deprecate Context#createApplicationContext, convert all internal uses
to Context#createPackageContext(String packageName, ...) and log
whenever any one calls Context#createApplicationContext with an
outdated ApplicationInfo to detect debug issues in using old infos.

Bug: 188059515
Test: change wallpaper and observe widgets get reloaded with most
      recent overlays
Change-Id: I2aeefa8c0e66264859109975a54c4f73f76ad710
2021-05-18 09:07:58 -07:00
Rhed Jao
4139512a13 Throttle the repeated silent installation requests
To avoid a non-system installer repeatedly silent updates and
'denial-of-service' against another app on the device. This CL
tracks for all the silent updated installs where the
`requireUserAction' is not required. And fall back to user
action required if a repeated silent update is requested within
the throttle time.

Bug: 185878964
Test: atest SilentUpdateHostsideTests
Test: atest StagingManagerTest
Test: atest PackageInstallerSessionTest
Change-Id: I4ea287bf66d8661eec2676b604f9109f6f9add28
2021-05-18 18:14:25 +08:00
liulvping
2cd9d26116 Reset target sdk version of ParseTypeImpl
In device booting, PackageParser2 uses a thread
local ParseTypeImpl obj as shared result and reset
it before parsing everty time. But it doesn't reset
the target sdk version, which could make deferError
returned unexpected error, cause apk scaned failed
and deleted by the system.

Test: atest com.android.server.pm.parsing

Change-Id: Ie6fbc4b79e94943c9282206b1ef6d20b4129fa0b
Signed-off-by: liulvping <liulvping@xiaomi.com>
2021-05-18 17:10:54 +08:00
Alexander Dorokhine
72ac81f5df Merge "Update framework from jetpack" into sc-dev 2021-05-18 01:17:30 +00:00
TreeHugger Robot
8a6ffdc597 Merge "Revert "Temporary stop-gap for Chrome target SDK issue."" into sc-dev 2021-05-17 23:32:25 +00:00
Alexander Dorokhine
a6d8d8e66c Update framework from jetpack
Included changes:
* b692f37: Rename `Int64` in annotation processor to `Long`.
* 05fe08c: Get QueryLength from Native
* 8f46606: Logging stats for remove (1)
* 237c134: Alter inheritance of LongProperty for backwards compatibility.

Bug: 187820569
Bug: 173532925
Bug: 173532925
Bug: 187820569
Test: Presubmit
Change-Id: Ia27e00250e7aa7c7a1acc974f24c63cc456739be
2021-05-17 15:13:40 -07:00
Winson Chiu
32b756cfae Revert "Temporary stop-gap for Chrome target SDK issue."
This reverts commit c6be9fe470.

Reason for revert: No longer needed, Chrome targets 30

Bug: 183905675

Change-Id: I7db4fda4f233414330c4daa38a96d088bd56ee09
2021-05-17 19:08:40 +00:00
Jeff Sharkey
804cb8801d Guard against null BluetoothDevice extras.
Bug: 188364781
Change-Id: If976318763fac7e5cb4b59300f104c9cd9392eaf
2021-05-16 20:45:20 -06:00
Jeff Sharkey
5014fbd644 Apply "attributionTags" to all component types.
Components within an application are often a good boundary for
developers to declare "attribution" information, such as an Activity
or Service used to offer a specific sub-feature.

This change expands the "android:attributionTags" manifest attribute
to apply to all component types, and it then automatically configures
the associated Context with Context.createAttributionContext() with
no additional developer action required.  Developers can still
manually use Context.createAttributionContext() to adjust the
attribution tag again if desired.

Bug: 187097694
Test: atest CtsAppOpsTestCases:AttributionTest
Test: atest CtsAppTestCases:android.app.cts.AttributionTagsTest
Change-Id: Ia16c66e7b63bcbfb8c0d7348e9b5d4adb2a1f45d
2021-05-15 12:11:03 -06:00
Jeff Sharkey
dd6dd3b1fb Apply AttributionSource during Intent delivery.
There are some Parcelables which offer to perform Binder calls, and
when these are delivered via Intent extras they fallback to
ActivityThread.currentAttributionSource(), instead of being tagged
based on the relevant app component.

This change begins using Intent.prepareToEnterProcess() as a hook to
fix-up AttributionSource when those extras finally land in the
destination process.  It uses the relevant AttributionSource based
on the Activity or Service the Intent is delivered to, which
developers have control over via AppComponentFactory.

In the case of <receiver> manifest elements, this change applies the
first android:attributionTags value to the Context used for that
BroadcastReceiver.

Bug: 187097694
Test: atest AttributionTest
Change-Id: I8f5197db7e8d7277d34f0ef2bb90bfdf1871186a
2021-05-15 09:48:14 -06:00
Calin Juravle
3e308c6270 Update the use of registerAppInfo
Pass additional parameters to ART to assist with better profiling
and debuggability.

Test: m
Bug: 182793486
Bug: 185979271

Change-Id: Iae0beab92194d75f191147578922c760f04470b9
2021-05-13 07:59:39 -07:00
TreeHugger Robot
15ee499549 Merge "Move boot test to postsubmit" into sc-dev am: ef36e9f960
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14514110

Change-Id: I396824d3145031836b46bae8110d418945c66439
2021-05-13 00:32:05 +00:00
TreeHugger Robot
ef36e9f960 Merge "Move boot test to postsubmit" into sc-dev 2021-05-13 00:13:07 +00:00
TreeHugger Robot
e723ade6b6 Merge "Better error message for missing job services." into sc-dev am: c562b93a11
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14443406

Change-Id: Ia5035d6e0731d2e23d9aca7357e0777c13a2b52e
2021-05-12 17:59:21 +00:00
Alex Buynytskyy
8e1f1debde Better error message for missing job services.
Bug: 141645789
Test: presubmit
Change-Id: I334639d624f08ae2ec5ee235d609c780a09a1338
2021-05-12 16:01:53 +00:00
Jackal Guo
0a55e2c85f Move boot test to postsubmit
Bug: 187383694
Test: atest
Change-Id: I1611e4bb3bfc99f2bdef14357d09f4d0cf5a3a33
2021-05-12 15:39:19 +00:00
TreeHugger Robot
e3fb509755 Merge "Add CtsPackageManagerBootTestCases to TEST_MAPPING" into sc-dev am: 5272316f8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14516702

Change-Id: I24e3508c83d1d70af859cf2576dddfb5358b596e
2021-05-12 15:13:00 +00:00
satayev
ef6a4a0c7f Merge "Expose SharedLibraryInfo#getAllCodePaths as @TestApi." am: 3f955dda5c am: db47bd0c94 am: c792a3d96b am: 7e31457971
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703011

Change-Id: I298f136c083521956d644b93631cc8718cd38445
2021-05-12 15:11:21 +00:00
TreeHugger Robot
5272316f8f Merge "Add CtsPackageManagerBootTestCases to TEST_MAPPING" into sc-dev 2021-05-12 15:07:34 +00:00
satayev
7e31457971 Merge "Expose SharedLibraryInfo#getAllCodePaths as @TestApi." am: 3f955dda5c am: db47bd0c94 am: c792a3d96b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703011

Change-Id: I3aaaeea2b75feb91af679ee56493144b037a5f2f
2021-05-12 14:43:44 +00:00
TreeHugger Robot
ebe4ff0602 Merge "Make ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD public" into sc-dev am: 8eb397fb04
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14505697

Change-Id: I4f75d6940fdbba7c2912e771ad947a9fed7494a0
2021-05-12 10:35:08 +00:00
TreeHugger Robot
8eb397fb04 Merge "Make ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD public" into sc-dev 2021-05-12 10:26:12 +00:00
Jackal Guo
6f9142e0d9 Add CtsPackageManagerBootTestCases to TEST_MAPPING
Fix: 187383694
Test: atest
Change-Id: I88c3b7c5005550d1e043027637f7d0d6b90edab1
2021-05-12 08:55:49 +00:00