Commit Graph

13884 Commits

Author SHA1 Message Date
TreeHugger Robot
aab0c36259 Merge "Providing new accessibilityNode action" 2020-02-07 17:31:57 +00: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
Jorim Jaggi
9964f40cd2 Merge "Add missing visible frame copy" 2020-02-01 00:53:57 +00:00
Evan Rosky
0037e5f901 Add TaskTile concept to Window Manager
This adds the concept of a TaskTile to the WM. Due to
complexities in the current Stack/Task relationship, tiles
can't actually be part of the hierarchy, so the Stack
level has to internally resolve configurations as if they
were.

The TaskTiles themselves *are* ActivityStacks though from
the client/sysui perspective, though.

Bug: 133381284
Test: Added TaskTileTests
Change-Id: I9baad5ec899b4fab323a36c1533a40081727a2f7
2020-01-31 10:26:45 -08:00
Jorim Jaggi
4d4fae4ab8 Add missing visible frame copy
Test: Inspect systrace, ensure not a constant ping-pong between
apps and server
Test: InsetsStateTest
Bug: 118118435

Change-Id: I35937971897cf76ad9187c7c23a7abf394d59e46
2020-01-31 17:30:01 +01:00
Jacky Kao
3e33bedee0 Changing the return type of takeScreenshot() (1/n)
Roll back the method, takeScreenshot(), of the UiAutomationConnection
class using by the UiAutomation class due to the return type of the
method, takeScreenshot(), of the AccessibilityService class, isn't
the Bitmap. Besides they also used the different methods of the
SurfaceControl class now.

Bug: 10931661
Test: a11y CTS tests
Change-Id: I7459ebfe77162e51ed3a50c8663e13579a8a67a3
2020-01-31 10:31:11 +08:00
Andrii Kulian
e11e951f66 Merge changes from topic "add_bundle_to_window_context"
* changes:
  Exempt-From-Owner-Approval: Fix usages of WindowManager.getDefaultDisplay() in f/b
  Add bundle options to Context#createWindowContext API
2020-01-31 01:16:34 +00:00
Andrii Kulian
e57f2dc246 Exempt-From-Owner-Approval: Fix usages of WindowManager.getDefaultDisplay() in f/b
Replace the existing usages of now-deprecated API
WindowManager.getDefaultDisplay() with WindowMetrics or
Context.getDisplay() in frameworks/base.

Bug: 128338354
Test: Build, auto test
Change-Id: I02d38a022c5e0e6e9d699f03d35b65d6c8126da9
2020-01-31 01:15:21 +00:00
Taran Singh
397101302b Merge "Change insets property from wm to debug." 2020-01-30 22:26:07 +00:00
Jorim Jaggi
1edbc80971 Merge "Adjust SysUI for new insets" 2020-01-30 21:09:23 +00:00
Andrii Kulian
ad820a0ebd Merge "Deprecate Display#getSize/RectSize/Metrics" 2020-01-30 20:47:02 +00:00
Jorim Jaggi
026ed75dbd Adjust SysUI for new insets
- Layout of notif shade is no longer custom, so need to handle
insetsIgnoringVisibility on client.
- Do not special case Keyguard anymore. Just treat it as regular
control target.
- No more special sauce to hide navigation bar on Keyguard.
- Treat it as BEHAVIOR_SHOW_TRANSIENT_BARS_ON_SWIPE but don't
actually do that in DisplayPolicy

Test: InsetsPolicyTest
Test: Lockscreen with PIN
Bug: 118118435
Change-Id: I1edce4fdb792fd97a181165a03957ba5d6d3e551
2020-01-30 18:23:25 +01:00
Tarandeep Singh
f2316be9c8 Change insets property from wm to debug.
persist.wm is not editable on user builds, changing it to debug so it is
editable. Making the change so its flippable on dp1.

Bug: 111084606
Test: atest CtsInputMethodTestCases
      Manually verified adb shell setprop persist.debug.* is editable on
      user build.
Change-Id: I693abad22d2b087f0df6ac5c138ba942252cc620
2020-01-29 17:51:36 -08:00
Dominik Laskowski
69b281d5f3 Adapt SurfaceControl to libgui API for display info
Bug: 144601064
Test: dumpsys display
Change-Id: I477e0e3126cc15eb5f120610b4e6b6b1568df389
2020-01-29 14:32:45 -08:00
Jorim Jaggi
23a02a9f67 IME always provides bottom insets, if any
This fixes an issue where IME wasn't visible in landscape with a
cutout, because IME window didn't cover full edge.

Also fix an issue where floating IME didn't work because alpha
was calculated the wrong way.

Test: InsetsSourceTest
Bug: 111084606
Change-Id: I29b7a45cd590a52ecb03f2e539edde57aef4dba3
2020-01-29 21:42:27 +00:00