Commit Graph

9797 Commits

Author SHA1 Message Date
Abodunrinwa Toki
d80e82f917 Merge "Make TextClassifier.getLinks(...) a default method." into oc-dev 2017-05-24 01:57:50 +00:00
TreeHugger Robot
eee1dd26fa Merge "Hide Autofill UI when non-savable id is gone." into oc-dev 2017-05-23 23:28:38 +00:00
Abodunrinwa Toki
9115eeb483 Make TextClassifier.getLinks(...) a default method.
Fixes: 37907518
Test: cts-tradefed run cts-dev -o -m CtsSignatureTestCases -t
android.signature.cts.SignatureTest

Change-Id: I876781eccb2574ea01b6b460e14afd4e970a01b4
2017-05-23 21:29:39 +01:00
Felipe Leme
27e202208b Hide Autofill UI when non-savable id is gone.
AutofillManager keeps track of which views the AutofillServiec is interested to
save, so when these views are gone, the session is finished.

But when the AutofillService returns a dataset whose views it can not save,
the FillUi for these views are not hiding when the views are gone. This CL
fixes this issue by:

- Keeping track which non-savable views should be tracked.
- Pass the view (instead of it's id) when the UI on such views should be hid.

This CL also optimized some AIDL and internal calls by avoiding the creating of
unnecessary Lists.

Test: manual verification with Snapchat
Test: existing CtsAutoFillServiceTestCases pass
Test: new tests on MultipleFragmentLoginTest pass

Fixes: 38199452
Change-Id: I78fa357962dbc6667146d8e08cd6bacb63e0f337
2017-05-23 10:46:24 -07:00
TreeHugger Robot
6cfc8afa7a Merge "Fix window affecting SysUi visibility for once and all" into oc-dev 2017-05-23 16:58:42 +00:00
Rob Carr
d9bf5ecf51 Merge "SurfaceView: Wait to gather transparent region." into oc-dev 2017-05-23 16:31:02 +00:00
Jorim Jaggi
23cc9aa50a Fix window affecting SysUi visibility for once and all
This unforunately introduces another quasi-visibiltiy method but
I think this is the best solution, as the code is pretty clean.

Test: Navigate through, settings, make sure no flickering
Test: Launch music from notification
Test: Launch United app
Test: Go settings -> app -> settings repeadetly 100 times, make
sure light bar transition is always clean
Fixes: 38216281

Change-Id: I0b97334dea3bfef2966ad0c7dd8bbd9907f2574c
2017-05-23 16:59:58 +02:00
Robert Carr
3ca12be796 SurfaceView: Wait to gather transparent region.
With the introduction of surfaceRedrawNeededAsync we may
be asked to gather the transparent region ahead of the SurfaceView
having been drawn.

Bug: 38324871
Test: Launch Chrome Canary a lot! No Flickers.
Change-Id: I35f09a1bb8316895fa704b10c912e64a8920bd90
2017-05-23 02:53:11 +00:00
TreeHugger Robot
42c6529c1d Merge "SurfaceView: Don't destroy Surface while Stopped." into oc-dev 2017-05-23 02:32:17 +00:00
Jiaquan He
652e940ebd Do not relayout on default focus highlight.
Test: AdjacentListsWithAdjacentISVsInsideTest.testFocusedRectAndFocusHintWorkWithinListItemHorizontal
Bug: 38195445

Change-Id: I4ba61d1dd6b806bff5305986a086c436c3b05b12
2017-05-22 20:12:46 +00:00
Phil Weaver
ed83139842 Merge "Revert "NumberPicker a11y (and a11y-inspired) fixes"" into oc-dev 2017-05-22 13:03:45 +00:00
Robert Carr
73678099f8 SurfaceView: Don't destroy Surface while Stopped.
We instead just want to leave it floating, and let
it's lifetime be controlled by the parent surface. This way it can
take part in animations. Normally the WindowManager handles this by
calling detachChildren but it seems sometimes stop arrives before
the window manager is even clued in. Rather than bringing ActivityManager
in to the detach children dance...this seemed more appropriate and very similar
to the behavior before SV->SurfaceControl port.

Bug: 37922210
Test: Manual from bug + Launch chrome a bunch
Change-Id: Iee4fb0078a6e8dfd4c7acdb0107f8edd3a995634
2017-05-19 15:21:58 -07:00
Keun-young Park
ff4cc4ebb5 Merge "Wait for keyguard draw before stopping boot animation" into oc-dev 2017-05-19 20:07:14 +00:00
Keun-young Park
4136d2d54b Wait for keyguard draw before stopping boot animation
- Add check for keyguard drawn before stopping boot animation.
  Otherwise blank screen can happen.
- Bind to keyguard service when sysui is launched to reduce waiting
  time later.
- Increase keyguard timeout to 5 secs if it is not boot completed.
  Otherwise (= normal screen on), keep the current 1 sec.
  This timeout can still lead into blank screen so use bigger timeout
  during boot-up to prevent such case.

bug: 37867510
Test: many reboots

Change-Id: Ibfdc42d295bb1d3f5b4ea316fe5aca9ab875e4be
2017-05-19 09:20:28 -07:00
Jorim Jaggi
64900ad13c Merge "Take snapshot when screen is turning off" into oc-dev 2017-05-19 12:29:54 +00:00
Jorim Jaggi
51304d7380 Take snapshot when screen is turning off
Since we can't take a snapshot when screen is turned off, we need
to snapshot before we are turning the screen off. For this, we
- Add a callback from DisplayPowerController to give policy a
chance to do something before display will be turned off.
- Implement this callback by taking snapshots of all visible
tasks.

Test: Inspect logs/traces about screen off blocking to make sure
callback is working correctly.
Test: Insert artificial 500ms delay in onScreenTurningOff and make
sure we are unblocking screen off when turning on screen in the
meantime.
Test: Open Maps, go to recents, open maps again, scroll to another
location, toggle power button, make sure the old location isn't
shown during unlock.

Change-Id: I489f31358f838d418f894f996495946084f136a4
Fixes: 37107783
2017-05-19 00:55:31 +02:00
Phil Weaver
a998b5f869 Revert "NumberPicker a11y (and a11y-inspired) fixes"
This reverts commit 1d359a6d31.

Bug: 38301562
Change-Id: I7a04f3068a8ecb0de63efcb82205b41916138a89
2017-05-18 16:19:23 +00:00
Jeff Sharkey
f383c24749 Unbreak even more APK 26 apps running on "O" preview/beta builds.
Bug: 38391358
Test: builds
Change-Id: Ic48f9cb53da3ed8241e5d40d3096304ee4dfebd2
2017-05-17 17:53:38 -06:00
TreeHugger Robot
4bc839e267 Merge "ViewRootImpl: Guard against null in performMeasure" into oc-dev 2017-05-16 22:25:09 +00:00
TreeHugger Robot
97bcf59fce Merge "SurfaceView: Reset window stopped state when attaching to window." into oc-dev 2017-05-16 21:51:28 +00:00
TreeHugger Robot
83478acb87 Merge "Check for mAttachInfo nullness when getting the autofillable drawable." into oc-dev 2017-05-16 19:38:36 +00:00
Felipe Leme
354587a972 Check for mAttachInfo nullness when getting the autofillable drawable.
Test: manual verification on Caviar (automated test will be added later)
Test: CtsAutoFillServiceTestCases pass

Bug: 38341498
Fixes:  38323841

Change-Id: I15cc792de87987cc19a229c2ab2dfc317877f7ec
2017-05-16 10:38:41 -07:00
Robert Carr
001e55a17a ViewRootImpl: Guard against null in performMeasure
In particular we are seeing this in the call sites from performTraversals
in monkey crashes. I don't have exact repro but it seems like a feasible
state to get in to...for example...WindowManagerGlobal#addView can trigger
removal of a dying view immediately without respect for the mIsInTraversal
flag when it calls doDie(). This means we can dispatch detached from window
setting mView == null while performing a traversal. There's some question
about why this doDie is even required but...seems a little nerve wrecking
to change at the moment and it seems best to just guard against null for now.

Test: Monkeys will test.
Bug: 37343098
Change-Id: I94f2569c1ef70819c083f2b2b34b59622e6c6260
2017-05-15 17:29:20 -07:00
Rob Carr
f5b6818009 Merge "Preserve non-floating state when entering pinned stack." into oc-dev 2017-05-15 23:17:33 +00:00
Robert Carr
00177cc447 SurfaceView: Reset window stopped state when attaching to window.
We may be stopped, removed from the view hierarchy, and then only
attached again after the activity has been restarted, missing
our WindowStopped callback to set mWindowStopped=false. At this point
we are being added to a visible view, or in ViewRoot#performTraversals
so we can assume we are not stopped.

Test: Manual from bug.
Bug: 37682805
Change-Id: Idf8e061fb7f83b00992a274c7dd704f9e0fcff5f
2017-05-15 15:49:17 -07:00
Phil Weaver
9289faa163 Merge "Add null check to a11y call." into oc-dev 2017-05-15 16:56:29 +00:00
Felipe Leme
7f33cd350b Start a new session on manual request after session is "gone".
When the autofill service returns a null FillResponse, the session is marked
"gone" because the service cannot autofill it. But there might be cases where
the view structure change and it's now autofillable, so need to allow users
to manually request autofill again in such cases.

Fixes: 38205945
Test: CtsAutoFillServiceTestCases pass
Test: LoginActivityTest.testAutofillManuallyAfterServiceReturnedNoDatasets()
Test: LoginActivityTest.testAutofillManuallyAndSaveAfterServiceReturnedNoDatasets()

Change-Id: I9b23c255e563dd0646bf266d31ddb10dcc4f7f6d
2017-05-14 00:31:45 -07:00
Jason Monk
d472349229 Merge "Fix the status icon colors in QS" into oc-dev 2017-05-13 13:10:58 +00:00
TreeHugger Robot
5fd8672d71 Merge "Couple autofill fixes." into oc-dev 2017-05-13 03:54:23 +00:00
Abodunrinwa Toki
ebd6bb561d Merge "TextClassifier: Ensure url scheme is in lowercase" into oc-dev 2017-05-12 22:50:54 +00:00
Felipe Leme
7a1deb7c5f Couple autofill fixes.
- Fixed PFLAG3_NOTIFY_AUTOFILL_ENTER_ON_LAYOUT value - it was overlapping with
PFLAG3_ASSIST_BLOCKED.
- Added missing permission on methods called by Shell command.
- Improved debugging.

Bug: 38173625

Test: android.autofillservice.cts.MultipleFragmentLoginTest#loginOnTwoFragments

Change-Id: Ie7880c97d38298e06134709c5c2e9e38fa1bacbb
2017-05-12 15:34:48 -07:00
Jason Monk
9a376bcd45 Fix the status icon colors in QS
Requires lots of theming magic

Test: visual
Change-Id: I1cd28b570f30989b496065c0e06a5aca461deb41
Fixes: 37619734
2017-05-12 16:16:39 -04:00
TreeHugger Robot
4b91fe8699 Merge "Removed deprecated APIs." into oc-dev 2017-05-12 20:13:15 +00:00
TreeHugger Robot
1454afce82 Merge "Not specify return val of View#onSaveInstanceState" into oc-dev 2017-05-12 19:14:53 +00:00
Phil Weaver
63e4503991 Add null check to a11y call.
No good will come from posting that a null View has
changed. Adding a null check so the failure will happen
when the bad call is made, rather than later when we
try to act on it in a handler.

Bug: 38122973
Test: Ran accessibility unit and cts tests.
Change-Id: I1e9aaf2a18180fcdfd0fbc0e5b716eb96446af33
2017-05-12 10:40:53 -07:00
Felipe Leme
73fedacfeb Removed deprecated APIs.
Test: CtsAutoFillServiceTestCases pass
Test: manual verification with existing service

Bug: 37563972

Change-Id: Ibea2810f9230f06e59d2d81e4ba853de54987956
2017-05-12 10:32:45 -07:00
Abodunrinwa Toki
86ef9827da TextClassifier: Ensure url scheme is in lowercase
packageManager.resolveActivity(intentWithUppercaseScheme, 0) returns null.
 This means we don't find an activity to handle the browser intent.
 Create a browser intent with url's scheme in lowercase instead.

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Fixes: 36504599
Change-Id: Idb0c5b73d54cf77d5d6fb4ee0af4478ec11e8b82
2017-05-12 13:13:25 +01:00
TreeHugger Robot
6bf9b9a5f3 Merge "TRON: Count smart selection events." into oc-dev 2017-05-12 11:54:37 +00:00
Philip P. Moltmann
517bafa59d Not specify return val of View#onSaveInstanceState
.. as the comment was incorrect since a long time.

Bug: 37802299
Test: compiled
Change-Id: I10fe0b1c0f7f4ccaade38c87136a3785f2685798
2017-05-11 15:32:15 -07:00
Evan Rosky
f14aea9f8b Merge "Only save focus in keyboard navigation clusters when appropriate" into oc-dev 2017-05-11 22:26:18 +00:00
Abodunrinwa Toki
1d77557517 TRON: Count smart selection events.
Logs:
 - Smart selection occured
 - TextView menu item activated on smart selection
 - Smart selection reset
 - Smart selection modified

Test: Manually checked logging happens as per go/tron-howto and verified
nothing is broken in related classes by running:
bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
bit FrameworksCoreTests:android.widget.TextViewActivityTest

Bug: 32572232
Change-Id: Ia9081d92ae9aea50d863455be770eecd0c73be1a
2017-05-11 23:04:29 +01:00
TreeHugger Robot
a7af385208 Merge "Detect isVisibleToUser post layout" into oc-dev 2017-05-11 20:38:28 +00:00
Albert Chaulk
6c34dd58f6 Merge "Propagate UIDs for all SurfaceControl instances" into oc-dev 2017-05-11 15:19:28 +00:00
Derek Sollenberger
d70695ee34 Add an O-release targetAPI check for Canvas.setBitmap.
For apps targeting releases earlier than O setBitmap will attempt
to preserve the matrix from the previous bitmap.  It does not however
attempt to reconstruct the save/restore stack or the clip.

Test: manual test of messenger app referenced in the bug
Bug: 37589964
Change-Id: I67f0928a3f84a8be41da38ef1868e79bdeb03e46
2017-05-11 09:28:02 -04:00
Svet Ganov
68f583879f Detect isVisibleToUser post layout
Test: MiltipleFragmentsLogin test no longer fails.
      All auto fill CTS tests pass.

bug:38173625

Change-Id: I6e36229bc9517c7339c77cbc5f236e8399ef4283
2017-05-10 20:11:45 -07:00
TreeHugger Robot
ea60efa8ef Merge "Remove outdated security note from A11yEvent" into oc-dev 2017-05-11 02:27:19 +00:00
TreeHugger Robot
69a0f3f020 Merge "Clarify documentation for notification a11y events" into oc-dev 2017-05-11 01:57:08 +00:00
Albert Chaulk
e4338f843b Propagate UIDs for all SurfaceControl instances
Previously, a default value was being propagated for surfaces constructed
though paths other than WindowManagerService.createSurfaceControl. This
allows us to handle all surfaces in VR in a better way

Bug: 36589137
Test: Launch chrome (uses SurfaceView)
Change-Id: I8434c356ebe51173cae161ec1405e3d5f9a17723
2017-05-10 20:13:09 -04:00
Svet Ganov
374cae1e61 Properly position dataset picker UI
Test: all autofill CTS tests pass

bug:37958210
bug:37986800

Change-Id: Ic2cb3b8c6762a922bdb7c632e451772b7a006739
2017-05-10 23:38:51 +00:00
Robert Carr
18f622f08c Preserve non-floating state when entering pinned stack.
When transitioning between the fullscreen and pinned states
we often have a situation where we go from having a navigation and
status bar in the window to not. We'd like to use the source bounds
animation to crop these out rather than a sudden jump or scaling
but in order to do so we need to ensure they last until the end
of the animation. We track this state, and return the appropriate
value from isFloating. Furthermore, we add support to the bounds
animation to use the content frame as a source bounds when there
is no source bounds present, this means that we can crop out the
navigation and status bar so they will be invisible by the end of
the animation.

Bug: 37531386
Test: Manual
Change-Id: I72c549e3a3318534428d17b68ebee5832c32e6d7
2017-05-10 15:16:17 -07:00