Commit Graph

7090 Commits

Author SHA1 Message Date
Wale Ogunwale
be6555105a Merge "Disassociate system windows from apps" into mnc-dr-dev 2015-10-16 16:14:45 +00:00
tiger_huang
20ebb4c2d4 Disassociate system windows from apps
With the original logic, if an app creates a system window, when the
user goes to home screen, the system window will be still there and
become unable to receive input events, because the system window will
be also changed to the stopped state with the app window, and the
current logic of ViewRootImpl forbid a stopped window receiving input
events.

This change prevents assigning the token of the app window to system
windows created by the app, so that when the app goes to the stopped
state, its system windows won't be affected (can still receive input
events).

This change is related to the following changes:
a5d29971f8
15ed2754a3
c3672cd3f7
41725dedc3

Bug: 24967303
Bug: https://code.google.com/p/android/issues/detail?id=189710

Change-Id: I515e47bafcf39a2b1bdf92f11f623bef8fb6263c
2015-10-16 08:21:45 -07:00
Alan Viverette
c83a6121d2 Merge "Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR" into mnc-dr-dev 2015-10-12 19:41:10 +00:00
Robert Carr
57caeb5703 Ensure SurfaceView requests WM relayout when size changes.
In the case of scaled SurfaceViews with a fixed size.
It is possible for the surface layout size to change
without a change to the surface size or position. In this
case we need to inform the window manager so it can update
frames and scaling. This has presented in Camera and required
workarounds such as changing the fixed surface size to trigger
an update (leading to visual artifacts).

Bug:23974105
Change-Id: I195aa0832907c32874b294101b56e198e853dce5
(cherry picked from commit a8fe43f09c)
2015-10-07 20:39:11 +00:00
Alan Viverette
3b49317977 Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR
Bug: 24657825
Change-Id: Ifa61fe934b3e2467e86c71b37b4f3ede40989e96
2015-10-05 11:13:02 -04:00
Michael Wright
58e829f71d Add support for setting color transforms
Bug: 24038268
Change-Id: I05275c906e02eb9e67331f6f909166eb08ad5536
2015-09-18 23:37:28 +00:00
Dan Stoza
904f485bc6 SurfaceControl: Add colorTransform to DisplayInfo
Adds the colorTransform field, which defines a vendor-specific color
transform (e.g., wide gamut, sRGB, etc.) to the PhysicalDisplayInfo
class, and populates it from the corresponding field from
ISurfaceComposer.

Bug: 20853317
Change-Id: Ic59ca5142bdaa73c42d9c044d7aae345255f1dad
2015-09-03 13:38:39 -07:00
Jorim Jaggi
b774e554f3 Optimize fp touch to wake: Shortcut for report next draw
When telling window manager that Keyguard window is in the correct
state for a fp-touch-to-wake sequence, it takes more than 1 frame at
the moment because the signal that WM is waiting for the next draw
is delayed by one frame because it is posted at the end of the
runnable queue.

To correctly fix this, we should post it at the beginning at the
queue, but this is way too risky this late. Instead, add a isolated
SysUI hack to report it faster.

Bug: 23401557
Change-Id: Icf64101e27611c7c01d108123021b22186f1e70c
2015-08-28 20:07:35 +00:00
Dianne Hackborn
53d6cddb41 Merge "Fix issue #22846750: Starting Screenie Now On Tap crashes USA Today" into mnc-dev 2015-08-07 17:18:11 +00:00
Michael Wright
600b984760 DO NOT MERGE. Add new media navigation keys.
Bug: 22059484
Change-Id: Ifd8fd18178fed45ead2980b957dd1d177e40f165
2015-08-07 14:46:05 +01:00
Dianne Hackborn
6ff55fcb85 Fix issue #22846750: Starting Screenie Now On Tap crashes USA Today
Try to deal well with badly behaving old apps.

Change-Id: Ibc41e5867869463fbf91f3e411c69677909fedad
2015-08-06 22:54:46 -07:00
Yohei Yukawa
2d34a8b718 Merge "Revert "Do not forceLayout when window is resized"" into mnc-dev 2015-08-04 19:51:20 +00:00
Alan Viverette
9d8a230fbd Revert "View measurement optimization"
LinearLayout relied on multiple measurement passes to hide a
discrepancy between EXACTLY and non-EXACTLY measurements.

This reverts commit 9cefbda11e.

Bug: 22810327
Change-Id: I515a80749420d00efc5002fa68221b7c236f03df
2015-07-31 19:53:02 +00:00
Dianne Hackborn
0e3de6caca Change MNC codename to just M.
Change-Id: I4281d200ff6560791c47cf9073ceea1cb509361e
2015-07-29 15:20:21 -07:00
Yohei Yukawa
d2e5647681 Revert "Do not forceLayout when window is resized"
This reverts commit I1e9ef807094b1e0afb32d13fd68b67c3957b15c3,
since it causes a layout jank in Voice IME.

Bug: 18573811
Bug: 22390291
Change-Id: Iaeb1e463d6f316df7bf214ac9439d4230dcac114
2015-07-28 17:00:33 -07:00
Jorim Jaggi
0d210f6395 Animation for touch, wake and unlock
- Add callback to inform SysUI when the screen has been unblocked
and turned on.
- Cleanup inconsistent messaging about device interactive/screen on
and off.
- Add callbacks to inform SysUI about screen states
- Implement a quick fade for the scrim after touch, wake, and unlock.
  First, start with a black scrim on top of everything, and then fade
  it out.
- Make sure we play the normal unlock animation when device is pulsing
- Override navigation bar animations for touch, wake and unlock: Fade
  in the same manner as the scrim.

Bug: 22571198
Bug: 21855614
Change-Id: I8ff08d72cced1e0f03c78d71ff710d8a4f6b848c
2015-07-28 23:02:54 +00:00
Filip Gruszczynski
9b621a72e2 Remove unnecessary relayout call from traversals.
All the necessary information (most importantly outsets) arrives in
addWindowToDisplay that is happening a few lines earlier.

Bug: 22073222
Change-Id: I483e98808877f32812c0e959cdfc14b4e0ca5e62
2015-07-27 11:44:31 -07:00
Yohei Yukawa
fa6e0a80e2 Don't rely on broadcast intent for waking up input method.
Basically this is a copy of Iabef96921dd554ce3768fb18619cefc
for InputMethodManagerService.

As described in JavaDoc of Intent#ACTION_SCREEN_OFF and
Intent#ACTION_SCREEN_ON, one can use those Intents to be
notified when the device becomes non-interactive and
interactive.  IMMS has relied on them to enable and disable
InputConnection between the IME and the application so as not
to allow IMEs to update text when the user does not present.
This is actually our design goal as documented in JavaDoc of
InputMethodManager.

   An IME can never interact with an InputConnection while
   the screen is off.  This is enforced by making all clients
   inactive while the screen is off, and prevents bad IMEs from
   driving the UI when the user can not be aware of its
   behavior.

The goal of this CL is to improve the timeliness of above
mechianism by introducing a direct communication channel from
PowerManagerService to InputMethodManagerService via Notifier.
Actually this is what InputManager has been doing since
Iabef96921dd554ce3768fb18619cefc3230b5fb0.

Reasons behind this change are:

  1. There are several bugreports that imply those Intents can
     dispatch tens of seconds after it is enqueued. This is
     indeed problematic because the user cannot type password
     to unlock their devices until queued
     Intent#ACTION_SCREEN_ON is dispatched. This CL addresses
     such an issue without waiting for figuring out the root
     cause of the delay.
  2. Intent#ACTION_SCREEN_OFF and Intent#ACTION_SCREEN_ON are
     sent as a ordered broadcast, which may not be suitable for
     tasks that require a certain level of timeliness, and what
     IMMS wants is to enable users to start typing immediately
     after the system.

This CL was originally authored by Seigo Nonaka.

Bug: 22423200
Bug: 22555778
Change-Id: I747c37ff6dd8f233faef43f2b5713a4320e848eb
2015-07-23 15:08:59 -07:00
Adrian Roos
4d8134c1b9 Merge "Fix black keyguard / missing status bar" into mnc-dev 2015-07-10 00:01:20 +00:00
Adrian Roos
76d2fe4288 Fix black keyguard / missing status bar
The status bar window was stuck in the READY_TO_SHOW state
because it was not policy visible, whereas the policy
was waiting for the window to become HAS_DRAWN.

Now BarController also updates states if the window
is READY_TO_SHOW, which in turn allows the window to
become visible and HAS_DRAWN.

Bug: 22072099
Change-Id: I1836c276723ee2205d7d5759be079f02aaa23e2e
2015-07-09 16:09:48 -07:00
Alan Viverette
5d3d23199d Add missing break in AccessibilityEvent.eventTypeToString()
Bug: 22331852
Change-Id: I6f75dde0fb29715d05ef8e8b0e16c3a5a2b9d5e8
2015-07-09 09:51:46 -07:00
Dianne Hackborn
f2474d336a Merge "Implement better handling of text in assist." into mnc-dev 2015-07-07 23:51:06 +00:00
Dianne Hackborn
6f0fdc4167 Implement better handling of text in assist.
TextView is now much smarter about the text it reports, limiting it
to what is visible (plus a bit more).  Also add a facility for it to
report where the lines of text are, both as offsets in the text string
and their baselines on screen.

Part of fixing issue #22328792: Fix scalability issues in AssistStructure

Change-Id: Idddb8c3a3331355f381e2d4af06d520fe7c7ce8e
2015-07-07 16:47:37 -07:00
Chris Craik
6ef57e9741 Merge "Don't update DisplayLists when dumping" into mnc-dev 2015-07-07 18:42:15 +00:00
Chris Craik
356b5fe086 Don't update DisplayLists when dumping
bug:22234438

Updating the displaylist is invalid since this debug method isn't
called on the UI thread, and it defeats the purpose of seeing what
the hierarchy is currently rendering.

Change-Id: I10c5cc6dbae8d304559dfc6e863b0ede158d554f
2015-07-07 10:39:39 -07:00
Jorim Jaggi
c5af4f8421 Don't prevent windows from drawing when they are just moving
Bug: 21292010
Change-Id: I0cf459d75e9749afa58a4b8649457b3908c8adeb
2015-07-06 21:12:49 +00:00
Chris Craik
74fed61233 Merge "Clearer message when failing to draw a SW layer" into mnc-dev 2015-07-06 20:29:57 +00:00
George Mount
9488294611 Fix docs for ViewAnimationUtils.createCircularReveal
Bug 22202425

Change-Id: Ic9b5b8ec88b8ae2ece2312e3bc3d4fd49ffc1f1f
2015-07-01 11:10:58 -07:00
Filip Gruszczynski
d40c423b1c Merge "resolved conflicts for merge of 300ccf4a to mnc-dev" into mnc-dev 2015-07-01 17:03:03 +00:00
John Reck
a4ac386d2a Merge "Make querying the graphics stats service more defensive" into mnc-dev 2015-07-01 16:56:09 +00:00
Chris Banes
2bc8485ba7 Merge "Fix memory leak in setActionProvider() - framework edition" into mnc-dev 2015-07-01 07:58:05 +00:00
Yohei Yukawa
63c4a7185c Merge "Reland "Fixed constant window switching on lock screen..."" into mnc-dev 2015-07-01 00:51:36 +00:00
Yohei Yukawa
d1a092218b Reland "Fixed constant window switching on lock screen..."
This is a manual reland of I3680256d41793f62def42fda00e26db1dcc9,
which was certainly merged into lmp-mr1-dev then auto-merged into
master but silently lost there for unknown reasons when
I8c42a1e6091b0fe1253e90265ac248087e was auto-merged into master.

Changes in WindowAnimator.java was already covered by
I2933eaf0ab55fe31cb382c46c411033e33a756e0 so this CL does not
include that change.

Bug: 18021493
Bug: 22158649
Change-Id: Ib1bf9f5bef44d0400230afc32231f7d1f3a1c98b
2015-06-30 16:22:05 -07:00
Chet Haase
081ddbe296 Merge "Invalidate parent when scrolling child view back onto screen" into mnc-dev 2015-06-30 22:46:44 +00:00
Chris Craik
2aa56c5428 Clearer message when failing to draw a SW layer
bug:21376603

Change-Id: I7433491c16c5bc95cffc8e35aac07eb551be9c8e
2015-06-30 15:33:44 -07:00
Chet Haase
1b7f8f99c3 Invalidate parent when scrolling child view back onto screen
This bug caused views which used to be quick-rejected to continue to not
be drawn because the parent's DisplayList no longer contained them. The
fix is to notice when offsetting a view puts it back on screen and invalidates
the parent appropriately.

Issue #21413554  offsetTopAndBottom requires invalidating parent when view becomes visible again

Change-Id: I0f5d2cc48e3da912a41635712d9c37fb30e70c86
2015-06-30 15:33:30 -07:00
Filip Gruszczynski
2987f616fa resolved conflicts for merge of 300ccf4a to mnc-dev
Change-Id: Ia315e314bfde0c066a2c25d93f8cbdc71fee0a14
2015-06-30 15:03:30 -07:00
Chris Craik
ca985b54c8 Merge "Don't display layout bounds of GONE views" into mnc-dev 2015-06-30 21:22:26 +00:00
Chris Craik
a1dab8bb0f Don't display layout bounds of GONE views
bug:22126532

Change-Id: Ib7816346e0f6ff54fcf7b180bf4042ce113728b9
2015-06-30 13:51:26 -07:00
Filip Gruszczynski
300ccf4ab5 am 0ec1328f: Calculate outset hint when adding window.
* commit '0ec1328f85a08a610868856c688ebb8196c79c17':
  Calculate outset hint when adding window.
2015-06-30 20:20:48 +00:00
John Reck
828698b012 Make querying the graphics stats service more defensive
Bug: 21750734

Doesn't fix the underlying issue that we were unable to
get a buffer but as this is non-critical be more defensive
about failures.

Change-Id: I7f2faaa35b064e3d0da0a13dba9aae3c226b9acc
2015-06-30 12:57:42 -07:00
Filip Gruszczynski
0ec1328f85 Calculate outset hint when adding window.
Outsets aren't dynamic so they are a great candidate for a hint when the
window is added through the window manager. Thanks to this during first
view hierarchy measure or wallpaper window layout they are immediately
available and don't require multiple measure/layout passes.

Bug: 21593814
Change-Id: I573c15ffbbe4fcd8a6ed9c5e4fcd6cfbbcd7434f
2015-06-30 12:42:17 -07:00
Chris Banes
c8f6ecc265 Fix memory leak in setActionProvider() - framework edition
Caused by ActionMenuItem's SubUiVisibilityListener
not being nulled when it is replaced via setActionProvider().

BUG: 22189734
Change-Id: Id4deaa05cd5554ca7bdf969a592e4812e39dcb75
2015-06-30 11:17:57 +01:00
Jorim Jaggi
e85da2bad5 Add accessibility event for assist disclosure
Bug: 21568059
Change-Id: Ib51d4236fcc87acd54cb5d191197b9b2c6cc54ea
2015-06-30 00:27:14 +00:00
Adam Powell
6356d3b250 Merge "Improve docs for View#addChildrenForAccessibility" into mnc-dev 2015-06-26 20:35:37 +00:00
Dianne Hackborn
70d8be7616 Fix issue #22013372: Assist should take translationX and friends...
...into account when calculating the position information

Actually what we need here is the full transformation matrix, if it
is available.  And that means actually computing the location of
views on the screen requires doing this all through transformations,
so the AssistVisualizer has been changed to do this (while still
also keeping the old mechanism for comparison to verify that things
are working correctly).

Also added new properties for elevation and alpha.

And optimized the parcelling of AssistStructure to not write things
that aren't needed; this reduces the parcelled size by about half.

Change-Id: I50b0dd2e6599c74701a5d188617a3eff64b07d03
2015-06-25 20:24:34 -07:00
Adam Powell
cf392d143e Improve docs for View#addChildrenForAccessibility
Clarify the role of the list parameter and associated method
documentation.

Bug 22053511

Change-Id: Id0200bba8e60242caee2547bce30764dcabe02fd
2015-06-25 14:48:45 -07:00
Anthony Hugh
a50fa71044 am 001df9ca: DO NOT MERGE: Introduce stem keycodes for Wear
* commit '001df9ca900f3098222a4920a0048d2eb947bd4e':
  DO NOT MERGE: Introduce stem keycodes for Wear
2015-06-25 01:27:41 +00:00
Dave Langemak
ecff75a158 Merge "Revert "Throw IAE on invalid measure spec size"" into mnc-dev 2015-06-25 01:18:00 +00:00
Dave Langemak
afaed06cda Revert "Throw IAE on invalid measure spec size"
This reverts commit ac6cfb32fe.

Change-Id: Ie60b48eac5f732071a5039b9b6bc7b18eb694d5b
2015-06-25 01:14:26 +00:00