Commit Graph

8973 Commits

Author SHA1 Message Date
TreeHugger Robot
a401999f85 Merge "Check custom component names before aggregating BatteryUsageStats snapshots" into sc-qpr1-dev am: 0ef5152b17
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15872124

Change-Id: I453c8cda7d7d6ab29facc35acd1d6ab84f6ee5fa
2021-09-25 02:17:20 +00:00
Dmitri Plotnikov
5375fe32cb Drop per-app measured energy when an OTA changes the set of energy components am: 50348e3120
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15857253

Change-Id: Ib7813a74c1c4c12d1827d8a07f6caaa8dd4de65b
2021-09-25 02:11:05 +00:00
Adam He
d9e69e2b50 Content Capture change to send window token on creating session.
Bug: 189477723
Test: atest CtsContentCaptureTestCases
Change-Id: I70a0be583faae1a18c61e70c72a3d2a8e9e46438
2021-09-22 17:06:50 +00:00
Dmitri Plotnikov
0c561475c3 Check custom component names before aggregating BatteryUsageStats snapshots
If the lists of custom power components do not match, a crash will occur.
Instead of causing a crash, simply skip incompatible snapshots.

Bug: 196040329
Bug: 200511361
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryUsageStatsProviderTest

Change-Id: I87ba605371a5f3119dcff33f6109e94ee46ab57d
(cherry picked from commit a1ea9ecd56)
2021-09-20 18:35:09 +00:00
Dmitri Plotnikov
50348e3120 Drop per-app measured energy when an OTA changes the set of energy components
Bug: 200123115
Test: atest BatteryStatsTests
Change-Id: I750a5c9fa3faa9757625b2d2494df1484b68016d
(cherry picked from commit 9cb960304e)
2021-09-17 23:10:56 +00:00
Charles Chen
c72d4fc175 Merge "[RESTRICT AUTOMERGE] Send DA's config directly when attaching to DA" into sc-qpr1-dev 2021-09-15 13:29:40 +00:00
TreeHugger Robot
668495d752 Merge "Ensure package context used by System UI has a valid userId." into sc-qpr1-dev am: e7f5a37501
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15584842

Change-Id: Ief73f955c719d82ca6c5bbe446f6da71af639551
2021-09-15 11:45:14 +00:00
TreeHugger Robot
e7f5a37501 Merge "Ensure package context used by System UI has a valid userId." into sc-qpr1-dev 2021-09-14 20:29:02 +00:00
Jeff DeCew
9d1e05c6b3 Ensure package context used by System UI has a valid userId.
Fixes: 189924598
Bug: 194356170
Test: atest SystemUITests
Test: atest android.service.notification.StatusBarNotificationTest#testGetPackageContext_worksWithUserAll
Change-Id: Ic43a0301cb62ab27e276c2938012a27c3a9a6fff
2021-09-14 13:39:45 -04:00
Charles Chen
37430c5ba8 [RESTRICT AUTOMERGE] Send DA's config directly when attaching to DA
WindowContext relies on WindowTokenClient#onConfigurationChanged after
calling WMS#attachWindowContextToDisplayArea.
However, it took some time to wait for onConfigurationChanged callback
from the server side so that we may get a stale value right after
creating WindowContext.
This confuses developers especially when the foreground activity is in
size compat mode or freeform because the process config is overridden
by activity's config.
This CL makes #attachWindowContextToDisplayArea return DA's configuration
and applies to WindowContext direcly.
It also benefits WindowProviderService because it can obtain DA's
 configuration before onCreate() based on [1] and this CL.

Bug: 190019118
Bug: 190745506
Bug: 198298520
Test: manual - 1. launch an Activity in size compat mode
               2. create a WindowContext and verify if WindowMetrics
                  matches DA bounds.
Test: atest WindowContextTest WindowContextTests
Test: atest WindowContextControllerTest ContextGetDisplayTest
[1]: dd4a748af0

Change-Id: I8dd3987b731662502bc01e9d2ed67e718ada5f46
2021-09-14 03:06:50 +00:00
Jeff DeCew
14932fc95a Merge changes I0fc3b7ae,I712e6d6b into sc-qpr1-dev am: 2f0616bd79
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15795789

Change-Id: I6a1819dd38b091a737f421ab2511e020c93e063d
2021-09-10 15:58:27 +00:00
Jeff DeCew
2f0616bd79 Merge changes I0fc3b7ae,I712e6d6b into sc-qpr1-dev
* changes:
  Reduce the color contrast requirements for the emphasized action button fill color.
  Refactor the color span code inside Notification.java and add tests.
2021-09-10 15:28:37 +00:00
Michael Wachenschwanz
04dcc9e512 Merge "Ref count isolated uid usage in BatteryStats" into sc-qpr1-dev am: b85b750561
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15756344

Change-Id: I6998822dfe23a513d5c52a0c931bb906eb6d59b2
2021-09-09 23:54:51 +00:00
Jeff DeCew
050a0d0d64 Reduce the color contrast requirements for the emphasized action button fill color.
This reduces the contrast requirement between the notification background and the button fill from 3:1 to 1.3:1

Fixes: 196393060
Test: manual testing using the go/notify2-apk and the CallStyle color customizer
Test: android.app.NotificationTest
Change-Id: I0fc3b7ae1ede7afd28974c59fa2a58d7fea2e9de
2021-09-09 15:00:00 -04:00
Jeff DeCew
5cb7307ebb Refactor the color span code inside Notification.java and add tests.
* This makes it easy to reduce the contrast requirement between the notification background and the button fill in another review.
* This also fixes a bug where partial-length color spans within the emphasized buttons would be contrast-adjusted only with the notification background color rather than the button fill color.

Bug: 196393060
Fixes: 197572220
Test: manual testing using the go/notify2-apk and the CallStyle color customizer
Test: android.app.NotificationTest
Change-Id: I712e6d6b2da1de89afeacda7bd2fc4ad24632811
2021-09-09 14:59:59 -04:00
Michael Wachenschwanz
b028aa01c6 Ref count isolated uid usage in BatteryStats
Wakelock tracking in BatteryStats relies on the the isolated uid map
when tracking wakelocks from isolated uids. The map needs to keep the
isolated uid while it still has a  wakelock.

Bug: 194414351
Test: atest BatteryStatsNoteTest
Change-Id: I5e51f5f90191829d12fb080169520d9827b9906c
(cherry picked from commit 83c0928c34)
Merged-In: I5e51f5f90191829d12fb080169520d9827b9906c
2021-09-07 22:47:21 +00:00
TreeHugger Robot
5af5c83250 Merge "Filter Alias which points non-existing font family name" into sc-qpr1-dev am: 2d88769f5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15674535

Change-Id: I655a90bf8032a97031b8af6249bdf72e05b77fc7
2021-09-03 20:15:28 +00:00
TreeHugger Robot
2d88769f5e Merge "Filter Alias which points non-existing font family name" into sc-qpr1-dev 2021-09-03 19:59:52 +00:00
Tiger Huang
a42a8d6bf3 Merge "Invoke insets animation callbacks when resizing system bars" into sc-v2-dev 2021-09-02 11:12:17 +00:00
Alexander Dorokhine
b7e36190f6 Merge "Update framework from jetpack." into sc-v2-dev 2021-09-01 21:12:17 +00:00
Ady Abraham
c1d91ef5d2 Merge "DisplayManagerGlobal: fix native refresh rate callback registration" into sc-qpr1-dev am: c265f32026
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15689742

Change-Id: I1f37e1e8c0c3a6ced87634d195e795284578e3de
2021-08-31 00:31:42 +00:00
Ady Abraham
0ee31107ed DisplayManagerGlobal: fix native refresh rate callback registration
When AChoreographer is the only callback registered with
DisplayManagerGlobal and there are no other display listeners,
DisplayManagerGlobal incorrectly skips callback registration with DMS.

Bug: 193945763
Test: atest DisplayManagerGlobalTest
Change-Id: I4b737fa0a91541fe331edcf3454724200e2db971
2021-08-27 20:26:46 +00:00
Seigo Nonaka
4ed687a48f Filter Alias which points non-existing font family name
The FontFamily will be removed if none of font files exist on the
device.

Bug: 192479819
Test: atest FontListParserTest
Change-Id: I36f6476fe37bc04ec8737936747385c63908d651
(cherry picked from commit 691cfe8818)
2021-08-26 06:21:18 +00:00
TreeHugger Robot
845a005342 Merge "unite all locks under BroadcastRadio" into sc-v2-dev 2021-08-18 23:56:20 +00:00
Alexander Dorokhine
6ce1d70fb4 Update framework from jetpack.
Changes included:
* 74e6d6f: Handle the switch in datatype in DeleteByQueryResultProto#stats from DeleteStatsProto to DeleteByQueryStatsProto
* 40f6974: Return Native StorageInfo from AppSearchImpl
* c1bcc04: Bring back the checkSuccess() method in AppSearchBatchResult.
* 4222618: Logging stats for SetSchema.
* 89e1c33: Use the user-defined logger in SearchResultsImpl
* 3bc2616: Log the stats for SearchResults.getNextPage()

Bug: 173532925
Bug: 194118423
Bug: 194309308
Test: Presubmit
Change-Id: I3c06c937c8f59bcfada4cd36d61cba83d72f80b2
2021-08-17 15:17:40 -07:00
Jeff DeCew
262b278197 Merge changes I09b3999a,I590be0ba into sc-qpr1-dev am: 10c7e2b811
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15549414

Change-Id: I9597ee3b59967386c95bb5aa2129ed5ea7b5e58d
2021-08-16 19:38:07 +00:00
Jeff DeCew
d8054270e7 Use tertiary accent color for expander with unread count.
Fixes: 196586577
Test: visual inspection
Test: atest android.app.NotificationTest
Change-Id: I09b3999ad1c51615fbf7c8027dc65e6750721f18
2021-08-16 14:19:13 +00:00
Jeff DeCew
4c0e8a62e6 Fix ContrastColorUtil.findContrastColorAgainstDark to return the valid color
Fixes: 196600502
Test: atest ContrastColorUtilTest
Change-Id: I590be0ba30c03e867bf08558483239818b3aff82
2021-08-16 14:14:53 +00:00
Shivam Agrawal
2d59448295 Merge "Filter-Diff Screen Layout Changes for Activity Relaunch" into sc-v2-dev 2021-08-14 04:11:56 +00:00
Keun young Park
8e8bc5bf8c unite all locks under BroadcastRadio
- Each layer having separate a lock and making calls to other layers
  while holding lock leads into deadlock.
- Change all of them to use a single lock from the service to avoid
  deadlock.
- Performance impact should be minimal as there are not that many
  players for radio (one app, HAL, and system server) and the amount
  of calls are not that frequent.

Bug: 194818704
Test: atest BroadcastRadioTests
Change-Id: I5f51c0e0a04ae10428f721be508d5579dc1dd837
(cherry picked from commit 2cdb566acb)
Merged-In: I5f51c0e0a04ae10428f721be508d5579dc1dd837
2021-08-13 22:52:32 +00:00
TreeHugger Robot
d27045ed9d Merge "update broadcast radio owner" into sc-v2-dev 2021-08-13 21:44:26 +00:00
Ruslan Tkhakokhov
a4a55908ff Merge "Handle empty <cloud-backup> section in android:dataExtractionRules" into sc-dev am: b72bf2927e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15462078

Change-Id: I634558a7453972b8f4ea089c641692b485315a77
2021-08-06 23:43:53 +00:00
Shivam Agrawal
8bec600008 Filter-Diff Screen Layout Changes for Activity Relaunch
Currently, an activity is relaunched from a resize only if
the activity does not handle SCREEN_SIZE config changes and
the new activity size crosses a width, height, or smallest
width resource qualifier. A change in activity size may also
change an activity’s screen layout. However, an activity
is relaunched from a screen layout change if it does not
handle SCREEN_LAYOUT config changes even if the screen layout
did not cross a screen layout resource qualifier.

This CL does three things:
(1) Propogates screen layout qualifiers through the same
path as width, height, and smallest width qualifiers
in the AssetManager to make it available to the
WindowManager.
(2) Prevents an activity relaunch if the screen layout
has been changed but does not cross a screen layout
qualifier.
(3) Adds tests for SizeConfigurationBuckets for the new
screen layout logic as well as for existing logic.

Test: atest FrameworksMockingCoreTests:SizeConfigurationBucketsTest
Bug: b/192369163 b/187529743
Change-Id: I41d28e6492b76c4284c4dca2c1f3f5904fc5e91a
2021-08-06 14:15:23 -04:00
Ruslan Tkhakokhov
21f45cd998 Handle empty <cloud-backup> section in android:dataExtractionRules
Currently the <cloud-backup> section in android:dataExtractionRules is
ignored unless it contains rules. Instead, we should interpret it as
'everything other than cache and no-backup dirs is eligible for cloud
backup'.

Bug: 195095045
Test: 1. atest BackupEligibilityHostSideTest
      2. Use a test app with empty <cloud-backup> section to manually
      test:
          2.1. Empty section - everything is backed up
	  2.2. Empty section but "disableIfNoEncryptionCapabilitites"
	  set to "true" - data only backed up if the transport supports
	  encryption.
Change-Id: Ic8066721a46bda688f9211c51a0f2497e9caf93b
2021-08-06 12:16:05 +00:00
Yabin Huang
6f8792bba7 Merge "Add hidden APIs to allow to get and set task ID in AccessibilityWindowInfo" into sc-v2-dev 2021-08-05 01:22:36 +00:00
Keun young Park
cdd1e3c1ba update broadcast radio owner
Bug: 194818704
Test: NA
Change-Id: Ic3632f3151fbedd296e7c904c1a47880a6ce3cdd
Merged-In: Ic3632f3151fbedd296e7c904c1a47880a6ce3cdd
2021-08-03 23:32:25 +00:00
Louis Chang
3acc328b12 Merge "Sending TaskFragment token to client for the launching activity" into sc-v2-dev 2021-08-03 02:25:11 +00:00
Yabin Huang
1cd59c50f1 Add hidden APIs to allow to get and set task ID in AccessibilityWindowInfo
Bug: 195346337
Test: atest android.view.WindowInfoTest
Change-Id: I416f0330966e4a1880a2b6bdd6f24e6077cbe1cc
2021-08-03 00:56:02 +00:00
Wu Ahan
d6d30bf7f6 Merge "Support surface only instrumentation" into sc-v2-dev 2021-08-02 10:06:03 +00:00
Louis Chang
332036a29e Sending TaskFragment token to client for the launching activity
Activity#onCreate is called before receiving the TaskFragment
appeared event in the client process. So, the client split
controller created another split and resulted in unexpected
behaviors.

Bug: 194860679
Test: start activity to side
Test: wm presubmit

Change-Id: Iac34bd39376940c5c0224c8687ad9858a4190e20
2021-08-02 09:42:36 +08:00
Li Li
d2aeb490a8 Merge "Freezer: fix exception when parsing /proc/locks" into sc-dev am: ef12967b75
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15395534

Change-Id: I28f1b15ab636063727f02414a98896ee2679c6fc
2021-07-30 16:50:50 +00:00
Ahan Wu
7141ab2619 Support surface only instrumentation
- Support surface only instrumentation.
- Add enums for pip and wallpaper instrumentation.

Bug: 170708749
Test: atest InteractionJankMonitorTest
Test: atest FrameTrackerTest
Change-Id: Iec1eb82d1a4756a7b85c8fbdd05f4132a74c613c
2021-07-29 19:21:31 -08:00
Li Li
bbe06e7b59 Freezer: fix exception when parsing /proc/locks
The original code is based on /proc/locks manpage. Unfortunately, that
manpage is never correctly updated to include the new field for blocked
locks. The new code detects the extra field. As StringTokenizer is too
heavy, ProcFileReader is used for better performance.

Bug: 194756340
Test: FrameworksUtilTests com.android.internal.util.ProcFileReaderTest
Test: FrameworksCoreTests com.android.internal.os.ProcLocksReaderTest
Test: No /proc/locks parsing exception with blocked locks
Change-Id: I4c9763f9d3091f7d84d2e4b672d7e5cb78b33f59
2021-07-29 09:18:53 -07:00
Chilun
da52a50220 Remove flaky annotation
The flakewas fixed by ag/15353756, so remove the annotation.

Bug: 194242735
Test: atest ActivityThreadTest
Change-Id: Ia6e3eda250a0b54a2027d16f6e51887c85ac8f95
2021-07-29 04:03:35 +00:00
TreeHugger Robot
495abb7eab Merge changes from topic "native_hint" into sc-dev am: ea52c87596
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15326475

Change-Id: I805e930ede0c22bbcbec62d1b0738dd7c91f5dc5
2021-07-28 14:44:51 +00:00
Terry Wang
32f6efb9af Merge "Fix validation crash for nextPageToken." into sc-dev am: f4b8e82790
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15345292

Change-Id: I33a42de67660d9c7908a4fd4a042d7012002466e
2021-07-28 14:43:39 +00:00
Tiger Huang
9052763843 Merge "Use InsetsVisibilities to carry requested visibilities" into sc-v2-dev 2021-07-27 06:21:13 +00:00
Tiger Huang
090c0cbcb0 Use InsetsVisibilities to carry requested visibilities
InsetsState contains much more information than visibilities, such as
display frame, display cutout, rounded corners, privacy indicator
bounds, and frames of of insets sources. The control target only needs
to send the requested visibilities to WMS, so it can be too heavy to use
InsetsState.

This CL introduces an new class, InsetsVisibilities, which only contains
which type has which visibility. So it uses less memory, and it is more
efficient on copying and checking the equality.

Fix: 194186241
Test: atest InsetsVisibilitiesTest WindowAddRemovePerfTest
            InsetsControllerTest RegisterStatusBarResultTest
            CommandQueueTest LightsOutNotifControllerTest
            ActivityRecordTests DisplayContentTests
            DisplayPolicyLayoutTests InsetsPolicyTest
            InsetsSourceProviderTest InsetsStateControllerTest
            WindowFrameTests WindowManagerServiceTests WindowStateTests
Change-Id: I86c1b26b4383bfa3b924726d580e5706e13ba735
2021-07-26 21:55:34 +08:00
TreeHugger Robot
ea52c87596 Merge changes from topic "native_hint" into sc-dev
* changes:
  Implement java PerformanceHintManager on top of native
  Switch HWUI to use native performance hint API
  Implement native PerformanceHint API
2021-07-22 21:15:04 +00:00
Terry Wang
f4b8e82790 Merge "Fix validation crash for nextPageToken." into sc-dev 2021-07-22 19:32:18 +00:00