Commit Graph

11402 Commits

Author SHA1 Message Date
Felipe Leme
27e1bf3192 Minor logging improvement.
Bug: 77271640
Test: adb logcat

Change-Id: I66de01ebe3b5c09e7ca0e6f07b962e9beeeae1f5
2018-07-10 16:55:20 -07:00
TreeHugger Robot
d57794b1be Merge "Auto-dark mode prototype" 2018-07-10 00:02:26 +00:00
John Reck
9ce2bf7e0c Auto-dark mode prototype
Experimental force_dark prototype mode. Enabled
by setting debug.hwui.force_dark to true.

Test: verified nothing changes without prop being set

Change-Id: Ib02f3f1a9c591cab1f312b827451f04c782c2f41
2018-07-09 10:16:25 -07:00
Siarhei Vishniakou
91fa08ff1b Move displayId into InputEvent
Now both KeyEvent and MotionEvent will contain displayId. This will help
with dispatching input events to specific displays. There are use cases
where a particular input device is used for a specific display only, and
it sends key events to the system. This will help with those usages.

Test: atest view.MotionEventTest view.KeyEventTest
Bug: 64258305
Change-Id: I75891037617ed60820d60736216a0d615ab5e3b0
2018-07-05 16:29:51 +01:00
Tiger Huang
beac1471aa Merge "Don't flash system bars while showing an immersive app on lockscreen" 2018-07-04 03:06:31 +00:00
Tiger Huang
3404601e07 Don't flash system bars while showing an immersive app on lockscreen
Before applying this patch, when a show-when-locked immersive app is
showing, the system bars would quickly show and hide, which are
redundant to the user.

The root cause is that, for nav bar, we have a policy to show nav bar
if the width and height of status bar are MATCH_PARENT and status bar
has no PRIVATE_FLAG_KEYGUARD. When keyguard is becoming status bar,
its keyguard flag would be removed first, and then the height would
be changed to the bar height. So the nav bar would be shown between
these events. For status bar, we force showing it when it is expanded
by checking its width and height are MATCH_PARENT or not.

To fix the issue, this change introduces a new private flag which
indicates that the status bar window is now in an explicit expanded
state. We check this flag instead of checking the width and height of
status bar.

This change also fix a bug that: when AOD is enabled, if the
foreground app has FLAG_SHOW_WHEN_LOCKED, FLAG_TURN_SCREEN_ON, and
FLAG_FULLSCREEN, clicking on the power key would make it show the app
again instead of AOD. (not 100%, but chances)

Bug: 80147982
Test: 1. go/wm-smoke
      2. Launch a show-when-locked turn-screen-on immersive app on
         AOD, and see if any system bar flashes.
      3. Launch a show-when-locked turn-screen-on immersive app on
         lockscreen, and see if any system bar flashes.
      4. a. Enable AOD in Settings.
         b. Open a show-when-locked turn-screen-on immersive app.
         c. Click on power key, and see if AOD shows.
      5. Launch an immersive app and drag down the status bar, see
         if nav bar keeps there as long as status bar is expanded.

Change-Id: Ie885d504eb73ae8a86736b2c3ed4fb03eb9f739e
2018-07-03 14:41:43 +08:00
Jorim Jaggi
1f079b4f97 Merge "Only use simple rects for cutout region" into pi-dev am: 4764921dcc
am: b7dc212a61

Change-Id: I2af32c72ea859ff908fa30b5de1e722a99b28479
2018-07-02 14:58:32 -07:00
Jorim Jaggi
606405180f Only use simple rects for cutout region
Otherwise there is a big performance hit in all kinds of
situations where we do operations with the region, specifically
when:

- updating input windows
- insetting the cutout during layout
- touch dispatch

Test: DisplayCutoutTest, WmDisplayCutoutTest
Bug: 110464019
Bug: 110452325
Change-Id: I94a25c3794ecd33b8b7204ca308ac91623498f13
2018-07-02 17:58:10 +02:00
TreeHugger Robot
cee49cd54d Merge "Make scroll bars more noticeable on round screens." 2018-06-30 00:26:35 +00:00
shepshapard
5229200dd3 Fix invisible scroll thumb blocks clicks.
The current issue is that Views that have either the horizontal or
vertical scroll bars enabled will intercept mouse interactions that
entire the region where the scrolling thumb would be even if the View
cannot actually scroll because it's content isn't larger than it.

This is fixed by only intercepting mouse interactions in the scroll
thumb region if there is something to scroll.

Bug: 110375792
Test: None yet

Change-Id: Ib638b4ac88375f55bc80ba2a66d945a16ecd6d22
2018-06-29 10:57:18 -07:00
Danny Epstein
b8cbf3aa5b Make scroll bars more noticeable on round screens.
Increase alpha from 15 to 30% for the track and use Google Material
Grey 200 for the thumb. Fix the geometry so that the track and thumb
don't extend off the edge of the screen.

Bug: 80258942
Change-Id: I43e603e5fffb8a05f486af35194c801060dd0b51
(cherry picked from commit 97b00cbc039a090659aed75e47a172a70222b02f)
2018-06-29 16:40:08 +00:00
Riddle Hsu
9a936e9677 Merge "Check for valid surface when starting to drag" 2018-06-29 03:57:40 +00:00
Riddle Hsu
0328b9c025 Check for valid surface when starting to drag
Also protect creating SurfaceSession with root surface.

Change-Id: I3649f160e85367169710b36faf26c96bef0f71fe
Fix: 110922266
Test: atest CtsViewTestCases:android.view.cts.DragDropTest
2018-06-28 20:59:37 +00:00
Riddle Hsu
af2748b28c Get new surface if it was released from setWindowStopped
If there is no visibility change, when the stopped state
changed from true to false, there is no valid surface to use.

Bug: 80170221
Test: Sample app in bug link
Test: atest ViewRootImplTest
Change-Id: I2324ed32980aae5a3ec2efbd612e6c143c9a0022
2018-06-27 02:07:28 +00:00
Yohei Yukawa
99e1f6e04b Notify new IME target before IME starts interacting
Previously, there was a time window between when an IME starts new
input and when the IME issues an IPC IMM#setImeWindowStatus() so that
WindowManagerService (WMS) can be notified about the new IME target
window.

With this CL, it is now guaranteed that WindowManagerService (WMS) is
always notified about the new IME target window before IME starts
interacting with that window.

Note that WMS is not using notified IME target window yet hence there
should be no user-visible behavior change.

Bug: 110531072
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I032b91ce722a16b17518a5d88015c574d7d3e51b
2018-06-22 17:33:19 -07:00
TreeHugger Robot
b8b127406e Merge "Always send WindowToken when starting IME input" 2018-06-22 02:46:22 +00:00
Yohei Yukawa
80498d5576 Always send WindowToken when starting IME input
In InputMethodManagerService, windowGainedFocus() is a superset of
startInput().  If the window specified to windowGainedFocus() is
already seen in IMMS#mCurFocusedWindow, windowGainedFocus() just works
like startInput().  If the window specified to windowGainedFocus()
does not match to IMMS#mCurFocusedWindow, then it takes care of
everything we need to change the IME target window including tasks
that startInput() does.  The reason why we still have startInput() is
just because my previous CL [1], which unified windowGainedFocus() and
startInput() with keeping the existing behavior, did not intend to
change the existing behavior.

Now that we are going to enforce true traceability between input
session and target application window, IMMS#windowGainedFocus() is
what we want to always rely on.

Bug: 110531072
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I24feedf9ef5aca90ef947f4f2aa3e78365fd8c8a
2018-06-21 16:24:36 -07:00
TreeHugger Robot
4c51b7c057 Merge "Tweak some RenderNode API surfaces" 2018-06-21 19:05:27 +00:00
Riddle Hsu
95459d3e6e Ensure consistent attach/detach callback on transient view
- Not allow to add as transient view if it still has a parent.
  (The normal usage of addTransientView should be after removeView)
- If a view container is not attached, its transient view should
  not be attached.
- If a transient view is already detached from parent, no need
  to detach again when removing the transient view.

Bug: 109814657
Test: atest FrameworksCoreTests:ViewGroupTransientViewTest
Change-Id: I243cc292e4aaba987d48eeb202559de866a8c208
2018-06-20 05:09:32 +00:00
TreeHugger Robot
fcfd26b689 Merge "Improved logging on autofill authentication." 2018-06-18 17:41:22 +00:00
TreeHugger Robot
a0d1422d50 Merge "Remove unused parameter from TSMS IPC" 2018-06-18 06:22:15 +00:00
Yohei Yukawa
1235c24a0f Remove unused parameter from TSMS IPC
TextServicesManager always sets null to the "locale" parameter in
ITextServicesManager#getCurrentSpellCheckerSubtype then
TextServicesManagerService always ignores that parameter.  It can be
safely removed.

Bug: 110275412
Test: Manually verified that spell checker still works
Change-Id: I5d85089899b0bd077f69971d77095859086a8d52
2018-06-17 20:52:37 -07:00
Felipe Leme
60b820b5a5 Make oneway calls from AFM to AFMS.
AFM should not block the UI thread when calling AFMS; this CL is a
"low-hanging fruit" change that makes oneway call from the existing functions
that return void.

Test: mmma -j ./frameworks/base/apct-tests/perftests/autofill/ && \
  adb install -r $OUT/data/app/AutofillPerfTests/AutofillPerfTests.apk && \
  adb shell am instrument -w -e class android.view.autofill.LoginTest \
  com.android.perftests.autofill/android.support.test.runner.AndroidJUnitRunner
Test: CtsAutoFillServiceTestCases

Bug: 73536867

Change-Id: I09e84b797153cd02d3c02262994a2be1f38639ea
2018-06-15 14:42:44 -07:00
Felipe Leme
1ad95f06a9 Improved logging on autofill authentication.
These are particular useful when the service created a wrong authentication
result.

Bug: 77641784
Test: manual verification

Change-Id: I420c8ff88137b9e410cbaff56f10a6a70d8311e5
2018-06-15 13:25:13 -07:00
Felipe Leme
f5e26307f6 Minor autofill fixes.
- Removed unused arg from RemoteFillService.FillServiceCallbacks methods.
- Changed a FillUi error to WTF.
- Removed unused imports.
- Removed unused variables.
- Dump afm.mIdShowFillUi.

Bug: none
Test: atest CtsAutoFillServiceTestCases

Change-Id: I12784a1a5ffbe3b2ced5bdb27c5fd3716aa876ee
2018-06-12 10:55:40 -07:00
Felipe Leme
7c8dbf71bb Log when a autofill is disabled in a view because of a parent's importance.
Such log helps diagnosing when app developers explicitly disabled autofill.

Bug: 79607009

Test: manual verification

Change-Id: I551f1cb2bd61068317677ced9bd32a6057f7dc62
2018-06-12 00:40:22 +00:00
TreeHugger Robot
54d918d36a Merge "Fixed: Incorrect logging of new APIs in AccessibilityEvent.toString()" 2018-06-08 21:38:31 +00:00
TreeHugger Robot
e1b7624f7e Merge "Call onInitializeAccessibilityEvent for PANE events" 2018-06-08 21:19:04 +00:00
TreeHugger Robot
304fcaf77a Merge "Removed IAutofillManager.updateOrRestartSession() logic." 2018-06-08 18:10:41 +00:00
Jorim Jaggi
6fece60313 Merge "Move nulling of nextFrameCallback" into pi-dev am: e4e9ee7951
am: 981b2b1311

Change-Id: Ie600840052e1fcaae07b2abfaaa8715ee60ddd13
2018-06-07 18:35:46 -07:00
Qasid Sadiq
0fbd63cc67 Call onInitializeAccessibilityEvent for PANE events
AxEvents should be intialized.

Bug: 80251305
Test: Verified by displaying notifications which generate pane related
events.
Used testback to display all info related to an event.
Before this fix, much of that info was not annotated, now it is.

Change-Id: I832fee743c69dc16a050f35e733f0742771df245
2018-06-07 16:59:24 -07:00
TreeHugger Robot
e4e9ee7951 Merge "Move nulling of nextFrameCallback" into pi-dev 2018-06-07 22:14:51 +00:00
Laura Davis
a3902bd637 Merge "docs: Changed language to be gender-neutral." into pi-dev am: b6e3e61850
am: dd18cae009

Change-Id: I9bd713d310d1d3a13b53f8751028bfb021fe697f
2018-06-07 11:45:01 -07:00
Jorim Jaggi
e6a026bdfe Move nulling of nextFrameCallback
If draw() invokes postDraw that sets the next callback, the
callback will never be invoked.

Test: Long-swipe-up from navigation bar
Change-Id: If2e4dfff8a845b73fa77426305d5ece1921857e5
Fixes: 109701914
2018-06-07 17:49:01 +02:00
Felipe Leme
d62b516520 Removed IAutofillManager.updateOrRestartSession() logic.
On Android O, when an autofill service returned a null FillResponse the
app session would be done, unless a manual autofill request was made (and this
method was used to implement that logic).

But on Android P the workflow was improved so that when the service returns
a null FillResponse, the session remains in a "semi-dead" state where a new
server-side session is created whenever a view that hasn't been "seen" by the server yet is focused, and this new workflow makes the old logic obsolete.

Test: atest CtsAutoFillServiceTestCases

Bug: 73536867
Bug: 70046972

Change-Id: I9c819ba97b2a9a9de70e60fa9ebe433fb3b7fca8
2018-06-06 15:20:03 -07:00
Laura Davis
890662c3c4 docs: Changed language to be gender-neutral.
Test: make ds-docs

Bug: 75324366
Change-Id: Ia2dbcbe4bec303791cbbb004bab6a0b585c5dfb6
2018-06-05 16:02:42 -07:00
Qasid Sadiq
f8f168f93e Fixed: Incorrect logging of new APIs in AccessibilityEvent.toString()
b/77478095
1. AccessibilityEvent.singleContentChangeTypeToString() doesn’t print new change types.
2. AccessibilityEvent.singleWindowChangeTypeToString() doesn’t print WINDOWS_CHANGE_PIP.
Also, updated javadoc and @IntDef for content_change_type.

Test: built it.
Change-Id: I14933d4130eab8449bb1e185c1cafa4b456c01a5
2018-06-05 12:05:37 -07:00
Jorim Jaggi
33ac22827f Merge "Crashing can not override Keyguard transit" into pi-dev am: 44121059dc
am: 6d79f45783

Change-Id: I6d4daa349f03891fee1901fb5f5ff96096665f42
2018-06-05 04:58:49 -07:00
John Reck
568b2a64f0 Tweak some RenderNode API surfaces
* no-arg #start()
* remove no-op #destroy method
* fix a Java-imposed quirk that you can't draw a
  currently invalid RenderNode, forcing bottom-up
  recording for no particular reason

Test: builds
Change-Id: I28b41c83b4f7f9ddced843b0d57e9ac510d40ae5
2018-06-04 17:02:02 -07:00
Felipe Leme
e42868974b Merge "Document AutofillValue.forText() thread safety..." 2018-06-04 20:43:50 +00:00
Aurimas Liutikas
e701dc1799 Fix broken links in @see tags in framework docs.
doclava was accidentally suppressing all these broken links
in @see tags. This CL fixes issues so we can start enfocing
checks for broken @see links.

Test: make docs
Change-Id: If7830ece85f8d1f27c991eae282230814726e115
Exempt-From-Owner-Approval: Fixing @see javadoc link issues that are currently completely broken
2018-06-04 10:15:22 -07:00
Felipe Leme
a11aaddb31 Document AutofillValue.forText() thread safety...
...and logs a warning when it's not called from the UI thread.

Fixes: 79159377

Test: atest CtsAutoFillServiceTestCases

Change-Id: I2976dbe294db695796a2a9db9600a333ffb66f26
2018-06-01 14:09:09 -07:00
Aurimas Liutikas
62786b4431 Merge "Fix broken links in @see tags in framework docs." 2018-06-01 17:16:09 +00:00
Aurimas Liutikas
7f6953369a Fix broken links in @see tags in framework docs.
doclava was accidentally suppressing all these broken links
in @see tags. This CL fixes issues so we can start enfocing
checks for broken @see links.

Test: make docs
Exempt-From-Owner-Approval: Fixing @see javadoc link issues that are currently completely broken
Change-Id: I767e9fb9842494e5eccef2a7bdeee3877c488b5d
2018-06-01 17:15:55 +00:00
Jorim Jaggi
9c52ebbf96 Crashing can not override Keyguard transit
If an app crashes during Keyguard transition, make sure to keep
Keyguard transition

Test: AppTransitionTests
Test: go/wm-smoke
Change-Id: I80b80952f93d2b5611754f05a3dc333905cd1c86
Fixes: 80132133
2018-06-01 16:32:44 +02:00
TreeHugger Robot
427ae7d48e Merge "DisplayCutout: make cutout info available on Display object" 2018-06-01 09:39:35 +00:00
John Reck
5b02c629bd Attempting to fix the black flicker
Bug: 79231206
Test: Repro steps from bug

Merged-In: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
2018-05-31 12:56:28 -07:00
John Reck
cc2eee89c8 Attempting to fix the black flicker
Bug: 79231206
Test: Repro steps from bug

Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
2018-05-31 19:55:54 +00:00
Adrian Roos
a4904791bf DisplayCutout: make cutout info available on Display object
Change-Id: I2e00f6b4966b61a0561ae0adf3a74f8ff3df8028
Fixes: 79205749
Test: m check-api
2018-05-31 19:48:39 +02:00
Evan Rosky
ee4376a290 Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev am: 7ba4c2b254
am: 9bf11ede69

Change-Id: I3e1eb6884cedb86ec144e5ada09b4252ee266c96
2018-05-30 15:10:41 -07:00