Commit Graph

640958 Commits

Author SHA1 Message Date
Lee Shombert
99173ce6b9 Improve snapshot performance
Bug: 185481065

Use caches to improve snapshot performance.  SnapshotCache.Auto is a
concrete SnapshotCache that can be applied to a Snappable.  All the
Watched* classes are Snappable.  The cache improves performance and
reduces memory churn.

Test: atest
 * CtsContentTestCases:IntentFilterTest
 * CtsDynamicMimeHostTestCases
 * CtsRoleTestCases
 * FrameworksServicesTests:UserSystemPackageInstallerTest
 * FrameworksServicesTests:PackageManagerSettingsTests
 * FrameworksServicesTests:PackageManagerServiceTest
 * FrameworksServicesTests:AppsFilterTest
 * FrameworksServicesTests:PackageInstallerSessionTest
 * FrameworksServicesTests:ScanTests
 * UserLifecycleTests#startUser
 * UserLifecycleTests#stopUser
 * UserLifecycleTests#switchUser
 * FrameworksServicesTests:WatcherTest
 * android.appsecurity.cts.EphemeralTest
 * android.appsecurity.cts.InstantAppUserTest

Change-Id: Ia993613f566cb86b145ddf1d5280e8780252a951
2021-05-12 08:25:50 -07:00
Lee Shombert
84737b417b Correct snapshot races
Bug: 185481065

This fixes the race conditions that could theoretically cause
PackageManager snapshots to fail, especially after package
installation.  No failures have actually been observed.

1. Three arrays in Settings are now watched.  Other attributes that
   are included in the snapshot are annotated @Watched(manual = true).
   untrackedStorage() is used for these arrays during XML read/rwrite
   operations.

   Also, KeySetManagerService now takes a WatchedArrayMap from
   Settings, instead of untrackedStorage().  KeySetManagerService
   should not alter the array, but if it does, Settings will learn
   about it.

2. Key attributes in SnapshotCache are volatile.  This should not be
   necessary, since snapshots are only modified under PM mLock, but
   the change is made just in case.

3. PackageManagerService.sSnapshotInvalid is now an atomic.  This
   should eliminate narrow race conditions around the variable.

4. A corking facility is part of PackageManagerService.  Corking is
   not currently used but it could be valuable to suppress snapshot
   creation during very busy periods.  This is the same reason for
   corking that PropertyInvalidatedCache uses.  SnapshotStatistics can
   track corking.

5. SnapshotStatistics has a "brief" mode that can be invoked from the
   command line.  Brief output provides a good overview of snapshot
   behavior.  Full output (which is the default) is good for more
   detailed analysis.

Test: atest
 * CtsRoleTestCases
 * CtsContentTestCases:IntentFilterTest
 * CtsDynamicMimeHostTestCases
 * FrameworksServicesTests:UserSystemPackageInstallerTest
 * FrameworksServicesTests:PackageManagerSettingsTests
 * FrameworksServicesTests:PackageManagerServiceTest
 * FrameworksServicesTests:AppsFilterTest
 * FrameworksServicesTests:PackageInstallerSessionTest
 * FrameworksServicesTests:ScanTests
 * UserLifecycleTests#startUser
 * UserLifecycleTests#stopUser
 * UserLifecycleTests#switchUser
 * FrameworksServicesTests:WatcherTest
 * android.appsecurity.cts.EphemeralTest
 * android.appsecurity.cts.InstantAppUserTest

Change-Id: I111cc4256cbd795fc2aba287f57cfcfd5f9cd7ab
2021-05-12 08:25:47 -07:00
Makoto Onuki
f0a6659080 Clean up setForegroundServiceBehavior()
Test: build
Bug: 186433888
Change-Id: Ie27cc91cf013bdfb90ab9c60a8c56370f226b87d
2021-05-12 08:22:41 -07:00
Nate Myren
9aeedf48fb Merge "Ensure that proxy operations look for attribution tag in proxy's pkg" into sc-dev 2021-05-12 15:21:52 +00:00
Yuri Lin
8ae0654abd Merge "Log heads-up notification peeks using UiEvent logging." into sc-dev 2021-05-12 15:09:20 +00:00
John Reck
f5c2981163 Merge "Add some more scenes, replace linear with uniform" into sc-dev 2021-05-12 15:07:36 +00:00
TreeHugger Robot
5272316f8f Merge "Add CtsPackageManagerBootTestCases to TEST_MAPPING" into sc-dev 2021-05-12 15:07:34 +00:00
Ryan Mitchell
75baeda560 Merge "Use internal lock for ResourcesManager" into sc-dev 2021-05-12 15:02:06 +00:00
TreeHugger Robot
2e14d6d54f Merge "Bug fix for wallet screen and lockscreen icon." into sc-dev 2021-05-12 14:55:41 +00:00
Anna Zappone
bf2fa2a8c3 Merge "Add status scrim for full-bleed and update empty" into sc-dev 2021-05-12 14:51:14 +00:00
Chalard Jean
0704715f7d Merge "Allow any transport with TEST if the network is restricted" am: 7e9223a751 am: a76cc4e98d am: 6cc8dc45c7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702489

Change-Id: Ib8ee3109ba5525ce1b1c6c2bd5ebcdc0b48a5319
2021-05-12 14:44:30 +00:00
Treehugger Robot
43285b0c22 Merge "Add lcnathalie to OWNERS" am: d7158e25d6 am: 3c351fd63c am: d52c25c2bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705352

Change-Id: I1d26ce678eb542dbc0d93812f969625879134e52
2021-05-12 14:44:10 +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
Remi NGUYEN VAN
00b62d46cf [automerger skipped] Merge "Use jniThrowErrnoException from JNIHelp" am: eff6bb9c48 am: 51a05fdd14 am: 73ca3ed15d -s ours
am skip reason: Merged-In I257a9d55ce1f5a7c588e209b4a89d3e7a3e09994 with SHA-1 f657aec71e is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703087

Change-Id: Ib3373d0634ceca77672cace31349edb4594fc46e
2021-05-12 14:43:22 +00:00
Remi NGUYEN VAN
db36a0e85d [automerger skipped] Merge "Move NetworkUtils JNI out of core/jni" am: 44862ff783 am: 0386387d39 am: 1d78211ffb -s ours
am skip reason: Merged-In I0b55dfe92f3cb6e848d79ac7953756f39aaa2597 with SHA-1 cdadd64b8d is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703086

Change-Id: I3724d722bc66d3c54fe1c8cebacc65c3c097e5f8
2021-05-12 14:42:55 +00:00
Remi NGUYEN VAN
de9110790a [automerger skipped] Merge "Build framework-connectivity using module_current" am: ea96653e66 am: 719ae7062d am: 1778eda40a -s ours
am skip reason: Merged-In I2d51d37d067bf6fe86e4dedf05855a2dd67ed57c with SHA-1 a605ea9c96 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703085

Change-Id: I4cf3780210515b5849832055c88dd189d7d61177
2021-05-12 14:42:03 +00:00
Leon Scroggins III
4dda15cd27 PIP: Always enable rounded corners
Bug: 187922869

Previously, we turned on rounded corners with a sysprop in
bf309e63d4. Now that a bug in rendering
them in landscape has been fixed, remove the sysprop and always use
the rounded corners radius specified in the xml file.

Change-Id: Ib0f61bbcbee6ead82beec2b149b0892836492b78
2021-05-12 10:37:43 -04:00
Chalard Jean
6cc8dc45c7 Merge "Allow any transport with TEST if the network is restricted" am: 7e9223a751 am: a76cc4e98d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702489

Change-Id: I8b42aa698f279774b8d5781811dc848c7d7ff713
2021-05-12 14:33:13 +00:00
Treehugger Robot
d52c25c2bd Merge "Add lcnathalie to OWNERS" am: d7158e25d6 am: 3c351fd63c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705352

Change-Id: Iff6217a949282bd89a006d7a8970ab2638cdb538
2021-05-12 14:33:04 +00:00
satayev
c792a3d96b Merge "Expose SharedLibraryInfo#getAllCodePaths as @TestApi." am: 3f955dda5c am: db47bd0c94
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703011

Change-Id: Idc02f14de952608b9a0a8ce4417576eea3d09ef5
2021-05-12 14:32:33 +00:00
Chalard Jean
a76cc4e98d Merge "Allow any transport with TEST if the network is restricted" am: 7e9223a751
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702489

Change-Id: Ic688c9d328242962c57631632b33236a69852ed6
2021-05-12 14:29:56 +00:00
Treehugger Robot
3c351fd63c Merge "Add lcnathalie to OWNERS" am: d7158e25d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705352

Change-Id: Icc45ed9b5517194076b18958c898c515948b4fc3
2021-05-12 14:26:26 +00:00
Remi NGUYEN VAN
73ca3ed15d Merge "Use jniThrowErrnoException from JNIHelp" am: eff6bb9c48 am: 51a05fdd14
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703087

Change-Id: I52864a1dff894d827e97332ce9ddd506ae297270
2021-05-12 14:25:42 +00:00
Remi NGUYEN VAN
1d78211ffb Merge "Move NetworkUtils JNI out of core/jni" am: 44862ff783 am: 0386387d39
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703086

Change-Id: Icc10740c6f18755a86d4f3cc9fb59bcb6a933910
2021-05-12 14:25:23 +00:00
Remi NGUYEN VAN
1778eda40a Merge "Build framework-connectivity using module_current" am: ea96653e66 am: 719ae7062d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703085

Change-Id: I47046e76bab062d0f887f2f965c054054acba0c5
2021-05-12 14:25:00 +00:00
satayev
db47bd0c94 Merge "Expose SharedLibraryInfo#getAllCodePaths as @TestApi." am: 3f955dda5c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703011

Change-Id: I0ef56b657d6090b755750ca23211954f4d57e113
2021-05-12 14:20:49 +00:00
Remi NGUYEN VAN
51a05fdd14 Merge "Use jniThrowErrnoException from JNIHelp" am: eff6bb9c48
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703087

Change-Id: I6a1d75a1792883a7dc96c1beb108e83653c668a0
2021-05-12 14:17:28 +00:00
Remi NGUYEN VAN
0386387d39 Merge "Move NetworkUtils JNI out of core/jni" am: 44862ff783
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703086

Change-Id: Icd812cda9e75015093080126bd20210034af5839
2021-05-12 14:13:20 +00:00
Remi NGUYEN VAN
719ae7062d Merge "Build framework-connectivity using module_current" am: ea96653e66
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703085

Change-Id: I67461b530e5292f94e3e1426ff0ec93ea657cf21
2021-05-12 14:05:55 +00:00
TreeHugger Robot
3d18b83a20 Merge "Fix UiTranslationSpec#shouldPadContentForCompat javadoc." into sc-dev 2021-05-12 14:00:03 +00:00
Chalard Jean
7e9223a751 Merge "Allow any transport with TEST if the network is restricted" 2021-05-12 13:57:31 +00:00
Treehugger Robot
d7158e25d6 Merge "Add lcnathalie to OWNERS" 2021-05-12 13:47:04 +00:00
Beth Thibodeau
90cff49c35 Merge "Close guts during transitions" into sc-dev 2021-05-12 13:35:35 +00:00
satayev
3f955dda5c Merge "Expose SharedLibraryInfo#getAllCodePaths as @TestApi." 2021-05-12 13:21:24 +00:00
Eric Laurent
c2e953cf8a Merge "audio:fix STREAM_SYSTEM_ENFORCED index when camera sound forced" am: 74e618ff8b am: 432f868e78 am: c80912849e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702488

Change-Id: I2f2e239ace616bf28efb4949c53dceab09e7ad14
2021-05-12 13:19:19 +00:00
Jordan Demeulenaere
ac3b62b2d0 Merge "Scale splash screen icon by 1.2 instead of 1.3" into sc-dev 2021-05-12 13:19:10 +00:00
Hai Zhang
977345eba5 Add media-module-sdk build target.
Bug: 177884752
Test: m media-module-sdk
Merged-In: Ib37f2861a3c12526686b6ec78d9345aead6d51c9
Change-Id: Ib37f2861a3c12526686b6ec78d9345aead6d51c9
(cherry picked from commit a2fd7fd012)
2021-05-12 14:15:35 +01:00
Remi NGUYEN VAN
eff6bb9c48 Merge "Use jniThrowErrnoException from JNIHelp" 2021-05-12 13:12:32 +00:00
Remi NGUYEN VAN
44862ff783 Merge "Move NetworkUtils JNI out of core/jni" 2021-05-12 13:12:09 +00:00
Remi NGUYEN VAN
ea96653e66 Merge "Build framework-connectivity using module_current" 2021-05-12 13:11:22 +00:00
Peter_Liang
fb49c4b10d Fix the animation is not smooth when moving the a11y fab to the edge.
Root cause:
Dynamically set the margin of view

Solution:
1. Add another WindowManager layoutparam flag "FLAG_LAYOUT_NO_LIMITS"
2. Fix the margin of view

Bug: 187924555
Test: atest AccessibilityFloatingMenuViewTest AccessibilityFloatingMenuTest AnnotationLinkSpanTest DockTooltipViewTest MigrationTooltipViewTest
Change-Id: I254e872e91777c382b9a0c9b350238ddcd0d7862
2021-05-12 21:05:55 +08:00
Eric Laurent
851b347171 AudioService: fix AVRCP absolute volume reset
Reset mAvrcpAbsVolSupported in both AudioService and BtHelper
when disconnecting an A2DP device.

Bug: 184447729
Test: music playback and volume change over Bluetooth A2DP
Change-Id: Ie7df473b16c454398fb14f9b5489d8889bc653d0
2021-05-12 15:05:12 +02:00
Eric Laurent
c80912849e Merge "audio:fix STREAM_SYSTEM_ENFORCED index when camera sound forced" am: 74e618ff8b am: 432f868e78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702488

Change-Id: I9af7417eb8b65d6e0c4526882fe16a4e8de6df78
2021-05-12 13:04:01 +00:00
Nathalie Le Clair
2c987129a7 Merge "Send <Inactive Source> if put to standby by connected device" into sc-dev 2021-05-12 13:02:26 +00:00
Nathalie Le Clair
6fe7de2ea3 Merge "Playback device to not send <Inactive Source> before <Standby>" into sc-dev 2021-05-12 13:01:47 +00:00
TreeHugger Robot
5dab249e44 Merge "Add OWNERS file for battery saver tests." into sc-dev 2021-05-12 12:43:27 +00:00
Eric Laurent
432f868e78 Merge "audio:fix STREAM_SYSTEM_ENFORCED index when camera sound forced" am: 74e618ff8b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702488

Change-Id: I4a09b92dcc9d06265faa6eb9bafb42b8ca36214b
2021-05-12 12:41:17 +00:00
Fiona Campbell
6306169f86 Add fallback for sensor identification in ddc
If a display device config was specified but without a valid ambient light sensor, it would fall back to Sensor.TYPE_LIGHT rather than the specified one in config.xml. This change fixes that.

Bug: 187130675
Test: adb shell dumpsys display | grep DisplayDeviceConfig
Test: com.android.server.display
Change-Id: I5b3f71a7c32055dbbd43d8fd139cfa7d09b9b3c4
2021-05-12 13:34:13 +01:00
Eric Laurent
74e618ff8b Merge "audio:fix STREAM_SYSTEM_ENFORCED index when camera sound forced" 2021-05-12 12:25:23 +00:00
Anna Zappone
8d923add0f Add status scrim for full-bleed and update empty
Bug: 180113387, 182891880, 185894289
Test: PeopleTileViewHelperTest
Change-Id: If5e246207fa34f27ad103971b32018f2c7863931
2021-05-12 12:00:04 +00:00