Commit Graph

18521 Commits

Author SHA1 Message Date
Dmitri Plotnikov
d945a44841 Merge "Address proportional counting for out-of-order timestamps" into tm-dev am: 860fe90fbd am: 892520724e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18062923

Change-Id: I22ae28bf2a73a03349942a8dc206b15a8651df21
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 01:49:00 +00:00
Dmitri Plotnikov
ae7b2277b9 Address proportional counting for out-of-order timestamps
Bug: 229906525
Test: atest FrameworksCoreTests:BatteryStatsTests

Change-Id: Id5fb963e256d56b42c9b5a0bc686af83ca3c7835
2022-05-03 19:04:44 +00:00
Matt Casey
6b1b9502fa Merge "Convert Personal/Work tabs to rounded bubbles" into tm-dev am: 5e35dcd369 am: 5850ed9a6f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18090806

Change-Id: I95d437de3a0895a4ed474fcca08927ec06ebe39c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:06:31 +00:00
Matt Casey
5e35dcd369 Merge "Convert Personal/Work tabs to rounded bubbles" into tm-dev 2022-05-02 21:05:36 +00:00
Matt Casey
c422f42971 Merge "Empty state UI tweaks" into tm-dev am: ec9b0f949e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17776446

Change-Id: Ife93e881e064af78744ecba4dcfe4f2431d346f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-30 18:44:38 +00:00
Matt Casey
ec9b0f949e Merge "Empty state UI tweaks" into tm-dev 2022-04-30 18:32:43 +00:00
Taran Singh
cd4b0f2cc4 Merge "Fix InputConnection creation callback" into tm-dev am: d5bb81348c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17896003

Change-Id: I8f4cab3d4daad7ca25faa04a9b6bb61db18bbd4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 19:10:12 +00:00
Taran Singh
d5bb81348c Merge "Fix InputConnection creation callback" into tm-dev 2022-04-29 18:58:36 +00:00
Matt Casey
b82f35f21b Convert Personal/Work tabs to rounded bubbles
Modernize the tabs in Sharesheet/Resolver to match All Apps.

Much of this is copied from the tabs implementation in All Apps.

Remove divider line below tabs (no longer needed).

More XML, less code.

Bug: 188589041

Test: Manual in light and dark themes
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Change-Id: Ib23a1927d416d32714dd8c890dd412c73f9e573c
2022-04-29 18:16:42 +00:00
Calvin Pan
b5ba0f40cd Merge "Fix empty resource showing "Und"" into tm-dev am: f71832b46b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17983788

Change-Id: Ie0c13dae6819e38f1f152e42fa22f7c841c60c4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 16:38:45 +00:00
Calvin Pan
f71832b46b Merge "Fix empty resource showing "Und"" into tm-dev 2022-04-29 03:55:52 +00:00
Taran Singh
fc6d5e91b7 Fix InputConnection creation callback
As noted in the linked bug, in certain scenarios IC established callback
is not always called. As a fix, we make sure we don't return early when
MSG_BIND callback is received from IME

Fix: 228105257
Bug: 217971553

Test: atest StylusHandwritingTest#testHandwritingEndToEnd

Change-Id: I780327003f7145c4f9b9df4dc5243227d7e67d92
2022-04-28 15:26:00 +00:00
Tom Hsu
c841e216a0 Merge "[Panlingual] Change Checkbox color and remove divider of listview" into tm-dev am: 12873579dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17822477

Change-Id: Ibe1f6e171bfb0b2e9afc0e02dd7288f554bcc410
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 13:12:01 +00:00
Tom Hsu
12873579dc Merge "[Panlingual] Change Checkbox color and remove divider of listview" into tm-dev 2022-04-28 12:24:02 +00:00
Mark Renouf
26624226be Merge "Restores a capture rate limit for long screenshots" into tm-dev am: 82c77bb127
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17988788

Change-Id: Ib390d07fd06cfa12c0b7ae1fe15e849e9fcd895a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 12:09:43 +00:00
Mark Renouf
82c77bb127 Merge "Restores a capture rate limit for long screenshots" into tm-dev 2022-04-28 11:46:50 +00:00
Calvin Pan
8d8d93bf6d Fix empty resource showing "Und"
Bug: 230689140
Test: manual
Change-Id: Ib732773758bb8344f04033be11f235456434bd29
2022-04-28 07:58:49 +00:00
TreeHugger Robot
a2a2a8177d Merge "Make cuj be synchrous among atoms.proto and InteractionJankMonitor" into tm-dev am: 6298c68c71
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17951299

Change-Id: I59c67f1689cc4176ac378a291a341d8c0fecff8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 06:20:59 +00:00
TreeHugger Robot
6298c68c71 Merge "Make cuj be synchrous among atoms.proto and InteractionJankMonitor" into tm-dev 2022-04-28 05:47:54 +00:00
Calvin Pan
f151b96d3a Merge "Adding state description for current locale item" into tm-dev am: ba95ddf69d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17950645

Change-Id: Ief30ca93b00613c405140d09fa84c02245626b92
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 02:56:05 +00:00
Calvin Pan
ba95ddf69d Merge "Adding state description for current locale item" into tm-dev 2022-04-28 02:42:29 +00:00
Mark Renouf
e8f1a8c559 Restores a capture rate limit for long screenshots
A previous change accidentally lost this delay between
incremental screen captures. This rate limit is needed
to prevent pushing screen capture faster than it can
render correctly.

Bug: 173700533
Bug: 217046739
Test: manual; long screenshot, observe app systrace
Change-Id: Ibd7940299b502c40212957395d272b6e52cc28be
2022-04-27 17:07:24 -04:00
Ahaan Ugale
ce7618a36c Merge "Allow IVoiceInteractionSessionListener to listen for window vis changes" into tm-dev am: 44e14e72b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17211290

Change-Id: I0ef34055a82eca0d2f2efcefae2aeb99eb0640e9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 17:33:52 +00:00
Ahaan Ugale
44e14e72b6 Merge "Allow IVoiceInteractionSessionListener to listen for window vis changes" into tm-dev 2022-04-27 17:03:31 +00:00
TreeHugger Robot
b4ac4d3815 Merge "Fix "always" option in ResolverActivity" into tm-dev am: 926db2d6d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17943621

Change-Id: I5cbd1b15815d0b09ea148d53daa77d0f729edd1a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 14:12:59 +00:00
TreeHugger Robot
926db2d6d3 Merge "Fix "always" option in ResolverActivity" into tm-dev 2022-04-27 13:44:02 +00:00
Shawn Lin
1fc4ebb093 Merge "Move kids mode relative logic to wm shell" into tm-dev am: b9109dd6ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17903530

Change-Id: I182a49a1f0d0d5f67d6019a52e49c1af0de1fb41
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 10:24:27 +00:00
Ahan Wu
6a7fdce626 Make cuj be synchrous among atoms.proto and InteractionJankMonitor
Bug: 230567287
Test: build pass
Change-Id: I4fa25b23921c8a434c97c5133779f1e9386c03fb
2022-04-27 06:56:45 +00:00
Matt Casey
f8a97ab1d8 Fix "always" option in ResolverActivity
mUnfilteredResolveList was incorrectly being set as null whenever
performSecondaryResolveListFilterin didn't end up filtering anything
(when its value should have been maintained in this case).

This incorrect mUnfilteredResolveList null value causes most of
ResolverActivity's onTargetSelected() logic to be skipped, thus it
doesn't notify the package manager of the 'always' selection.

This should match the behavior before ag/17509713 and fix the bug.

Test: Manual testing (install two email apps, click an email addr link,
choose a resolver target and press 'always', then do it again and
resolver shouldn't appear).
Test: atest
CtsDynamicMimeHostTestCases:android.dynamicmime.cts.PreferredActivitiesTestCases#testModifyGroupWithoutActualGroupChanges
Test: atest ResolverActivityTest

Bug: 230149644
Change-Id: Ia23e95359d320a3a63e39f9c50a159879e94bf3b
2022-04-27 03:48:02 +00:00
Calvin Pan
7a2ac50735 Adding state description for current locale item
To support Talkback to say "checked" when the current locale is
selected.

Bug: 228924751
Test: Using talkback
Change-Id: I3e2f8ba46106246e835e7ce5b580e501ab6c58c9
2022-04-27 03:30:26 +00:00
shawnlin
402727731f Move kids mode relative logic to wm shell
1. Move KidsModeSettingsObservor to wm shell.
2. Create a ForceShowNavBarSettingsOberver for wm core.

Bug: 230072077
Test: atest KidsModeTaskOrganizerTest
Change-Id: I1b3edf1fc804b9dac190fcc92b7b62bfc3366d64
2022-04-25 20:10:41 +08:00
Winson Chung
06fb230d6d Allow IVoiceInteractionSessionListener to listen for window vis changes
- The listener currently tracks session shown/hidden, but doesn't track
  the visibility of the session window which can change on the client
  side without the server knowing. In some cases, it's useful for SysUI
  to be able to track the visibility of the session window to show/hide
  bars appropriately.

Bug: 222308557
Test: Manual, launch the assistant and verify the calls are made
Change-Id: I9b4bb27c9497b2a828616caf72eaf345b072c294
2022-04-23 05:56:27 +00:00
James O'Leary
f87143c083 Merge "Create ResolverComparatorModel interface." into tm-dev am: ca46e52c30
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17913997

Change-Id: I2f402a63272c45ed06f676f9739dddb5896cbd74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 20:29:39 +00:00
James O'Leary
5b5d4d4316 Merge "Clean up ResolverListAdapter::rebuildList()." into tm-dev am: 6876316dc0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17869731

Change-Id: Ia9a0e5bc9ecf686f02b58372c7e2d875befa4c4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 20:28:35 +00:00
James O'Leary
ca46e52c30 Merge "Create ResolverComparatorModel interface." into tm-dev 2022-04-22 20:23:23 +00:00
Jeff Sharkey
856c155f2a Merge "Add OWNERS coverage for dump methods for public USB classes" am: 25976ab7be am: 48dff0549a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2063672

Change-Id: Ic19b956a9111ccf3cac47bf500da619bd6167101
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 17:37:59 +00:00
Jeff Sharkey
48dff0549a Merge "Add OWNERS coverage for dump methods for public USB classes" am: 25976ab7be
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2063672

Change-Id: I7bb943bbbad96bae9f43bf03da417a56c4eece9b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 17:12:24 +00:00
Joshua Trask
dc029cbba7 Clean up ResolverListAdapter::rebuildList().
Behaviorally, this is *almost* a pure refactoring. It does make
one very minor logic change(*) that could hypothetically fix a
race condition, although no particular bugs have ever been
observed as a result (nor do they seem especially probable), and
it's unknown what the severity would be if they ever were to occur.

Additionally, this change clarifies existing comments and adds
more inline documentation to help understand the rebuildList()
flow. Code cleanup identifies a few areas where the current design
seems a little clumsy, noted with new "TODO" comments in the code.
There's room for more improvement, but this function plays an
important role in preparing Sharesheet targets, so it's good to
bring attention to these thorny requirements.

For justifications of behavioral equivalence and other metacognitive
notes, see comments in the code review.

(*) The one behavior change is called out in code review comments;
    briefly, the line of code that sends a synchronous "results
    pending" event used to follow the line that started the async
    flow that would result in a "results complete" event. This
    could hypothetically race if the async work finished and sent
    "results complete" before we got to the "results pending" line.

Bug: 227486788
Test: `atest ChooserActivityTest` (no behavior changes expected)
Change-Id: I2e74d68579be8b34716ba2202ac2a08361008400
Merged-In: I2e74d68579be8b34716ba2202ac2a08361008400
(cherry picked from commit 1e42cad19b)
2022-04-22 16:09:09 +00:00
Joshua Trask
6cdd926f43 Create ResolverComparatorModel interface.
Define the API for interacting with comparator model data;
provide implementations for our two current model types; and
(as a first step) re-write our legacy ResolverComparators
to be implemented internally in terms of their new model types.

This is the first CL in a multi-part cleanup of the
AbstractResolverComparator design. This demonstrates that the
role of an AbstractResolverComparator sub-class amounts to
(i.e., Ctrl+F "@Override") some amount of work to prepare model
data; some cleanup; and a set query methods against data that
*really should be* immutable (separated in this CL as the new
ResolverComparatorModel interace). Any remaining responsibilities
of the abstract base class would be better handled (in a subsequent
CL) by an external controller operating on a ResolverComparatorModel
(i.e., preferring composition to inheritance). The async
model-preparation steps should also be separated and cleaned
up (in a later CL).

I believe this to be a pure refactoring with no observable side
effects. While the new design aids in implementing the correct
"immutable snapshot" style, for now I've written the new
ResolverComparatorModel implementations to preserve any possible
quirks in the legacy implementations. Nevertheless, if some
inadvertant behavior change is introduced as a result of this CL,
it's most likely to be a bug-fix where we previously would've mixed
in stale data. A later CL will intentionally pursue those fixes.

Test: atest ResolverActivityTest ChooserActivityTest
Bug: 227486788
Change-Id: If88bf7a5a6394d81c021782d5d9bce7955f1c0e6
Merged-In: If88bf7a5a6394d81c021782d5d9bce7955f1c0e6
(cherry picked from commit 8b5d279d90)
2022-04-22 16:05:39 +00:00
Matt Casey
31cc9ddb59 Merge "DeviceConfig for Chooser update-delay duration." into tm-dev 2022-04-22 16:03:38 +00:00
TreeHugger Robot
a136110aa2 Merge "Fix testGetSurroundingTextFailWithNegative{Before,After}LengthForA11y" into tm-dev 2022-04-22 03:35:35 +00:00
Kohsuke Yatoh
37893c2046 Merge changes from topic "kyatoh-b221483132-tm-dev" into tm-dev
* changes:
  Do not cleanup IME window if show is requested.
  Notify IMMS synchronously on IME insets hidden.
2022-04-22 02:14:55 +00:00
TreeHugger Robot
26fa852fd6 Merge "Block subdirs of Android for SAF and normalize the path" into tm-dev 2022-04-22 02:02:16 +00:00
TreeHugger Robot
692d9be97d Merge "Collect the max number of successive missed frames metric." into tm-dev 2022-04-22 01:10:45 +00:00
Kohsuke Yatoh
4844170377 Notify IMMS synchronously on IME insets hidden.
Currently, IMMS will be notified asynchronously when an IME hide
animation finishes, via message dispatching through IMS
(IMM#notifyImeHidden -> IMS#notifyImeHidden -> IMMS#hideMySoftInput).
This creates a race condition when IMM#showSoftInput or WIC#show is
called around the end of hide animation.

This CL fixes the race condition by synchronously and directly
calling IMMS#hideSoftInput from IMM#notifyImeHidden.

Note that there is still another race condition for IMM#showSoftInput
(not WIC#show) if it's called during an IME hide animation;
IMM#showSoftInput ended up calling WIC#show asynchronously, but at that
time the running IME hide animation may have already been finished
successfully and WIC#show may fail to cancel the hide animation
(then the cleanup IMM#notifyImeHidden hides the IME again disruptively).
I will fix the latter issue in a separate CL.

Bug: 221483132
Bug: 225674038
Test: atest InputMethodStressTest
Test: atest CtsInputMethodTestCases
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
(cherry picked from commit 9065310f81)
Merged-In: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
2022-04-21 21:34:24 +00:00
Yohei Yukawa
445ee3c0f1 Fix testGetSurroundingTextFailWithNegative{Before,After}LengthForA11y
This is a follow up CL to my previous CLs[1][2], which are submitted
almost at the same time but not compatible with each other.

The first CL [1] introduced a new behavior that negative indices
passed to

  AccessibilityInputConnection#getSurroundingText(int, int, int)

result in IllegalArgumentException, which is a different behavior than
what's observed from IMEs.

The second CL [2] assumed that negative indices passed to that API
result in just receiving null result like what's observed from IMEs.

This CL effectively reverts the new behavior introduced in the first
CL [1] to keep two observable behaviors consistent.

Note that negative indices passed to getSurroundingText() are already
handled in

  RemoteInputConnectionImpl#getSurroundingText()

in a graceful manner [3], which guarantees that the IME client process
will not see such an irregular parameter (Bug 169114026) with keeping
the InputConnection commands order (Bug 194110780).

 [1]: I5ff2e804cbcf90828370a0612ff54111130bdff4
      c60176c1f3
 [2]: I62b80916369bdac981dc93c14dcaedc1f2b6e95f
      495ac0f55cbcc976995e8c73fdc89babfbdce902
 [3]: Ie0c18d0c9b8bf8f02f2fcdca5aac7e580c6bf2cd
      8821afef81

Bug: 215633021
Fix: 229981360
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest
Change-Id: I16a0185343c7c7c3e0947aab2c398714a1077b97
2022-04-21 11:38:51 -07:00
Joshua Trask
944c5af2d6 DeviceConfig for Chooser update-delay duration.
For more information, see go/sharesheet-list-view-update-delay.

Bug: 224816815
Test: `atest ChooserActivityTest`. The duration can be manually
configured by `adb shell device_config put systemui
sharesheet_list_view_update_delay n` to set a delay of n milliseconds.
With a timeout of 250 (as it was before this change), all the tests
still pass. With a timeout of 0, all tests pass but one (as described in
the doc linked above) -- a potential fix for that test will follow in a
subsequent CL.

Change-Id: Ia5edfe391b135659d2fd8126069c5cd6ce15653b
Merged-In: Ia5edfe391b135659d2fd8126069c5cd6ce15653b
2022-04-21 14:46:03 +00:00
Jernej Virag
e02f9e390d Merge "Prevent LocalImageResolver from upscaling images" into tm-dev 2022-04-21 14:19:41 +00:00
Tony Huang
64202a268d Merge "Add jank instrument support for split screen enter and exit transition" into tm-dev 2022-04-21 11:31:22 +00:00
TreeHugger Robot
54a8dee16d Merge "Auto finish composing text when A11yIME commits text" into tm-dev 2022-04-21 09:58:58 +00:00