Commit Graph

9826 Commits

Author SHA1 Message Date
TreeHugger Robot
d8d9758363 Merge "Don't automatically autofill when manual request returned just 1 dataset." into oc-dev 2017-05-31 20:43:20 +00:00
TreeHugger Robot
21999d2895 Merge "Always post AutofillManager operations in the UI thread." into oc-dev 2017-05-31 18:49:38 +00:00
Winson Chung
4e73123c52 Merge changes from topic 'hw_bitmap' into oc-dev
* changes:
  DO NOT MERGE Updating AnimationSpec and related internal APIs to use GraphicBuffer.
  Update code to draw into hardware bitmaps.
2017-05-31 18:46:59 +00:00
Winson Chung
aa7fa01353 DO NOT MERGE Updating AnimationSpec and related internal APIs to use GraphicBuffer.
- This reduces the copy of the hardware bitmap when it is
  parceled/unparceled.

Bug: 38507414
Bug: 62021436
Test: Launch Overview to/from app, ensure that the header bar shows
Test: go/wm-smoke

Change-Id: I85a9a59a0a3699d1642158061d10fddef34393c3
Signed-off-by: Winson Chung <winsonc@google.com>
2017-05-31 16:23:24 +00:00
TreeHugger Robot
c6700cac67 Merge "Fix unnecessary relaunches when unlocking with fingerprint sensor." into oc-dev 2017-05-31 03:54:58 +00:00
Felipe Leme
9876a6fba9 Always post AutofillManager operations in the UI thread.
Test: existing CtsAutoFillServiceTestCases pass
Fixes: 62194407

Change-Id: If878b2befc03706c000b3f31b60904072b2225f4
2017-05-30 19:54:43 -07:00
Wale Ogunwale
bfa81adfbe Fix unnecessary relaunches when unlocking with fingerprint sensor.
When the device is unlocked using the fingerprint sensor in an
orientation opposite to the lockscreen orientation, the app that
will be visible is first relaunched in the current lockscreen
orientation and then later relaunched in the correct orientation.
If the keygaurd is going away then:
- Don't let keyguard affect device orientation. We want to use the
orientation of the app that will be visible.
- Allow the rotation sensor to be enabled even though draw isn't
complete so window manager can get the updated or last rotation
reading.
- Don't clear the previous proposed sensor reading to allow
window manager to use the information to update the orientation as
needed vs. falling back to the previous orientation.

Change-Id: I8369723d6a77f2c602f1ef080371fa7cd9ee094e
Fixes: 38494778
Test: Launch an app that doesn't fix orientation like clock, hold
the device in landscape, press the power button, unlock the device
using the fingerprint sensor, and verify the the app isn't
relaunched.
2017-05-30 18:35:36 -07:00
TreeHugger Robot
9c1b222fc1 Merge "Fix issue with aspect ratio not applying correctly when PIP is expanded" into oc-dev 2017-05-31 00:01:00 +00:00
Felipe Leme
8697a31d3c Don't automatically autofill when manual request returned just 1 dataset.
When the user manually requested autofill and the service returned just 1
dataset, the app was automatically filled with it.

The motivation here was that since the user explicitly asked for autofill,
it'd ok - and better for the user - to release the data to the app without
the selecting a dataset.

This assumption was ok initially, but now the API to manually request autofill
is public, so a malicious app could use to get autofill data without user
interation.

Test: CtsAutoFillServiceTestCases pass
Fixes: 62164695

Change-Id: I47c3d8c557533526572aa67a4240c0a57f54268d
2017-05-30 14:34:27 -07:00
Winson Chung
a71febe2aa Fix issue with aspect ratio not applying correctly when PIP is expanded
- The current code always used the default min edge size to calculate the
  PIP bounds when the aspect ratio changes, so if a PIP app sets the aspect
  ratio in response to the an action, the bounds would be resized down
  incorrectly.
- This CL fixes the issue with current aspect ratio not being initialized
  correctly, and also ensures that SystemUI always updates the min edge
  size when expanding the PIP.

Bug: 38324839
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: go/wm-smoke

Change-Id: Ida0f68b2f8f93f9bf1915dda8762a156704d4709
2017-05-30 16:36:48 +00:00
Robert Carr
49cd9f882c ViewRootImpl: More careful draw accounting.
The strategy of beginning the count at 1 isn't enough
and we need to explicitly debt each request to report
draw. Imagine the case where a ViewRootImpl reports draw
multiple times, while we are waiting for a SurfaceView draw
completion callback. Without the explicit draw debt, the ViewRoot
would be counted as drawing for the SurfaceView and we could
notify the WM too early.

Test: Open Chrome a few hundred times. go/wm-smoke.
Bug: 38324871
Change-Id: I5762a98d1cc808125033ba3d1db8a3ea39a9e071
2017-05-30 09:27:44 -07:00
Robert Carr
b53670aecf SurfaceView: Avoid over-reporting DRAW_FINISHED.
To some extent we rely on the app to call the draw callback
if they want the app to work properly, but this case is fairly easy
to detect, so why not prevent it and provide a helpful log.

Bug: 62051758
Test: Warm start camera a few times. go/wm-smoke.
Change-Id: I39f4e015bfa15a1e0c37dba70b4a700803a6a274
2017-05-30 09:27:44 -07:00
Rob Carr
5366cfbef3 Merge "Fix SurfaceView handler." into oc-dev 2017-05-30 16:17:32 +00:00
TreeHugger Robot
0b1b1c4346 Merge "Improved autofillHints documentation." into oc-dev 2017-05-27 02:25:08 +00:00
TreeHugger Robot
759669988b Merge changes from topic 'highlight_fixed' into oc-dev
* changes:
  Check default focus highlight for ImageView.
  Check state_focus in foreground.
2017-05-27 00:11:10 +00:00
John Reck
7992500d54 Fix SurfaceView handler.
The UI Thread is whatever we happen to be attached to, or the current thread if we are unattached.

Bug: 38180075
Test: Repro from bug. go/wm-smoke.
Change-Id: I3f75882aa13de2b781c71ebbc7b09888981521b3
2017-05-26 21:15:33 +00:00
TreeHugger Robot
bd8fb0e71d Merge "Resolve inflate attr against default package" into oc-dev 2017-05-26 20:54:57 +00:00
Alan Viverette
a7cec30f98 Resolve inflate attr against default package
Change-Id: I2de0f79fb4918770c9f816934b1fc4953073a4f1
Fixes: 38456890
Test: LayoutInflaterTest#testInclude
2017-05-26 14:55:49 -04:00
TreeHugger Robot
7990306b8b Merge "Moar Autofill Framework javadoc improvements:" into oc-dev 2017-05-26 18:55:38 +00:00
TreeHugger Robot
25ae29dfd5 Merge "Removed deprecated setAutofill() method for virtual children." into oc-dev 2017-05-26 15:08:20 +00:00
Felipe Leme
6dcec87ea2 Moar Autofill Framework javadoc improvements:
- Fixed WebView < > and API calls.
- Improved description of virtual views.
- Described how to set boundaries of virtual views.
- Improved AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS doc.

Bug: 37567048
Test: ran 'm -j doc-comment-check-docs' and checked resulting HTML

Change-Id: Ic0d1e9ff2703c87d4007f0092a2f8dfe0efca6db
2017-05-25 16:10:08 -07:00
TreeHugger Robot
68311f8712 Merge "Fix and clarify behavior of vertical/horizontal attributes" into oc-dev 2017-05-25 22:51:18 +00:00
Felipe Leme
8dfe3fa979 Improved autofillHints documentation.
Bug: 38086244
Test: ran 'mmm -j frameworks/base/:doc-comment-check-docs' and checked HTML.

Change-Id: Ia7d2f75ae1db067106af36aa8dbb1cdbf3b40b3a
2017-05-25 15:37:08 -07:00
Felipe Leme
5f3dbb30fc Removed deprecated setAutofill() method for virtual children.
Test: CtsAutoFillServiceTestCases pass

Bug: 37563972

Change-Id: Icbffb89d86ee65831b7c78effd2522ac7891e1be
2017-05-25 11:51:50 -07:00
TreeHugger Robot
d63b77c627 Merge "Creating HW bitmaps from RenderNode" into oc-dev 2017-05-25 18:48:22 +00:00
Chet Haase
cb3d023639 Fix and clarify behavior of vertical/horizontal attributes
There were a couple of problems with the new paddingHorizontal
and layout_mareginHorizontal attributes. For one thing, the behavior
of layout_marginHorizontal needed to change with respect to marginStart/End.
Instead of the implemented behavior where Horizontal took precedence over
start/end, the behavior is being changed such that start/end can override
horizontal. This makes it consistent with the way that the attributes work
for padding.

Also, the attribute docs were not correct. For one thing, they needed to be
updated to match the new behavior for marginHorizontal. Also, the docs for
the padding attributes (including the docs for the existing "padding") were
not correct for the behavior as-implemented (specifically with respect to the
precedence of the attributes where paddingStart/End are concerned).

Bug: 37756178  double-check logic of horizontal/vertical attributes wrt start/end attributes
Test: Updated cts tests, submitting at the same time
Change-Id: I85a102549022cbec7d7b5c76f31ac985db103372
2017-05-24 18:35:48 -07:00
Andrew Solovay
05ceb4e0a6 docs: Clarifying code snippet for View.autoFill()
Per bug, updating code snippet to clarify that it's an example of an
implementation of the method. Oscar & Felipe, please check that I did
it right!

Also fixed a couple of HTML syntax errors while I had the file open
(badly formatted escape-characters that Chrome figured out, but other
browsers might choke on) and a spelling error.

Revised Javadoc is staged to:

http://go/dac-stage/reference/android/view/View.html#autofill(android.view.autofill.AutofillValue)

Test: make ds-docs
Bug: 38347106
Change-Id: I587a66c53fd5ebeeb6108529723d2d7a74c61cf7
2017-05-24 16:37:43 -07:00
Jiaquan He
0bdf1c9c76 Check state_focus in foreground.
This commit checks whether the state_focus is specified in the
foreground of a view. If it is, the default focus highlight won't
show up.

Test: cts-tradefed run singleCommand cts --skip-device-info
--skip-preconditions --abi armeabi-v7a -m CtsViewTestCases -t
android.view.cts.View_DefaultFocusHighlightTest#testIsDefaultFocusHighlightNeeded
Bug: 37288730
Change-Id: I5256eb656c1b8729d685edb914e867ee9a3a92a4
2017-05-24 16:13:38 -07:00
John Reck
1fedd91687 Creating HW bitmaps from RenderNode
Allows creating a HW Bitmap from the drawing
commands of a RenderNode.

Bug: 38507414
Bug: 37698012
Test: Sample in HwAccelerationTest

Change-Id: I57c60b2c8bf5194f4412ad4b7f1c1f35e2e4c757
2017-05-24 22:10:40 +00:00
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