Commit Graph

10772 Commits

Author SHA1 Message Date
Winson Chiu
c7ca451e83 Merge "Fix parsing code parcelling errors" into sc-dev am: 343684b523 am: 6ec17cb8af
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15032778

Change-Id: Ice5083ecc589177e3bc832f6cfb07d89032a4568
2021-06-22 21:50:38 +00:00
Nikita Ioffe
843ab33e4f Merge "Add sys config to handle apexes that are allowed to be updated" into sc-dev am: 23403fdc99 am: 6b4a60cc21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14843816

Change-Id: Icf083febe554161bdd272cb22eb8445c6acd2300
2021-06-22 21:41:17 +00:00
Jackal Guo
2dc8ee2f36 Merge "Remove unused interface and implementation" into sc-dev am: cc057784c1 am: a6f563f81b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15026539

Change-Id: If8b039d603f4a406231665c2df5260787b71694a
2021-06-22 21:33:51 +00:00
Winson Chiu
343684b523 Merge "Fix parsing code parcelling errors" into sc-dev 2021-06-22 18:10:43 +00:00
Makoto Onuki
f78856d98b Merge "Update the javadoc around FGS" into sc-dev am: d97f509923 am: f746092513
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14941110

Change-Id: I532f4cac8afef4514e6e3e93e6217fbb0d29dd1f
2021-06-22 15:09:57 +00:00
Nikita Ioffe
637be99afd Add sys config to handle apexes that are allowed to be updated
Unlike staged installer check, we can't check if given APEX package is
allowed to be updated at session creation time, since we don't have
knowledge of the package being installed yet. Instead, the check is
implemented in PackageInstallerSession#handleInstall.

Like staged install check, allowed apex update check has similar
exemptions (adb is allowed to update any APEX,
`adb shell pm --bypass-allowed-apex-update-check` makes next install
session bypass the check).

In order to implement these exemptions, a new
INSTALL_DISABLE_ALLOWED_APEX_UPDATE_CHECK flag that can only be set by
system is added. PackageInstallerSession will skip the APEX update
checks if INSTALL_DISABLE_ALLOWED_APEX_UPDATE_CHECK is set.

Bug: 189274479
Test: atest CtsStagedInstallHostTestCases
Test: atest GtsStagedInstallHostTestCases
Test: atest FrameworksServicesTests:SystemConfigTest
Change-Id: I22921a3ac4d43011b565733d7a7183e5cdb4fe80
Merged-In: I22921a3ac4d43011b565733d7a7183e5cdb4fe80
(cherry picked from commit aafaaec0d5)
2021-06-22 13:39:41 +01:00
Jackal Guo
cc057784c1 Merge "Remove unused interface and implementation" into sc-dev 2021-06-22 04:58:58 +00:00
TreeHugger Robot
890daeb051 Merge "Do not canonicalize overlay config test paths" into sc-dev 2021-06-21 23:07:21 +00:00
Makoto Onuki
d97f509923 Merge "Update the javadoc around FGS" into sc-dev 2021-06-21 18:04:37 +00:00
TreeHugger Robot
4f4afcd965 Merge "Removing remaining references of ActivityView in fw/base" into sc-dev am: dc86e26f54 am: cedbffebcf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829810

Change-Id: Ie8633536fe19026a272b010b19b9e8c2285e22e5
2021-06-21 12:05:32 +00:00
Jackal Guo
9440df9105 Remove unused interface and implementation
Get rid of the unused method to mitigate the potential information
leakage.

Bug: 185124942
Test: atest view-compiler-tests
Test: atest android.view.cts.LayoutInflaterTest
Test: atest -p core/java/android/content/pm
Test: atest -p services/core/java/com/android/server/pm
Test: manually using the PoC in the buganizer to ensure the symptom
      no longer exists.
Change-Id: I5ee7381728a93535849fcf61a1373a5ed9036aa4
2021-06-21 13:08:56 +08:00
TreeHugger Robot
dc86e26f54 Merge "Removing remaining references of ActivityView in fw/base" into sc-dev 2021-06-19 01:23:12 +00:00
Winson
f93af7ef7e Fix parsing code parcelling errors
Address problems reading/writing:
- ParsedComponent mProperties
- ParsingPackageImpl mKeySetMapping
- ParsingPackageImpl mQueriesIntent

Bug: 187043377

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

Change-Id: I5b33315f8248d5fcbdef2cc04ecf77cc18dbd7b6
2021-06-18 11:32:51 -07:00
Issei Suzuki
3d569f9932 Merge "Persist Theme name instead of ID for ShortcutInfo" into sc-dev am: 41e7f367ed am: 4d6457de07
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14783472

Change-Id: I22f3df0b3b120cc2e57612a2726d4d48c7b0f3ab
2021-06-16 15:29:18 +00:00
Issei Suzuki
41e7f367ed Merge "Persist Theme name instead of ID for ShortcutInfo" into sc-dev 2021-06-16 14:57:36 +00:00
Rhed Jao
646968a446 Merge "Add support to update the throttle time of silent updates" into sc-dev am: b55a5da715 am: d8ba9c2620
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14909659

Change-Id: I66efaaf322ac0caf3d6ce7f92c2f6e32431b4160
2021-06-16 08:00:38 +00:00
Rhed Jao
23fa1dc411 Merge "Fix wrong targetSdkVersion returned by the ApkLiteParseUtils" into sc-dev am: 0d6cc194dc am: 6d0557b9ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14972859

Change-Id: I60c7ad30715087275e0f37317b55068fce59930b
2021-06-16 07:59:51 +00:00
Rhed Jao
b55a5da715 Merge "Add support to update the throttle time of silent updates" into sc-dev 2021-06-16 07:28:58 +00:00
Antonio Kantek
ec6b2bbd6e Removing remaining references of ActivityView in fw/base
Bug: 179161778
Bug: 191165536
Test: atest CarServiceTest
Change-Id: Ic45091d565e1654c9177183f065e605b0ab0b56d
2021-06-15 11:23:12 -07:00
Makoto Onuki
226923465c Update the javadoc around FGS
Fix: 182901904
Test: build
Test: m offline-sdk-docs && \
  cd /android/sc-dev/out/target/common/docs/offline-sdk/ && \
  python3 -m http.server 8000 && \
  google-chrome http://localhost:8000/
  and check the content

Change-Id: Ic9964c929c8b7d4caf1706d2398d0eb8eaddc70a
2021-06-15 11:17:57 -07:00
Rhed Jao
5294b6b745 Fix wrong targetSdkVersion returned by the ApkLiteParseUtils
Tests failed due to wrong targetSdkVersion returned by the apk lite
parser. The result of targetSdkVersion was overwritten by the
ParsingPackageUtils#computeMinSdkVersion.

Bug: 191063347
Test: atest SilentUpdateTests
Change-Id: If24d2c0eac10922903c5ca86d1b8ec8360d92e12
2021-06-15 07:55:00 +00:00
Ryan Mitchell
7012753bb3 Merge changes I2710cfea,I03fb31ee,Iec512b31 into sc-dev am: 015bca79f4 am: 210529bd7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14905166

Change-Id: I9eaa563387c58cf6e6b8ebda1f7ce159f1c2a37b
2021-06-09 17:20:22 +00:00
Ryan Mitchell
015bca79f4 Merge changes I2710cfea,I03fb31ee,Iec512b31 into sc-dev
* changes:
  ResourcesImpl.ThemeImpl NativeAllocationRegistry
  Rebase ThemeImpl rather than reallocate memory
  Sparse native theme representation
2021-06-09 16:35:35 +00:00
Rhed Jao
ab61f0cbdb Add support to update the throttle time of silent updates
To improve the performance of SilentUpdateHostsideTests in the Cts,
this cl adds support to update the throttle time of silent updates
using the pm command. The `pm set-silent-updates-policy
--throttle-time TIME` could be invoked to shorten the testing waiting
time for the repeated silent updates.

Bug: 189506896
Test: atest SilentUpdateHostsideTests
Change-Id: I2f9ab58d16b7f1173f1ee45b6b842ad1f18136a4
2021-06-09 18:55:25 +08:00
Issei Suzuki
42d42335e2 Persist Theme name instead of ID for ShortcutInfo
Change-Id: Iee1e9c1568973f8354e781fcd3de160b8d494921
Bug: 185200798
Test: atest ShortcutManagerTest2 SplashscreenTests
2021-06-09 11:19:41 +02:00
Ryan Mitchell
b063594188 Do not canonicalize overlay config test paths
Some devices may not have certain partitions available and the
OverlayConfigTests use hardcoded paths to test OverlayConfig
functionality. This change ensures that the temporary directory
created to test OverlayConfig has all of the partitions defined in
PackagePartitions#SYSTEM_PARTITIONS within it.

Bug: 190469357
Bug: 187020117
Bug: 187020675
Test: atest OverlayConfigTest
Change-Id: I511e24b7ccfe82e6e89ceea7107457439793ef77
Merged-In: I511e24b7ccfe82e6e89ceea7107457439793ef77
2021-06-08 15:33:03 -07:00
Jing Ji
30ac499844 Merge "Log content provider authority name in traces" into sc-dev am: 57532ac939
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14894402

Change-Id: I7361a3c339d47482941bfbbb8f8b3f4c23266172
2021-06-08 22:29:09 +00:00
Jing Ji
57532ac939 Merge "Log content provider authority name in traces" into sc-dev 2021-06-08 22:24:04 +00:00
Ryan Mitchell
7b8091ad7c ResourcesImpl.ThemeImpl NativeAllocationRegistry
Native allocations that hold theme data can be several KBs. Registering
the native allocation using NativeAllocationRegistry helps induce the GC
to free the malloced memory sooner and alleviate memory pressure.

Bug: 187883085
Bug: 141198925
Test: atest ResourcesPerfWorkloads
Change-Id: I2710cfea19565ea8aaf2b5fbd7b2c05d9cb17182
2021-06-08 14:25:20 -07:00
Ryan Mitchell
767e34fb17 Rebase ThemeImpl rather than reallocate memory
Memory churn is high when swapping the ResourcesImpl of a Resources
object. Each time Resources#setImpl is invoked, all themes based on
that Resources object are assigned new ThemeImpl objects that are
created using the new ResourcesImpl.

ThemeImpls can only belong to one Theme object, so the old
implementation is discarded and the theme takes ownership of the new
ThemeImp.

This creates performance problems when framework overlays are toggled.
Toggling overlays targeting the framework causes all themes across all
processes to recreate and reallocate all of their themes. By rebasing
the ThemeImpl on the new ResourcesImpl without deallocating the native
theme memory, we reduce churn and produce less garbage that needs to
be garbage collected.

Bug: 141198925
Test: atest libandroidfw_tests
Test: atest ResourcesPerfWorkloads
Change-Id: I03fb31ee09c9cfdbd3c41bcf0b605607dab54ed7
2021-06-08 14:25:18 -07:00
Jing Ji
b8ecbae648 Log content provider authority name in traces
It'll help to debug content provider related performance issues.

Bug: 190416935
Test: Manual - Record perfetto trace & verify auth name is logged.
Test: CtsContentTestCases:android.content.cts
Test: FrameworksCoreTests:android.content
Change-Id: Ifaa1c58135e6aa2a46ecbba92a9266e7d29d5421
2021-06-08 11:00:55 -07:00
TreeHugger Robot
116bc11f11 Merge "Fix ApkLite parsing namespace" into sc-dev am: e054e5445b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14888125

Change-Id: I0cbb98a869ca03d801fc4fe72c06f05919d59430
2021-06-08 15:59:17 +00:00
TreeHugger Robot
e054e5445b Merge "Fix ApkLite parsing namespace" into sc-dev 2021-06-08 15:48:20 +00:00
Winson
a1e9e63342 Fix ApkLite parsing namespace
An empty string doesn't work, needs to be null.

And configForSplit is not android namespaced.

Bug: 189988327

Test: atest android.appsecurity.cts.IsolatedSplitsTests

Change-Id: I9599c609d69ff1d8bd281975126b81fb35d06247
2021-06-07 18:25:01 -07:00
Winson Chiu
8fd9c40794 Merge "Handle general and specific cross profile logic" into sc-dev am: 119b05e461
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14740492

Change-Id: Id9c3321cbf03f8a7a24daa227e3a4221cbd31883
2021-06-07 23:48:34 +00:00
Winson Chiu
119b05e461 Merge "Handle general and specific cross profile logic" into sc-dev 2021-06-07 23:38:27 +00:00
TreeHugger Robot
8ee5ab57be Merge "Fix ApkLite attribute parsing" into sc-dev am: 4662093318
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14603261

Change-Id: Ide64b4c7a6764b7432d568f3edbbbbec0638b65c
2021-06-07 22:03:23 +00:00
TreeHugger Robot
4662093318 Merge "Fix ApkLite attribute parsing" into sc-dev 2021-06-07 21:42:17 +00:00
Treehugger Robot
f22f8c702d Merge "Do not canonicalize overlay config test paths" am: e2ddd9d277 am: 4c656c86bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1725991

Change-Id: I5806544243cc7e849e2612c217d73a659e40412b
2021-06-04 17:50:31 +00:00
Treehugger Robot
e2ddd9d277 Merge "Do not canonicalize overlay config test paths" 2021-06-04 17:04:49 +00:00
TreeHugger Robot
f926ac837d Merge "Add SharedLibraryInfo#isNative to @TestApi surface." into sc-dev am: cf28c48575
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14807579

Change-Id: I12ff34945d438e5d6bb0ab838b460f65afc5529f
2021-06-04 12:55:20 +00:00
TreeHugger Robot
cf28c48575 Merge "Add SharedLibraryInfo#isNative to @TestApi surface." into sc-dev 2021-06-04 12:37:02 +00:00
Jeff Sharkey
ecff705a7c Merge "More Binder call AttributionSource assignment." into sc-dev am: fde28483d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14825079

Change-Id: Id643f0b156ea68980f9b9e99d623c9ff36e08a60
2021-06-04 05:37:45 +00:00
Jeff Sharkey
fde28483d7 Merge "More Binder call AttributionSource assignment." into sc-dev 2021-06-04 04:07:17 +00:00
Jeff Sharkey
8aac75a7f9 Merge "Clarify 'phoneCall' foreground service type" into sc-dev am: de39a2b610
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14801156

Change-Id: Iebd5581e77d38c698571e268e7337257f26cd959
2021-06-03 20:49:45 +00:00
Jeff Sharkey
de39a2b610 Merge "Clarify 'phoneCall' foreground service type" into sc-dev 2021-06-03 20:30:28 +00:00
Jeff Sharkey
22ca72a675 More Binder call AttributionSource assignment.
Since developers can use a BluetoothDevice object can make remote
calls, it needs to have an accurate AttributionSource.  Previous CLs
had updated many places where these BluetoothDevice instances were
passed across Binder interfaces, but this change updates several
remaining locations which had been missed.

Introduces new "Attributable" marker interface to offer consistent
tooling when applying AttributionSource updates.

Bug: 187097694
Test: atest BluetoothInstrumentationTests
Change-Id: Icad3b9726591f0fbad58a493cefa5a0af7648280
2021-06-03 12:14:17 -06:00
satayev
749427e8b7 Add SharedLibraryInfo#isNative to @TestApi surface.
The method is used in ClasspathDeviceTest to filter out native .so
files, as it only cares about java classes.

Bug: 189347015
Bug: 187823488
Test: m
Change-Id: Id4d41ddef1cddbecd7f7028e28da4040cdfd5c26
2021-06-03 14:09:36 +01:00
Svetoslav Ganov
94893b35e0 Merge "Switch media fw permissions checks to AttributionSource" into sc-dev am: 1028eb2f62
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14664152

Change-Id: I1403b08f25c663715fd0a99a40f484a4e7ecf410
2021-06-02 23:19:16 +00:00
Ryan Mitchell
2c9685573f Do not canonicalize overlay config test paths
Some devices may not have certain partitions available and the
OverlayConfigTests use hardcoded paths to test OverlayConfig
functionality. This change ensures that the temporary directory
created to test OverlayConfig has all of the partitions defined in
PackagePartitions#SYSTEM_PARTITIONS within it.

Bug: 187020117
Bug: 187020675
Test: atest OverlayConfigTest
Change-Id: I511e24b7ccfe82e6e89ceea7107457439793ef77
2021-06-02 21:12:18 +00:00