Commit Graph

19008 Commits

Author SHA1 Message Date
Andrey Epin
45fe7a2d68 Merge "Update icon only once" into tm-qpr-dev am: 754656a669
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19263009

Change-Id: I36255c2c1448a7a067f74a8440e5de1cfe824074
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 05:06:54 +00:00
Andrey Epin
754656a669 Merge "Update icon only once" into tm-qpr-dev 2022-08-04 04:43:17 +00:00
Andrey Epin
4eb9ef36cb Merge "Set default list view update to 0" into tm-qpr-dev am: d7e183e5ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19212236

Change-Id: I4a6271f2e71deb2f3c72c3f76d0e1bd838d51ab8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 03:35:13 +00:00
Andrey Epin
d7e183e5ad Merge "Set default list view update to 0" into tm-qpr-dev 2022-08-04 03:13:55 +00:00
Wu Ahan
ef28d3135e Merge "Mark CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE_LOCK as deprecated CUJ" into tm-qpr-dev am: 699f5e9471
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19429606

Change-Id: I5819ceedfe8917a887e5f0339fd5c52dc0fda516
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 16:09:59 +00:00
Wu Ahan
699f5e9471 Merge "Mark CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE_LOCK as deprecated CUJ" into tm-qpr-dev 2022-08-03 15:49:08 +00:00
Nicolò Mazzucato
e8359bcd81 Merge "Monitor fold to AOD latency" into tm-qpr-dev am: 560e645f3a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19117332

Change-Id: Ie7634ff6dd13e12fc7cf2aa26b52238c9269716a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 12:23:46 +00:00
Nicolò Mazzucato
560e645f3a Merge "Monitor fold to AOD latency" into tm-qpr-dev 2022-08-03 11:52:06 +00:00
TreeHugger Robot
cf7e8cb01f Merge "Fix leakage of pointer location" into tm-qpr-dev am: 7f96bd5a88
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19465302

Change-Id: I822d4225329357df7ee34807f391f6956c721a8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 11:36:56 +00:00
TreeHugger Robot
7f96bd5a88 Merge "Fix leakage of pointer location" into tm-qpr-dev 2022-08-03 11:12:10 +00:00
Nicolo' Mazzucato
1a1976c329 Monitor fold to AOD latency
This logs the latency from when we receive the device state change (device folded), to when the AOD animation starts.

Bug: 237270816
Test: atest FoldAodAnimationControllerTest
Change-Id: I67e0e04bbc24064640f46cdc8feb667814170529
Merged-In: I67e0e04bbc24064640f46cdc8feb667814170529
2022-08-03 09:23:04 +00:00
Cliff Wu
dc15efd4ad Merge "Fix generic wrong strings to comply with the UX guideline" into tm-qpr-dev am: 0bc5eed6fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18871018

Change-Id: I4eddfbf9ccf18148e3bc9a04c631d59c8f41bb54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 23:19:51 +00:00
Cliff Wu
0bc5eed6fa Merge "Fix generic wrong strings to comply with the UX guideline" into tm-qpr-dev 2022-08-02 23:13:14 +00:00
Mark Renouf
dcc2bb37a3 Adds OWNERS for ScreenshotHelper
This code is managed as part of SystemUI screenshots.

(This is a manual cherrypick of
27df215eba from AOSP.)

Change-Id: I624a52754cffcca66798d2813d25d8896597a39a
2022-08-02 10:55:15 +00:00
Arthur Hung
5a47857643 Fix leakage of pointer location
When display is removing, we should explicitly remove the pointer
location view to ensure the client object would be released.

Bug: 239078899
Test: Enabled pointer location, add/remove virtual display, check if
      the surface would be released.
Change-Id: I89ef3dc8e5b4aa8c3b7d5c1393d6543a9d3d67db
2022-08-02 09:38:35 +00:00
Cliff Wu
d1f854d2c0 Fix generic wrong strings to comply with the UX guideline
- The generic error need to remove "Unavailable" in the header and
only show body text.
- The "Play Store" app needs to be added to the error for a specific
app and it says "Play Store not available".
- Dialer app uses generic alert dialog.

Bug: 230048652
Test: Manual, atest FrameworksServicesTests:VirtualDeviceManagerServiceTest
Change-Id: I8b56e2804c3204901a3551d3300ab8c0391e7260
2022-08-02 04:18:34 +00:00
Treehugger Robot
83de951846 Merge "Adds OWNERS for ScreenshotHelper" am: 3614185d38 am: 115e87852f am: 2957668101 am: 14d73d065f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2168665

Change-Id: I22facf3b0f1125936c64c59e9a8e5d81559fa1a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 20:26:49 +00:00
Treehugger Robot
115e87852f Merge "Adds OWNERS for ScreenshotHelper" am: 3614185d38
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2168665

Change-Id: I57e4f422318fc35b31fe6ec2cc7ec06d01eda317
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 19:39:19 +00:00
Mark Renouf
6b376862d0 Merge "Code cleanup of ScreenshotRequest and usages" into tm-qpr-dev am: bbbfa95637
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19377517

Change-Id: I48b3e476f874bd81b5f1af53ed5f1757f4640bd4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 19:38:13 +00:00
Mark Renouf
693478bd52 Code cleanup of ScreenshotRequest and usages
Make constructor visible for tests
Make all fields final (no setters, so already effectively final)
Remove mHasStatusBar and mHasNavBar (unused)
Remove overload 'takeScreenshot' method without a source param
Added missing @IntDef annotations to parameters

Bug: 231957192
Test: atest ScreenshotHelperTest SystemActionPerformerTest
Change-Id: Ief43bd0ba50dafac720ae18d00c3c99b8d31e2e1
2022-08-01 18:14:33 +00:00
Mark Renouf
27df215eba Adds OWNERS for ScreenshotHelper
This code is managed as part of SystemUI screenshots.

Change-Id: I624a52754cffcca66798d2813d25d8896597a39a
2022-07-29 14:20:16 -04:00
Ahan Wu
ad673c2220 Mark CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE_LOCK as deprecated CUJ
The CUJ is never implemented, mark it as deprecated to avoid confusions.

Bug: 229249877
Test: NA
Change-Id: I40d468eca4dfa483420605515ec5e11551be8afc
2022-07-27 10:46:46 +00:00
Jeff Sharkey
ad18b6f58c Merge changes from topic "jul15" am: 0e27faa039 am: 954431c4df am: fd0915aeec am: 70123a912d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2155659

Change-Id: I6d5cc1577c71cf60fe16c62d5523cfb5c3a10468
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 20:20:04 +00:00
Jeff Sharkey
954431c4df Merge changes from topic "jul15" am: 0e27faa039
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2155659

Change-Id: Ie949e0bb40967581190f7b98bb5005bab19cb7fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 19:12:28 +00:00
Jeff Sharkey
c6b3699b63 Offer explicit 3-byte vs 4-byte modified UTF-8.
As documented in art/runtime/jni/jni_internal.cc, ART has deviated
from the RI by using a 4-byte encoding instead of the 3-byte encoding
required by the JNI specification.

Some users are okay with this 4-byte encoding (where they control
both the reading and writing logic) but other users require
compatibility with the DataOutput/DataInput API contract, so this
change lets users request either behavior.

This change now exercises all tests in both 4-byte and 3-byte modes,
and exhaustively confirms that all valid code-points match the
DataOutput/DataInput contract when in 3-byte mode.

Benchmark results still show significant performance benefits when
using this 3-byte encoding over the upstream RI:

    timeRead_Upstream_mean (ns):                  5090068
    timeRead_LocalUsing3ByteSequences_mean (ns):  1996032
    timeRead_LocalUsing4ByteSequences_mean (ns):  1813250

    timeWrite_Upstream_mean (ns):                 3856276
    timeWrite_LocalUsing3ByteSequences_mean (ns): 1632697
    timeWrite_LocalUsing4ByteSequences_mean (ns):  886503

Bug: 236923096
Test: atest FrameworksCoreTests:CharsetUtilsTest
Test: atest FrameworksCoreTests:FastDataTest
Test: atest FrameworksCoreTests:XmlTest
Test: atest FrameworksCoreTests:BinaryXmlTest
Test: ./frameworks/base/libs/hwui/tests/scripts/prep_generic.sh little && atest CorePerfTests:FastDataPerfTest
Change-Id: Ibddd36410a0d4a909522de011f23a337b53d6889
2022-07-19 10:36:37 -06:00
Alex Buynytskyy
2be5b4c118 Cache least recently used output buffer.
- reduce memory allocations especially when Xml is serialized inside a
tight inner loop,
- performance slightly improved.

BEFORE:
100 packages:
[2/4] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.516s)
	timeWrite_Binary_mean: 674979
	threadAllocCount_mean: 59
	timeWrite_Binary_min: 671194
	timeWrite_Binary_median: 674798
	timeWrite_Binary_standardDeviation: 3658
	threadAllocSize_mean: 530176
10 packages:
[2/4] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.542s)
	timeWrite_Binary_mean: 71113
	threadAllocCount_mean: 56
	timeWrite_Binary_min: 70201
	timeWrite_Binary_median: 71237
	timeWrite_Binary_standardDeviation: 692
	threadAllocSize_mean: 59136
1 package:
[2/4] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.091s)
	timeWrite_Binary_mean: 15698
	threadAllocCount_mean: 56
	timeWrite_Binary_min: 15072
	timeWrite_Binary_median: 15677
	timeWrite_Binary_standardDeviation: 410
	threadAllocSize_mean: 6439

AFTER:
100 packages:
[1/1] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.221s)
	timeWrite_Binary_mean: 605862
	threadAllocCount_mean: 53
	timeWrite_Binary_min: 602353
	timeWrite_Binary_median: 604424
	timeWrite_Binary_standardDeviation: 4972
	threadAllocSize_mean: 492748
10 packages:
[1/1] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.575s)
	timeWrite_Binary_mean: 58710
	threadAllocCount_mean: 50
	timeWrite_Binary_min: 57551
	timeWrite_Binary_median: 57798
	timeWrite_Binary_standardDeviation: 2129
	threadAllocSize_mean: 21696
1 package:
[1/1] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.151s)
	timeWrite_Binary_mean: 11576
	threadAllocCount_mean: 50
	timeWrite_Binary_min: 11315
	timeWrite_Binary_median: 11381
	timeWrite_Binary_standardDeviation: 431
	threadAllocSize_mean: 4336

Test: atest FastDataPerfTest XmlPerfTest
Bug: 195994150
Fixes: 195994150

Merged-In: Ieedd27a676d718967c2fac30bc48a68ae636a180
Change-Id: Ieedd27a676d718967c2fac30bc48a68ae636a180
2022-07-15 16:07:19 -06:00
TreeHugger Robot
de8e7777c8 Merge "Ensure all FrameTracker invocation run on either main or ui thread" into tm-qpr-dev am: 91a0bbdddf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18654746

Change-Id: I2b159823f2952f1de43f11bdbeadfe6971767471
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 20:45:08 +00:00
TreeHugger Robot
91a0bbdddf Merge "Ensure all FrameTracker invocation run on either main or ui thread" into tm-qpr-dev 2022-07-14 20:25:06 +00:00
Bill Lin
bfb19f11fc Merge "Instrument CUJ_SHADE_CLEAR_ALL with InteractionJankMonitor" into tm-qpr-dev am: fb4fdcee9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19272632

Change-Id: I3f8a0c7dc1ae8239855977c73c13d9ff289c5cda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 16:00:53 +00:00
Ahan Wu
f7bd2bc6ba Ensure all FrameTracker invocation run on either main or ui thread
FrameTracker has some ViewRootImpl invocations that it would be better
to make FrameTracker accesses run on either main or ui thread.

Bug: 200938639
Test: atest InteractionJankMonitorTest FrameTrackerTest
Change-Id: I91e9536293a694f3d110bda583a32b5918c96c55
2022-07-14 09:34:04 +00:00
lbill
03e80d715b Instrument CUJ_SHADE_CLEAR_ALL with InteractionJankMonitor
In NotificationStackScrollLayout
- Begin instrument in clearNotifications()
- End in onClearAllAnimationsEnd()

Note: due to all child views run clear anim concurrently,
we just monitor parent(NSSL).

Bug: 238863970
Test: atest SystemUITests
Test: make and get perfetto trace
Change-Id: I705d03357a5a458a7f9eae5ecc5c4cfd7811cf7c
2022-07-14 07:59:12 +00:00
Alex Buynytskyy
f8dcaf2fc0 Merge "Forcefully convert to basic Intent before calling PM API." into tm-qpr-dev am: aec1a526b9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19221809

Change-Id: I1ea0c55c86bf8a53c4668042fa2a8e8df22441b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 16:40:36 +00:00
Andrey Epin
33f923ec77 Update icon only once
We have multiple LoadIconTasks started for the same icon, first from the
list view measurement and then from the actual view biding. We let all
those tasks to update the UI which riggered (through an observed but not
precicly comprehended mechanism) multiple announcements for the first
item in the list.
Ideally, we should have only one loading task for an item, but that
would be a more complex fix. Instead, we just let the winning task to
update the UI.

Fix: 238681660
Test: Manual test.
Change-Id: I8cc7a9a12a3b2e9e49834500d8b7d2bf3e6367d3
2022-07-12 10:50:20 -07:00
Alex Buynytskyy
682df5bb41 Forcefully convert to basic Intent before calling PM API.
AIDL can't accept subclasses, see more info in the bug

Bug: 238277108
Fixes: 238277108
Test: follow steps in the bug, click on share
Change-Id: Ie691df4566e6b622c868bbed4377afc1ee82807d
2022-07-09 18:29:58 +00:00
Andrey Epin
68242f1b4b Merge "Fix Chooser-to-editor transition animation" into tm-qpr-dev am: 9b723322f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18304427

Change-Id: Ic3dc5abac382389e916325dda7a59c90a2dfa9b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 18:03:47 +00:00
Andrey Epin
9b723322f1 Merge "Fix Chooser-to-editor transition animation" into tm-qpr-dev 2022-07-07 17:53:29 +00:00
Andrey Epin
3d11dbc77c Merge "ResolverDrawerLayout to request layout when needed." into tm-qpr-dev am: d238f79f92
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19142926

Change-Id: Ic131b206b4c4153334a876e01649833477ce8887
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 17:05:27 +00:00
Andrey Epin
d238f79f92 Merge "ResolverDrawerLayout to request layout when needed." into tm-qpr-dev 2022-07-07 16:45:47 +00:00
Jerry Chang
338bfb7b48 Merge "Make sure system bars have visible background while force-showing" into tm-qpr-dev am: b11f679d66
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19193687

Change-Id: Icbf6a52c98e8f0f6245594daee7f0502698d46f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 02:14:42 +00:00
Jerry Chang
b11f679d66 Merge "Make sure system bars have visible background while force-showing" into tm-qpr-dev 2022-07-07 01:59:39 +00:00
Andrey Epin
64a7b85e9e Set default list view update to 0
This delay is not needed anymore.
Will rely on the remote configuration to revert the value if anything
would go wrong.

Bug: 224816815
Test: manual testing.
Change-Id: If045ed0ae488df1ad8ecaef1aea3ffe6b22e9cb1
2022-07-06 15:32:14 -07:00
Andrey Epin
e83e0620bd Fix Chooser-to-editor transition animation
Add a scene animation - image thumbnail in Chooser to full-size image in
the editor - when the thumbnail is visible.
Finishing Chooser activity while the transition animation is running
produces an effect of "flashing" background (as the activity disappears
before the animation completed). Thus the call to finish the activity is
delayed until the activity is stopped (i.e. becomes fully invisible).

Fix: 231448720

Test: Use 'Files' app to share an image, select Edit in the Chooser,
 observe animation (optionally slow down the animation in the developer
 settings)
Test: The same as the previous test but in the split-screen mode.
Test: Slow-down animation, select "edit" in the chooser and cancel the
 animation mid-flight. The ChooserActivity pauses and resumes and
 remains overall functional (had to slow down the fade-out animation in
 the code). The animation in this case is broken but
 addressing this case is beyond the scope of this change.
Test: Use a mock app with the dialog-themed activity instead of the
system image editor; check that Chooser fades out and finishes in
background.
Test: Accessibility with talk-back on.

Change-Id: I982b9b2a8a049b5986dce521ee1abcd9ad83ba38
2022-07-06 10:05:24 -07:00
Jerry Chang
1c995fa719 Make sure system bars have visible background while force-showing
Client insets controller can request to hide system bars to enter
immersive mode. However, there're cases force-show system bars like in
split screen or freeform mode. This makes sure the background view of
system bars are always visible while force-showing.

Fix: 234196894
Test: put an immersive app in split, verified system bars background
      won't be invisible
Change-Id: Ia167bce9e64cd81a2ade499f8c6528384d957209
2022-07-06 12:22:11 +00:00
Nick Chameyev
cf7494fd79 Merge "[Partial screen sharing] App selector initial version" into tm-qpr-dev am: 0b670f205e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18188206

Change-Id: I86840a3e81feffe9d6f978467f04d3d1bd6a6eef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-05 15:20:12 +00:00
Nick Chameyev
0b670f205e Merge "[Partial screen sharing] App selector initial version" into tm-qpr-dev 2022-07-05 15:02:58 +00:00
Christian Göllner
c227aaa274 Merge "Create API for WM to send letterbox info to SysUI." into tm-qpr-dev am: fb27457c53
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19032748

Change-Id: If10ac7a41f17332c3bdd5ace51aa436c7b9f8e26
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-05 07:52:39 +00:00
Christian Göllner
fb27457c53 Merge "Create API for WM to send letterbox info to SysUI." into tm-qpr-dev 2022-07-05 07:30:40 +00:00
Nick Chameyev
2bcb37a7ab [Partial screen sharing] App selector initial version
Adds an activity that inherits ChooserActivity
to select an app in the partial screen sharing
flow under a feature flag.
It doesn't have a proper visual design, analytics,
enterprise policies handling.

Bug: 218314434
Test: start partial screen sharing
Change-Id: Ia7d9ae07e2ef35d33f85530f26cab4e6cdc1f94a
2022-07-04 16:14:09 +00:00
Christian Göllner
a42e8efc83 Create API for WM to send letterbox info to SysUI.
+ Creates a new LetterboxDetails parcelable class
+ Adds LetterboxDetails as a parameter to IStatusBar#onSystemBarAttributesChanged

Test: Manually by checking that the device works without crashing
Fixes: 236829652
Change-Id: Ib4e615f6e4eb44d0fc4fb753b27a04b908e7bd24
2022-07-04 13:25:12 +00:00
Andrey Epin
883bb34d07 ResolverDrawerLayout to request layout when needed.
The list of fields that directly or undirectly and/or condtionally
influence view's layout:
onMeasure:
  mMaxWidth

onLayout:
  mTopOffset
    <- mCollapseOffset
  mCollapseOffset
    <- mCollapsibleHeight
      <- mShowAtTop
      <- mMaxCollapsedHeightSmall
      <- mCollapsibleHeightReserved
      <- mSmallCollapsed
      <- mAlwaysShowHeight
    <- mOpenOnLayout
    <- mShowAtTop
All their assigments is revied and discovered issues is addressed in
this CL (plus small adjustements suggested by the static code inspector).

Fix: 237718103
Test: Unit tests + manual.
Change-Id: I405b7a48dac18e090a055f3187004b3a8565586c
2022-07-01 11:49:43 -07:00