Commit Graph

13896 Commits

Author SHA1 Message Date
Greg Kaiser
498fded002 Merge "Revert "Enable insets flag for IME"" 2020-02-08 02:12:56 +00:00
TreeHugger Robot
fef7f67173 Merge "Remove an obsolete comment" 2020-02-08 01:21:25 +00:00
Greg Kaiser
d01913ae83 Revert "Enable insets flag for IME"
This reverts commit 1f0b27532f.

Reason for revert: Crashes android.anim on a wembley
Bug: 149121559
Test: Local build of wembley with this reverted doesn't crash android.anim.

Change-Id: Ie2b9ce95114082d07fa6fddd1ec6d0cb345bd860
2020-02-08 00:24:10 +00:00
Yabin Huang
5b2fe96610 Merge "Fix View backward navigation bug" 2020-02-07 23:08:38 +00:00
Yohei Yukawa
fbb017ac10 Remove an obsolete comment
This is a follow up CL to our previous CL [1], where we forgot to
remove an obsolete comment, which was dded in our previous attempt to
tackle IME focus handling in InputMethodManager [2].  As the line
mentioned in that CL is now gone, there is no reason to keep that
stale comment.

There should be no behavior change in this CL.

 [1]: Ib455704fe1e9d243f93190a84f230210dbceac2a
      970d9d2e0c
 [2]: I219394178e4172bc47864297f1418e677dba25e5
      5f05965f54

Bug: 141738570
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: Iee92a7eb4dfcfb059b0e1fc105f78dd9bdecbbfc
2020-02-07 14:24:09 -08:00
Evan Rosky
a85b3f1828 Merge "Add hierarchy operations to container transaction" 2020-02-07 19:19:12 +00:00
TreeHugger Robot
7f6598257e Merge "Enable insets flag for IME" 2020-02-07 19:10:16 +00:00
TreeHugger Robot
cceb2c2e61 Merge "Send autofill assist structure data to content capture" 2020-02-07 18:41:58 +00:00
Mihir Patel
4770be2d60 Send autofill assist structure data to content capture
Test: manual
Change-Id: I23339a8f90dbb6c31f473e6163ba0866518cb0a4
Bug: 147232107
2020-02-07 10:40:15 -08:00
TreeHugger Robot
aab0c36259 Merge "Providing new accessibilityNode action" 2020-02-07 17:31:57 +00:00
Tarandeep Singh
1f0b27532f Enable insets flag for IME
Test: atest CtsInputMethodTestCases WindowManagerSmokeTest
      CtsWindowManagerDeviceTestCases CtsInputMethodTestCases
      FrameworksCoreTests
Bug: 111084606
Change-Id: I34b17174cc57fdb1427749dc28664f6bb5b3abca
2020-02-07 08:46:06 -08:00
Evan Rosky
a8fde159c7 Add hierarchy operations to container transaction
Also add a way to query for child containers of a container.

Combined, these provide enough flexibility to re-arrange
containers to system-ui. For now, it is locked-down a bit so
it only provides children of TaskTiles and can only reparent
ActivityStacks. Eventually, this can be expanded for nested
tasks or display areas.

Bug: 133381284
Test: Added TaskTileTest#testHierarchyTransaction
Change-Id: Id0e89a4e4b9352d9392349c4e1fe7d69b4f9f212
2020-02-06 20:11:01 -08:00
Joanne Chung
c3348eb824 Merge "Add missing tests for inline input part." 2020-02-07 02:38:41 +00:00
Jacky Kao
a3419bab91 Providing new accessibilityNode action
Removed this constant variable, TextView.ACCESSIBILITY_ACTION_IME_ENTER,
and added more description for new accessibility action,
ACTION_IME_ENTER.

Bug: 139380257
Test: a11y CTS tests & unit tests
Change-Id: I929262aa0046640aafe36a2dc2a8896ee7cab9ff
2020-02-07 07:30:57 +08:00
Yvonne Jiang
43361f713d Merge "Update secondary lock screen implementation to use the newly updated SurfaceControlViewHost API." 2020-02-06 23:02:49 +00:00
TreeHugger Robot
c5bd42701b Merge "Fix an issue that it is impossible to have multiple active sessions" 2020-02-06 21:31:08 +00:00
TreeHugger Robot
799de92e69 Merge "SurfaceView: Show SurfacePackage child when reparenting" 2020-02-06 20:34:09 +00:00
Tony Mak
2cfc5bb18b Fix an issue that it is impossible to have multiple active sessions
Root cause:
TCM caches SystemTC. TCM.createTCSession returns a wrapper of
the same SystemTC and it just updates the sessionID
(and some other session related stuff) of the shared system TC.
That means, if clients call createTCSession multiple times for multiple
active sessions, all of these session TCs have the same session ID
(the latest one) because they all point to the same SystemTC.

It has been an issue since P. But we don't really have code that creates
multiple active sessions before R. In R, we create a session per each
notification, and thus hit the bug.

Solution:
Don't cache SystemTC. SystemTC is just a thin wrapper that forwards calls
to TCMS anyway.

BUG: 149012454
Test: atest CtsTextClassifierService (Added a new test in ag/10260978.)
Test: Sanity tests: smart selection and smart replies are still working.

Change-Id: I71fe558b2f3d2c5d9eb0b6fc7f258fb4d8ad48d6
2020-02-06 17:58:58 +00:00
TreeHugger Robot
a7db3c8e79 Merge "Add a flag to allow system health experiment for the behavior change ... of getDefaultTextClassifierImplementation()" 2020-02-06 11:50:42 +00:00
Joanne Chung
8792ff2e4d Add missing tests for inline input part.
Remove comment due to test is ready.

Bug: 146453105
Test: atest CtsInputMethodTestCases:android.view.inputmethod.cts.InlineSuggestionInfoTest
Test: atest CtsInputMethodTestCases:android.view.inputmethod.cts.InlineSuggestionsRequestTest
Change-Id: I968ab360cae93c895e6cfeae76e15c2205f5a7e6
2020-02-06 18:00:48 +08:00
Adrian Roos
bbf42404b7 IME: Dispatch onProgress directly during app-driven onReady
Fixes and issue where the initial frame of an app-driven transition would flicker
because onProgress would only be called after the first frame had been rendered.

Bug: 111084606
Test: atest WmTests
Change-Id: I312ba27d95aaeb69c94bbdba39ee423ed38ffdac
2020-02-05 17:18:39 -08:00
Robert Carr
20c62d2dba SurfaceView: Show SurfacePackage child when reparenting
Since we aren't exposing the SurfaceControl in the public API
we need to show it for the user.

Bug: 134365580
Bug: 147303389
Test: SurfaceControlViewHostTests
Change-Id: Icec1384aeb50eef0261f3591a250f02f47737f66
2020-02-05 16:38:27 -08:00
Tony Mak
4624cdd12e Merge "Make TCS.getDefaultTextClassifierImplementation returns a ... SystemTextClassifier that is backed by ExtServices" 2020-02-05 14:44:39 +00:00
Tony Mak
df5d4bff7e Add a flag to allow system health experiment for the behavior change ...
of getDefaultTextClassifierImplementation()

Once the system health experiment is done, revert this change and
remove the local TC.

Test: Manual
1. Set use_default_system_text_classifier_as_default_impl to be false
   by using device_config command. Select a phone number.
   Verify the phone action is shown. Verify dumpsys textclassification
   shows that default TC is bound.

2. Set use_default_system_text_classifier_as_default_impl to be true.
   Reboot the device.
   Select a phone number and verify the phone action is shown.
   Verify dumpsys textclassification shows that the default TC
   is not bound.

BUG: 148049185
Change-Id: I602c3cb6d7bef468cba50be6ed8d799d79af8240
2020-02-05 11:43:07 +00:00
Marin Shalamanov
1ee05fd7b9 Merge "Update HDR capabilities and color modes when display changes." 2020-02-05 06:36:05 +00:00
Jacky Kao
dc50df397b Merge "Changing the return type of takeScreenshot() (1/n)" 2020-02-05 05:53:34 +00:00
Svetoslav Ganov
3e2213e035 Merge "Providing new accessibilityNode action" 2020-02-05 03:45:32 +00:00
Marin Shalamanov
677d3a7800 Update HDR capabilities and color modes when display changes.
Pair: blindahl
Test: manual
Test: atest LocalDisplayAdapterTest
Bug: 146824575
Change-Id: I3cd1db3fc3b1df34c2af5e7c3f6905bca9bcbec5
2020-02-05 03:41:45 +01:00
Yvonne Jiang
7f97f732d7 Update secondary lock screen implementation to use the newly updated SurfaceControlViewHost API.
Previously we passed back a SurfaceControl to the keyguard, updated to pass a SurfacePackage instead. The updated SurfaceControlViewHost logic addresses underlying accessibility bugs.

Bug: 136085151
Test: atest AdminSecondaryLockScreenControllerTest
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I4881d5766f118b99f497ee306cd71d3c5a65a2f3
2020-02-04 15:44:13 -08:00
TreeHugger Robot
4a15b70b66 Merge "Fix BLAST Surface release" 2020-02-04 22:41:40 +00:00
Tony Mak
c5a7432ebf Make TCS.getDefaultTextClassifierImplementation returns a ...
SystemTextClassifier that is backed by ExtServices

1. The default textclassifier is always provided by
   config_servicesExtensionPackage (i.e. ExtServices)
2. OEM can specify a system text classifier by specifying
   config_defaultTextClassifierPackage.
3. System text classifiers can get an instance of the default textclassifier
   by calling TCS.getDefaultTextClassifierImplementation(), so that
   they can add their customization on top of the default TCS.
4. If config_systemTextClassifierPackage is set, the specified package
    is used to process requests from apps and the platform. Otherwise,
   the default textclassifier is used.
5. For testing and droidfooding purpose, text classifier service package
   can be overridden. If the overridden package is neither
   the default one nor the system one, the package is considered as a
   untrusted text classifier, which can only see requests from itself.

Test: m mts && mts-tradefed run mts-extservices
Test: Not setting config_defaultTextClassifierPackage. Select some text and
      make sure smart selection works. Run dumpsys textclassification
      to make sure the default TCS is bound.
Test: Setting config_defaultTextClassifierPackage and repeat the above.
      Make sure the specified OEM text classifier is used.
Test: Set the service override config to be ExtServices.
      Run dumpsys textclassification to make sure everything is unbound.
      Select some text and make sure ExtServices is bound.
Test: Set the service override to be AiAi and repeat the above.
Test: Set the service to be something invalid and repeat the above.
      Observe that no TC is bound and fallback to NO_OP.

BUG: 148049185

Change-Id: Ia2fb549fda49363e0d0ebc4b7e0d31cb76e11ee0
Make TCS.getDefaultTextClassifierImplementation returns a ...
SystemTextClassifier that is backed by ExtServices

1. The default textclassifier is always provided by
   config_servicesExtensionPackage (i.e. ExtServices)
2. OEM can specify a system text classifier by specifying
   config_defaultTextClassifierPackage.
3. System text classifiers can get an instance of the default textclassifier
   by calling TCS.getDefaultTextClassifierImplementation(), so that
   they can add their customization on top of the default TCS.
4. If config_systemTextClassifierPackage is set, the specified package
    is used to process requests from apps and the platform. Otherwise,
   the default textclassifier is used.
5. For testing and droidfooding purpose, text classifier service package
   can be overridden. If the overridden package is neither
   the default one nor the system one, the package is considered as a
   untrusted text classifier, which can only see requests from itself.

Test: m mts && mts-tradefed run mts-extservices
Test: Not setting config_defaultTextClassifierPackage. Select some text and
      make sure smart selection works. Run dumpsys textclassification
      to make sure the default TCS is bound.
Test: Setting config_defaultTextClassifierPackage and repeat the above.
      Make sure the specified OEM text classifier is used.
Test: Set the service override config to be ExtServices.
      Run dumpsys textclassification to make sure everything is unbound.
      Select some text and make sure ExtServices is bound.
Test: Set the service override to be AiAi and repeat the above.
Test: Set the service to be something invalid and repeat the above.
      Observe that no TC is bound and fallback to NO_OP.

BUG: 148049185

Change-Id: Ia2fb549fda49363e0d0ebc4b7e0d31cb76e11ee0
2020-02-04 20:36:52 +00:00
Robert Carr
3e5f001d30 Fix BLAST Surface release
The call to relayout may release the SurfaceControl for us by
reading back a null parcel. In this case remove will throw an exception.
We could check is valid, but actually we don't need to call remove
just release, which doesn't throw an exception if already released.

Bug: 146598493
Bug: 148692069
Test: Flip USE_BLAST_ADAPTER device boots.

Change-Id: I38ee8df702dc2645ca5da980bebdc5ac32a7a065
2020-02-04 11:07:18 -08:00
TreeHugger Robot
ae19a2d596 Merge "Fix Keyboard won't show up in some cases" 2020-02-04 08:13:29 +00:00
lumark
233164c924 Fix Keyboard won't show up in some cases
Commit 970d9d2 introduced IME focus controller which
added a new method View#hasImeFocus to restrict IME focus
only when the focused window won't have either FLAG_NOT_FOCUSABLE
or FLAG_ALT_FOCUSABLE_IM flags.

Since NotificationShadeWindowController will unset both flags when
RemoteInput active (or when PasswordEntry focused on lockscreen).

But, in ImeFocusControler#onTraversal won't keep update View#hasImeFocus
state, it will affect IME focus handle correctness.

Hence, it needs to fix View#hasImeFocus state update issue.

Fix: 148489857
Fix: 148788569
Bug: 141738570
Test: manual as following steps:
Case 1:
 0) make EditTextVariations
 1) adb install -r EditTextVariations.apk
 2) adb shell am start -n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
 3) Tap the 3-dot menu on the EditTextVariations
 4) Tap `Direct Reply` on the menu
 5) Open notification drawers
 6) Try to direct-reply on the notification, expect soft-keyboard should come up after step 6)

Case 2:
 1) Device set up with Pwd lockscreen security. Finish setting up the device.
 2) Once the device goes into sleep mode > Wake up the device > Swipe up locksreen.
 3) Observing that the keyboard should come up consistently.

Change-Id: I8d4fff94ba9313b773bc27fcbd019cc88580d3e9
2020-02-04 11:04:52 +08:00
Evan Rosky
ed187ae698 Merge "Pass through some input-related layout flags for windowless surfaces" 2020-02-04 00:23:58 +00:00
TreeHugger Robot
5e135fe823 Merge "Adapt SurfaceControl to libgui API for display info" 2020-02-03 22:29:43 +00:00
TreeHugger Robot
27e12881e4 Merge "Use FrameworkStatsLog instead of StatsLog" 2020-02-03 21:36:22 +00:00
TreeHugger Robot
3d08de1582 Merge "Fix segfault in ViewRootImpl on BLAST" 2020-02-03 19:24:35 +00:00
TreeHugger Robot
d7b27259b3 Merge "Fix no-op traversal requested in traversal before layout" 2020-02-03 18:32:45 +00:00
Evan Rosky
680377e1cb Pass through some input-related layout flags for windowless surfaces
Add a new API to update a previously-granted input channel. This
currently only supports changing layout param flags, and, for
those: only supports NON_TOUCHABLE and SLIPPERY

Bug: 133381284
Test: Added WindowlessWmTests#testDisableTouchInput
Change-Id: I29f70cde0eb646663c0a0ad058979845e732cee7
2020-02-03 10:13:37 -08:00
Valerie Hau
f0a24dd2be Fix segfault in ViewRootImpl on BLAST
Recent deferTransaction change created
bootloop when BLAST is turned on
Bug: 146345307
Test: build, boot, manual

Change-Id: Ib5e484c39d11260026694fc2a32015d8a7f04baf
2020-02-03 10:00:01 -08:00
Muhammad Qureshi
e2b2432bc6 Use FrameworkStatsLog instead of StatsLog
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by
*StatsLog.java
that is autogenerated for each module.
This CL replaces some usages of StatsLog with
FrameworkStatsLog.

Bug: 145952197
Test: m
Change-Id: Iaa2db34a7be4c3215f62cc36661ba8ac81656baa
2020-02-03 09:17:40 -08:00
TreeHugger Robot
afc185e97d Merge "Implement Transient Insets Animation" 2020-02-03 05:44:38 +00:00
Yunfan Chen
b5d2db7738 Implement Transient Insets Animation
This implements the transient insets animation. To have InsetsPolicy run
the animation, this patch:
1. Let InsetsPolicy implements InsetsAnimationControlCallbacks;
2. Make several properties, methods and subclasses in InsetsController
   public, to let InsetsPolicy re-use them when possible.
3. Do everything necessary in InsetsPolicy to let the animation run
   correctly.

Other misc changes in this CL includes:
1. Removed some un-necessary imports;
2. Implemented two toString method, for debug purpose.

Bug: 118118435
Test: Manual test with the new Insets API test app, everything works as
      expected;
Test: go/wm-smoke
Test: atest InsetsPolicyTest

Change-Id: I6c45bd557573fcabb1a3f5aea3dcd58229280613
2020-02-03 12:31:34 +09:00
Jorim Jaggi
0e1ac39a06 Merge "Replace OnContentApplyWindowInsetsListener with simple boolean" 2020-02-01 15:44:51 +00:00
Jorim Jaggi
6e50bae678 Merge "Keep track of requestedVisibility when control unavailable" 2020-02-01 13:47:09 +00:00
Jorim Jaggi
3182ef1488 Keep track of requestedVisibility when control unavailable
When control is unavailable, but the client still wants to hide or
show something, we keep track of it and execute the animation as
soon as we get control.

Also fix an issue with a crash where control was lost before
animation was started.

Test: InsetsControllerTest, InsetsSourceConsumerTest
Change-Id: I31c5177d9281161b8a607b24ddf094dbba640da3
2020-02-01 13:04:59 +01:00
Jorim Jaggi
1f08f649c8 Replace OnContentApplyWindowInsetsListener with simple boolean
The concept will move into the support library (androidx), so in
the framework we only need a simple boolean to toggle the default
behavior.

Also remove redundant methods on WIC to control IME.

Bug: 143556682
Bug: 118118435
Test: WindowTest CTS
Change-Id: I30fbffdfbe79a57b0f4166f0657c78370c7bcf02
2020-02-01 12:51:42 +01:00
Yabin Huang
398cfc71a9 Fix View backward navigation bug
b/147829061 used View id to search for the next backward view. The
problem was that there might be several Views with the same ID in View
hierarchy, so it may return the wrong View with the same ID. To fix
that, ag/10111732 compared the View itself. The idea was right but there
was a bug in that CL. This CL fixed the original bug and the following
bugs.

Fixes: 148545035
Fixes: 148166620
Bug: 147829061
Test: atest TimePickerTest
Test: atest BackwardNavigationTest
Test: atest SpinnerTest
Change-Id: I4ec44f91bbaa86b0f52e10611b91fcceb2588d12
2020-01-31 18:18:27 -08:00
Jorim Jaggi
9964f40cd2 Merge "Add missing visible frame copy" 2020-02-01 00:53:57 +00:00