Commit Graph

13629 Commits

Author SHA1 Message Date
Adrian Roos
cc64caeacf Merge "Revert "Enable IME Insets flag"" 2019-12-18 09:42:08 +00:00
Riddle Hsu
f7146a989d Revert "Enable IME Insets flag"
This reverts commit 86ed94a13b.

Reason for revert: break wm presubmit

Change-Id: Ie9bbfa4e1293560c0605ee68f0e87d00a2b0579d
2019-12-18 09:03:36 +00:00
Taran Singh
cd3e045b2c Merge "Enable IME Insets flag" 2019-12-18 03:19:50 +00:00
Adam He
b50bc1f669 Merge "API for autofill integration with keyboard." 2019-12-18 00:39:13 +00:00
Automerger Merge Worker
e44fee2d3a Merge "docs: Fixed typo" into qt-dev am: 3e4f4f9933 am: 6231cffbb8 am: 18c0fbfacd am: b6349b363d
Change-Id: I8b6bdefb277e58c2342075601e49f62fd1ce66f6
2019-12-18 00:07:53 +00:00
Automerger Merge Worker
b6349b363d Merge "docs: Fixed typo" into qt-dev am: 3e4f4f9933 am: 6231cffbb8 am: 18c0fbfacd
Change-Id: Ic8cde8755fe5fce355931efb735c7d90fb857817
2019-12-17 23:58:44 +00:00
Automerger Merge Worker
18c0fbfacd Merge "docs: Fixed typo" into qt-dev am: 3e4f4f9933 am: 6231cffbb8
Change-Id: I1653273a1d9c0eae7b8a8406bc188e2e909ffaa0
2019-12-17 23:43:26 +00:00
Automerger Merge Worker
6231cffbb8 Merge "docs: Fixed typo" into qt-dev am: 3e4f4f9933
Change-Id: Ic625ffed3ce23a7766a12a153d9794a4abf7a6b5
2019-12-17 23:31:47 +00:00
Andrew Solovay
3e4f4f9933 Merge "docs: Fixed typo" into qt-dev 2019-12-17 23:20:29 +00:00
Tarandeep Singh
699aa679a3 Add alpha support to Insets API
All insets side may want to animate with transparency with or without
insets. This change allows any side to do that.
Also, this CL adds fade to IME when its not controlled by app.
This tries to replicate original IME animation.

Bug: 111084606
Test: Manually using test app.

Change-Id: I1ecd4715336a58cd904b2898bb36462e5ce2b6ab
2019-12-17 11:59:25 -08:00
TreeHugger Robot
af109096eb Merge "Support @left marker" 2019-12-17 18:21:35 +00:00
Taran Singh
43c913bf13 Merge "API update for insets" 2019-12-17 18:04:43 +00:00
Andrew Solovay
b0c09e4ba6 docs: Fixed typo
Fixed a clear copy/paste error, docs had said "call getHeight() to
get the width" when it should have been "...to get the height".

Skipping staging since it's a simple text change.

Change-Id: Ic06557ac38517f409943585054835d774240ccf3
Test: make ds-docs
Exempt-from-owner-approval: Docs-only change
Bug: 144537947
2019-12-16 14:54:09 -08:00
Taran Singh
d1ee549ad9 Merge "Window with FLAG_NOT_FOCUSABLE cant be IME target." 2019-12-16 22:30:27 +00:00
Tarandeep Singh
54554e238a API update for insets
- Rename WindowInsetsAnimationListener to
WindowInsetsAnimationCallback
- Make onAnimation WindowInsetsAnimationCallback.onStarted
hierarchical by giving the client a chance to consume
AnimationBounds, which then will be dispatched to its children.
- Clarify that WindowInsetsAnimationController insets are always
relative to the window.
- Introduce progress variable for inset animations. Since
DecorView will be consuming insets, apps still need a way to
calculate the full progress. Instead of also dispatching the root
insets, we offer a animation progress instead.

Bug: 111084606
Test: CTS will be added in the future
Change-Id: I7df27581d01c1db0118eef469ec089249012ba5f
2019-12-16 22:18:11 +00:00
Adam He
bc67f2e158 API for autofill integration with keyboard.
Bug: 137800469
Test: manual verification
Change-Id: Id222500c373898d576661cacb7a1cb51061041d4
2019-12-16 12:43:01 -08:00
Tiger Huang
4a7835ffb6 Window Manager Flag Migration (7/n)
Introduce new APIs in Window/WindowManager.LayoutParams for developers
to decide which types of insets at which side a window should avoid:

    setFitWindowInsetsTypes(@InsetsType int types)
    setFitWindowInsetsSides(@InsetsSide int sides)
    setFitIgnoreVisibility(boolean ignore)

The existing logic in DisplayPolicy.layoutWindowLw uses combinations of
window types, window flags, and system UI flags to decide what frames a
window should have, which is very complex, difficult to maintain, and
should be replaced with the new APIs.

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest RegisterStatusBarResultTest
            ViewRootImplTest DisplayPolicyLayoutTests
            DisplayPolicyInsetsTests DisplayPolicyTests
            TaskSnapshotSurfaceTest
Change-Id: I06ddc9d0d2887ba4ded7bb8adbf9c9c0da4bf7b4
2019-12-16 17:08:21 +08:00
Robin Lee
75ba497beb Merge "Revert submission" 2019-12-14 03:06:25 +00:00
Tarandeep Singh
bcba88c325 Window with FLAG_NOT_FOCUSABLE cant be IME target.
Any window that sets FLAG_NOT_FOCUSABLE should not be considered IME target.
IME subsystem starts input on a window when it receives focus, if window never
intended to receive focus, it should not considered an IME target either.
Also, fix the broken javadoc for ALT_FOCUSABLE_IM.
Certain apps try to manually synchronize app window to IME insets by
using ADJUST_NOTHING in main window and introducing a transparent window
on top with FLAG_NOT_FOCUSABLE & ALT_FOCUS_IM to listen for IME insets.
We will support this use case until new focus management takes care of
it.

Fix: 143898978
Bug: 140641950
Bug: 145812508
Bug: 141738570
Bug: 144619551
Test: atest WindowStateTests
      atest FocusHandlingTest
      atest WindowManager_LayoutParamsTest
      Also manually using steps:
      1. Launch gmail compose activity
      2. start typing in receipient field
      3. verify that suggestions popup window w/ FLAG_NOT_FOCUSABLE doesn't
         become IME target.

Change-Id: I941571c97145d77b0a59d030cf2a8c8318f3b59f
2019-12-13 23:34:22 +00:00
Hansong Zhang
b62b7b724d Revert submission
Based on Forrest run with earlier base build 6069142, the build with this submission failed apct/bluetooth/instrumentation_test

Reason for revert: Break tests
Bug: 146198238
Change-Id: I65060ca389bf3ae1f107552ca828bfc1e7baa7c1
2019-12-13 22:10:01 +00:00
Tony Mak
dbdf483f31 Merge "Put userId at the end of parcel" into qt-dev am: 899f8301e0 am: 056b56c6b7
am: aea739b3f4

Change-Id: Ib5dfc58a7d53e0732959083fa2e6fcfd6e66f29d
2019-12-13 11:36:08 -08:00
Automerger Merge Worker
aea739b3f4 Merge "Put userId at the end of parcel" into qt-dev am: 899f8301e0 am: 056b56c6b7
Change-Id: Id17055f72243306cac9e46abff2cf313492f5e7c
2019-12-13 19:31:04 +00:00
Automerger Merge Worker
056b56c6b7 Merge "Put userId at the end of parcel" into qt-dev am: 899f8301e0
Change-Id: If6ce5c989102c8fb6cdc1fa82cde79817f6c3423
2019-12-13 19:11:21 +00:00
Galia Peycheva
a4aff1e1df Merge "Add minimal post processing API to framework" 2019-12-13 10:09:00 +00:00
Evan Rosky
c3527d7edd Merge "Add support for SystemUI Window Management" 2019-12-13 05:02:20 +00:00
Tony Mak
642c22b223 Put userId at the end of parcel
userId is a new field added in ag/8350816, and it is written in between
some old fields when we parcelize it.

That breaks AiAi because some of its code rely on the implementation
details of SelectionEvent.writeToParcel.

In the long run, we may want to update AiAi such that it works
without this assumption, but before that, let's fix that in platform
for now.

Bug: 145962464
Bug: 123232892

Test: atest FrameworksCoreTests:android.view.textclassifier.SelectionEventTest

Merged-In: I98137a095cddf0fb4c600e1e09eef507bb750528
Change-Id: I66f65ac4c81ca964f710404fd081496355276435
2019-12-13 02:47:21 +00:00
Evan Rosky
22b6bbd8c5 Add support for SystemUI Window Management
Enables SystemUI to create/position its own ui elements.

First of all, this adds, to WM, the concept of a ShellRoot
which represents a piece of the hierarchy that a client shell can
do whatever it needs with. For now, multiple of these roots can
be registered at various "levels" (which correspond to window
types for now). This is needed because not everything will live
in this piece of the hierarchy, so handling z-order will still
be a shared effort between the Shell and WM for a while.

On the SystemUI side, a new Dependency called SystemWindows
provides simplistic window management for these system-ui
windows via WindowlessWindowManagers per-display-per-layer.
The benefit of this is that manipulation of these windows lives
entirely in SystemUI making synchronization easier and making
it possible to move a lot of the special handling code out
of wm (eg. DOCK_DIVIDER). As a result, SystemUI becomes
more customizable and WM becomes simpler.

Early clients of this are going to be display-level IME
handling and Split-screen.

Bug: 133381284
Test: manual test after later CLs
Change-Id: I1602d9b9b69d38b9ff15806e509cc8128c837748
2019-12-12 17:34:05 -08:00
Jackal Guo
24ca88cf30 Merge "Don't clear cache when changing accessibility focus" 2019-12-13 01:27:08 +00:00
Automerger Merge Worker
e06f253e8c Merge "Fix nav bar leak in SystemUI" into qt-qpr1-dev am: d6e73ec8f1
Change-Id: I39643a2f6e7edc9af7221a295eb201cda3244534
2019-12-12 21:47:54 +00:00
Winson Chung
d6e73ec8f1 Merge "Fix nav bar leak in SystemUI" into qt-qpr1-dev 2019-12-12 21:27:08 +00:00
TreeHugger Robot
b43fe24ad6 Merge "Removing remnants of menu key" 2019-12-12 05:50:46 +00:00
Jackal Guo
24a1ac51bf Don't clear cache when changing accessibility focus
Instead of clearing all cache, refreshing the accessibility windows
and the nodes.

Bug: 145562808
Test: a11y CTS & unit tests
Change-Id: I3048bffeb970712e43b82843acd452c147ca5054
2019-12-12 11:42:28 +08:00
Joanne Chung
6efdab9f88 Merge "Remove ConfigParser from TextClassificationConstants." 2019-12-12 03:33:05 +00:00
Automerger Merge Worker
6afb28c9c8 Merge "RESTRICT AUTOMERGE TextClassifier cross-user vulnerability in direct-reply" into qt-dev am: aced288d66 am: 62a0566244 am: be2826e8dc
Change-Id: I18e07c3ae09432469b8a3a8804b40c76676b64c0
2019-12-11 22:34:14 +00:00
Chavi Weingarten
b61168bcfe Merge "Allow Windows in Display Overlays" 2019-12-11 22:15:37 +00:00
Automerger Merge Worker
bae05149de RESTRICT AUTOMERGE TextClassifier cross-user vulnerability in direct-reply am: 34e380cdd6 am: bccb8bec0a
Change-Id: Id6995c02dc69230eab7cd1d312c4c4d569e44a25
2019-12-11 21:45:33 +00:00
Automerger Merge Worker
bccb8bec0a RESTRICT AUTOMERGE TextClassifier cross-user vulnerability in direct-reply am: 34e380cdd6
Change-Id: I43130453f6b576679c52be643344589ac624dadd
2019-12-11 21:14:16 +00:00
TreeHugger Robot
aced288d66 Merge "RESTRICT AUTOMERGE TextClassifier cross-user vulnerability in direct-reply" into qt-dev 2019-12-11 20:55:34 +00:00
TreeHugger Robot
fc9c8684b6 Merge "Put userId at the end of parcel" 2019-12-11 17:47:39 +00:00
chaviw
8065f44020 Allow Windows in Display Overlays
Instead of display overlays being a SurfaceControl that can only have
child surfaces, it now is a WindowContainer that can have windows.
Specifically, windows with the type TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY
will be placed in the display overlays layer

This is the first step to allow window magnification to use real windows
on the display.

Test: go/wm-smoke
Bug: 136250281

Change-Id: Idad98db7a85f68ba49557c0efb83b9a1be089609
2019-12-11 08:37:46 -08:00
Rhed Jao
d85e2b467c Merge "Accessibility shortcut improvement (5/n)" 2019-12-11 02:17:29 +00:00
TreeHugger Robot
323de93f9d Merge "Add toString() to Display.HDRCapabilities" 2019-12-10 16:34:15 +00:00
Marin Shalamanov
04c6a4696b Add toString() to Display.HDRCapabilities
HdrCapablities in adb shell dumpsys display and in log messages appear
as android.view.Display$HdrCapabilities@49f9cd26. This change adds a
toString() method so HDR Capabilities are visualized in a nice way.

Test: adb shell dumpsys display
Change-Id: I0800ac4f615ca733d0901654184d884dd2b81752
2019-12-10 15:55:34 +01:00
Tony Mak
709c0a1cc8 Put userId at the end of parcel
userId is a new field added in ag/8350816, and it is written in between
some old fields when we parcelize it.

That breaks AiAi because some of its code rely on the implementation
details of SelectionEvent.writeToParcel.

In the long run, we may want to update AiAi such that it works
without this assumption, but before that, let's fix that in platform
for now.

Bug: 145962464
Bug: 123232892

Test: atest FrameworksCoreTests:android.view.textclassifier.SelectionEventTest

hange-Id: I98137a095cddf0fb4c600e1e09eef507bb750528
2019-12-10 08:10:22 +00:00
Valerie Hau
28ed8110f7 Merge "Update to Blast surface control" 2019-12-09 15:54:11 +00:00
Joanne Chung
c44f529a92 Remove ConfigParser from TextClassificationConstants.
ConfigParser was introduced mostly for reading both legacy Settings and
DeviceConfig lazily. We are ready to migrate to DeviceConfig and no
longer read legacy Settings, and thus we don't need this class.
DeviceConfig invalidates cache whenenver any config in the same namespace
is changed, and thus we don't need a listener.

No performance issue observed after testing TextClassificationManagerPerfTest.

Bug: 143585708
Test: atest FrameworksCoreTests:android.view.textclassifier
Test: atest android.view.textclassifier.cts.TextClassifierServiceSwapTest
Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh
Test: adb shell cmd device_config put textclassifier <key> <value> and
adb shell dumpsys textclassification monitor the value change.
Test: Dynamic switch TCS and make sure the service status is expected.

Change-Id: I3c07ef4b16cd1f81c6aa60a0b9b26cac1a3bb5c0
2019-12-09 19:35:32 +08:00
Rhed Jao
6dad25dee6 Accessibility shortcut improvement (5/n)
- Adds support for magnification and multiple shortcut targets assigned
  to accessibility shortcut key in AccessibilityManagerService.
- New extra field in ACTION_CHOOSE_ACCESSIBILITY_BUTTON intent to
  support accessibility shortcut key.

Bug: 136293963
Test: atest AccessibilityShortcutControllerTest
Test: atest AccessibilityUserStateTest
Test: atest AccessibilityShortcutTest
Change-Id: If0a446dfd269e82ec0d09db92e86f859cdae50d8
2019-12-09 15:20:45 +08:00
Valerie Hau
d6c6146674 Update to Blast surface control
Bug: N/A
Test: build, boot, surfaces fling
Change-Id: I4096790ee12d0f3e86c24e40a8ff9c654ef10a52
2019-12-06 14:20:55 -08:00
TreeHugger Robot
bd52bdf8b7 Merge "Fix signedness of DisplayAddress.Physical ports" 2019-12-06 21:51:21 +00:00
Jeffrey Huang
77db950964 Merge "Rename writeToProto to be dumpDebug" 2019-12-06 18:53:15 +00:00