ActionBarOverlayLayout used to drop WindowInsets, extract the content insets
as a rect, and then dispatch a modified rect to the content view; this because
there was no way to retarget the WindowInsets to the content view, and the
WindowInsets were not truly immutable. That means however, that other kinds of
insets than the content insets do not get dispatched, such as the display cutout.
To fix this, we add APIs to inset WindowInsets, make them immutable. Note that
a similar change is needed for the support lib.
Bug: 79733300
Test: atest ActionBarOverlayLayoutTest
Change-Id: I6a69d8462163ca5e66fdb53f83def6bc4063f8aa
Fixes jank issues where trimMemory gets scheduled during an
animation. trimMemory likely hits code that is not in the
page cache anymore, leading to high execution time because of page
misses. Scheduling it after the next frame has been drawn
minimizes the risk that this page miss actually causes jank.
Test: Boot, switch between a couple of apps.
Bug: 78611607
Change-Id: Ia1fc411fbe6ca07861183ae484124406681118e5
Approach here is to register a content observer that invalidates the
TC settings whenever updates to the settings happen.
This CL also ensures that the TC is invalidated when a settings
update happens. This is because the settings may change what
TC the system returns.
TextView's SelectionActionModeHelper has been updated to not cache
the settings and get them directly from TCM (which caches the settings).
NOTE that we expect TC settings to rarely change.
Bug: 77539576
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: manual - Made changes to TC settings and observed logs / app behaviour
Change-Id: I88bbb6f951708b17323fac1a72385fe808d270a5
Otherwise it could lead to parameters applied in the wrong frame,
leading to jank.
Test: Open notification
Bug: 78611607
Change-Id: Ia7900e753b29187a7a7b81f393666687e8b8e04b
Merged-In: Ia7900e753b29187a7a7b81f393666687e8b8e04b
Otherwise it could lead to parameters applied in the wrong frame,
leading to jank.
Test: Open notification
Bug: 78611607
Change-Id: Ia7900e753b29187a7a7b81f393666687e8b8e04b
This way the newest PendingIntent will override any matching ones.
Bug: 78286917
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Change-Id: Ib130fa5979c3dab628e7be668331cb94d23e0829
We use ids to break ties when sorting views just to
guarantee that we won't break sorting. But we don't
want to have our swipe order determined by arbitrary
ids.
Before resorting to such a crude tie-breaker, look at
a view's children to try to break a tie using their
bounds. That sort is more based on what's on the
screen, and will also produce the same result from
the same ui.
Bug: 78348191
Test: Switch access order is much more sensible on
Recents. Also ran a11y cts.
Change-Id: I918eae3b0d27e889a53d05a6ebe925e38ce5d7b4
IME used to allow startInput() *only* when window has focus.
This is no longer the case after we made changes to allow autofill
window to get window focus to receive physical keyevents.
The fix changed precondition of when InputMethodManager can startInput:
(hasWindowFocus() || isAutofillUIShowing()).
Test: manual test:
- install two IMEs
- install autofill sample service and autofill sample service
- launch the Autofill sample app, click on edittext, both
IME and autofill window are showing.
- type "username", autofill datasets are being filtered.
- click "globe" button in IME window to switch IME.
- continue typing "username2" using new IME and autofill window
continues to filtering.
- also try the "IME switch" button in bottom bar to switch IME.
Bug: 79494235
Change-Id: I0d222b5fc13ad46834aa861647d8f2e1649093ec
If we depend on legacyIntent, then TextClassifierService implementations
will have to always popuplate a deprecated field.
To avoid breaking legacy clients, the returned legacyOnClickListener should
represent the first pendingIntent (i.e. primary action) that was parcelled.
Bug: 78340399
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: manual check with a TCS that only sets non-deprecated fields vs a
legacy TC client
Change-Id: I41d27a65f1ede6369dd2a66d92b2210edb0d11e2
We were only updating accessibility in View#setAlpha,
but View#setAlphaNoInvalidation would also change alpha,
and accessibility would never find out.
Bug: 78101543
Test: TalkBack now works on nightlight conditional and
battery saver slider.
Change-Id: I1ebb62aa7f4de700b2d7fbaae8dbbd1c84fc4ece
No logs were being sent via the TextClassificationManagerService to
the TextClassifierService.
Also, SelectionEvent.getSessionId() is nullable. Handle appropriately.
Bug: 79418429
Test: manual - manually tested via a debugger. Auto tests coming soon.
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Change-Id: I196885d9b03c0c11cae7686a5835d14791065e78
This field is used on pretty much all Autofill metrics, except
AUTOFILL_USERDATA_UPDATED, AUTOFILL_SERVICE_DISABLED_SELF, and
AUTOFILL_INVALID_PERMISSION.
Test: atest CtsAutoFillServiceTestCases
Test: adb shell logcat -b events | grep sysui
Bug: 79351659
Change-Id: I2e2f3dcc780a3896162b158926f5ee89c7cb342d
* changes:
Revert "Rotate IMEs (subtypes) by Meta+Space."
Revert "Show toast when subtype is rotated by Meta-Space."
Revert "Shift+Meta+Space should reverse-rotate subtypes."
Revert "Shift+Meta+Space should reverse-rotate subtypes part 2."
Revert "Make sure that Toast is always shown by Meta-Space."
This reverts commit ae61f7118a [1].
Reason for revert: to deprecate Meta-Space short cut.
[1]: I4005692215edfcf8bed3e86b1e07000148f986f5
Bug: 79150878
Test: Manually tested as follows.
1. make -j SoftKeyboard
2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
3. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
4. Connect a hardware keyboard
5. adb shell settings get secure default_input_method
6. Hit Meta+Space on the hardware keyboard.
7. adb shell settings get secure default_input_method
8. Make sure that the results of step 5 and step 7 are the same.
Change-Id: I5ed0feb5a6d7171564d358644b04ee2a43e4d6b3