240177 Commits

Author SHA1 Message Date
Jorim Jaggi
0d6222d96d Fixes for resize thread
- Make sure to draw navigation bar/status bar background before the
main render node. This is to avoid any flickering when entering
resizing mode, so you rather overdraw than underdraw.
- Draw the first frame from the main thread directly to increase
chance that all drawing commands are processing within a single
frame.

Bug: 27864358
Bug: 28003586
Change-Id: I033f57cdbcb2c16ea93134c041095a415d5c25b4
2016-04-19 14:41:11 -07:00
Jorim Jaggi
25160db73f Optimize some binder calls when recents configuration changes
Bug: 28122871
Change-Id: I54249428792c3ad4b3b6d3dcc0f405675b3b23b4
2016-04-18 21:29:38 -07:00
TreeHugger Robot
7d5c695520 Merge "Use .equals() to compare two UUIDs in SoundTriggerHelper, rather than ==" into nyc-dev 2016-04-19 02:29:06 +00:00
TreeHugger Robot
40297c1a9c Merge "Added extra validation for invalid paths." into nyc-dev 2016-04-19 02:09:35 +00:00
Winson Chung
87574b7b1a Merge changes Ibec23fdb,Id7be5129,I25af8fad,Idbabfe39,I86b10805, ... into nyc-dev
* changes:
  Hiding clear-all button on drag start.
  Adding hint text for drop targets.
  Fixing animation spec animation problem.
  Making the dismiss animation feel smoother.
  Fixing issue with gap between task views.
  Adding desired undocking animation.
2016-04-19 01:32:37 +00:00
Winson
b677bcbee4 Hiding clear-all button on drag start.
Bug: 27702186
Change-Id: Ibec23fdb1ce4853f52a449cbe6d8c6454f0b027c
2016-04-18 18:20:49 -07:00
Winson
99ef458ff1 Adding hint text for drop targets.
Bug: 28192178
Change-Id: Id7be5129488622b56082d2dfa328b751311cabd7
2016-04-18 18:20:43 -07:00
Winson
3664426dcf Fixing animation spec animation problem.
- We were always using the stack layout to get the task transforms, but
  when we are animating to a given task position (ie. hitting recents 
  while the home->recents transition is happening), we would start the
  animation with the final task rect, instead of the current task rect.
  Instead, use the current transform of the task view, and transform
  that to screen coordinates and use it.

Bug: 27154882
Change-Id: I25af8fad97ee78669c952dd81708e6cee5dfab05
2016-04-18 18:20:38 -07:00
Winson
bde852dbf5 Making the dismiss animation feel smoother.
Bug: 27154882
Change-Id: Idbabfe396bc75b598861fd12b78c846f08243a90
2016-04-18 18:20:32 -07:00
Winson
19ecc8ce2d Fixing issue with gap between task views.
- Now that we changed the way the landscape tasks clipped, we no longer
  have to worry about the aspect ratio scaled height.

Bug: 27921659
Change-Id: I86b10805e92decb9995caa3790649f9f7d211784
2016-04-18 18:20:27 -07:00
Winson
d2a0306131 Adding desired undocking animation.
- Separating task binding from task data updating
- Removing unused parameters

Bug: 27154882
Change-Id: Ia970597d57857a74b5d008e91a93703d8fb70c1e
2016-04-18 18:19:06 -07:00
Chris Thornton
41e04a4525 Use .equals() to compare two UUIDs in SoundTriggerHelper, rather than ==
Also refactors ModelData::clearState to clear a bit more of the state.

Bug:28251543
Change-Id: I18d7ccd90a6a9ee8bc8743d9a92c48f17d87c842
2016-04-18 17:58:37 -07:00
TreeHugger Robot
84f0b791e2 Merge "Properly resume paused activity when docked stack in maximized" into nyc-dev 2016-04-19 00:47:29 +00:00
Craig Donner
3e38e6accf Merge "Checks for existence of vr components before trying to disable them." into nyc-dev 2016-04-19 00:10:54 +00:00
TreeHugger Robot
3eefb4c313 Merge "Use right starting window resource in multi-window mode." into nyc-dev 2016-04-19 00:04:00 +00:00
Adam Powell
de7b2ed881 Merge "Be bug-compatible with Fragment#setUserVisibleHint < N" into nyc-dev 2016-04-18 23:41:41 +00:00
Adam Powell
ef4d99f016 Be bug-compatible with Fragment#setUserVisibleHint < N
Prior to Android N we were simply checking if a fragment had a
FragmentManager set before we would trigger a deferred
start. Unfortunately this also gets set before a fragment transaction
is committed, so if setUserVisibleHint was called before a transaction
commit, we would start the fragment way too
early. FragmentPagerAdapter triggers this situation.

Unfortunately some apps relied on this timing in overrides of
setUserVisibleHint on their own fragments, and expected, however
erroneously, that after a call to super.setUserVisibleHint their
onStart methods had been run.

Bug 28184671

Change-Id: Ie40d5f6963d312c2fad4a48fb4f992d33e65c83b
2016-04-18 16:39:22 -07:00
Yang Ni
ecf094ae9d Merge "Fixed ScriptGroup finalizer for old API" into nyc-dev 2016-04-18 23:34:06 +00:00
Craig Donner
672afaa43b Checks for existence of vr components before trying to disable them.
Fixes: 28249296
Change-Id: I98506c263387c9deb05ae6bc997e92e0000b71ad
2016-04-18 16:31:52 -07:00
Adam Lesinski
0d47f4b646 Merge "BatteryStats: Introduce Async external stats requests" into nyc-dev 2016-04-18 23:27:10 +00:00
John Reck
8cddce3f8f Merge "Make getFrameNumber lazy" into nyc-dev 2016-04-18 23:20:39 +00:00
Wale Ogunwale
3ad75d608d Properly resume paused activity when docked stack in maximized
Force focus to the fullscreen stack so that its activity is resumed
regardless of it current state when moving all tasks from the docked
stack to the fullscreen stack and the fullscreen stack should be on
top.

Bug: 28247643
Bug: 28196862
Change-Id: Ic60c3794db765e9ee31b0facbbc4f461d65f30c2
2016-04-18 16:18:42 -07:00
Sailesh Nepal
b05e4851d0 Merge "[Call Timing] Add constants for call timing extras" into nyc-dev 2016-04-18 22:36:40 +00:00
Adam Lesinski
bfdc2020b9 Merge "Optimize ResTable::getLocales() to improve bindApplication performance" into nyc-dev 2016-04-18 22:24:09 +00:00
Adam Lesinski
6cc31990fc Merge "Use Activity resources in DecorContext" into nyc-dev 2016-04-18 22:23:43 +00:00
Wale Ogunwale
dfc18623ed Use right starting window resource in multi-window mode.
Use the override configuration for the task the app is contained
in to generate resources for the starting window.

Bug: 28220001
Change-Id: I6fdf39a6d6de41287b44b25861a76f58fe58dd53
2016-04-18 15:09:34 -07:00
Adam Lesinski
b7e1ce0775 Optimize ResTable::getLocales() to improve bindApplication performance
Change from linear searching for uniqueness to binary search.

Bug:27198799
Change-Id: I1ccb6e93cc213810848f07d631d9d8de7c719803
2016-04-18 15:06:50 -07:00
Chong Zhang
b1dea03f0a Merge "Misc fixes for IME adjust" into nyc-dev 2016-04-18 22:01:10 +00:00
Felipe Leme
8478bf468e Added extra validation for invalid paths.
In normal circumstances, StorageVolume can only be obtained through
StorageManager and hence it will contain a valid path internally. But
the path could be invalid in at least 2 occations:

- App maliciously changed it using reflection.
- Mounted volume was ejected.

This change improves OpenExternalDirectoryActivity so it returns a
RESULT_CANCELED upon receiveving an invalid path.

BUG: 27962875

Change-Id: Ide43968babaa37961c7b704bd289f44eac952e94
2016-04-18 14:55:15 -07:00
Chong Zhang
198afac5ce Misc fixes for IME adjust
- Use thinner divider when IME adjusted

- Dim non-focused stack

- Restrict IME adjustment so that top pane is shrunk to 30% at most

- Move top stack up together with IME adjust

- Move bottom stack up even when not focused for thinner divider

bug: 28175599

Change-Id: I83556535e5a171f0ec28d88429186fa1315b910c
2016-04-18 14:52:34 -07:00
John Reck
28912a5084 Make getFrameNumber lazy
Change-Id: I783de544ad9a3636ea90f1c8c4034738997bfbc8
Fixes: 28246085
2016-04-18 14:34:18 -07:00
Yang Ni
07837d6dab Fixed ScriptGroup finalizer for old API
Bug: 28242626

ScriptGroup finalizer clears out the list of closures, which is
uninitialized for the old API.

Need to check null first, before accessing the list.

Change-Id: Ibf914e17a0878c8c561f823c5f6f6f6619594de1
2016-04-18 14:27:02 -07:00
Wei Wang
f49b51e000 Merge "Use ConnectivityThread for RttManager." into nyc-dev 2016-04-18 21:17:25 +00:00
Jim Miller
8df940000d Merge "Fix operator precedence bug causing a crash." into nyc-dev 2016-04-18 21:09:52 +00:00
Jim Miller
c1e61b83c2 Fix operator precedence bug causing a crash.
This fixes a bug where string expression was being evaluated
and then compared to null.  The result is a constant expression
which always passes, resulting in inadvertently accessing the
null variable.

Fixes bug 28237450

Change-Id: I755b4466fd1985bd7f8984c17e06839ac4a30642
2016-04-18 14:08:37 -07:00
Craig Donner
de5dbec3ab Merge "Disables VR components by default, but enables them if a VR app is installed." into nyc-dev 2016-04-18 21:01:33 +00:00
TreeHugger Robot
3f8f7f4c89 Merge "Remove initial screenshot on interactive bugreport." into nyc-dev 2016-04-18 20:32:47 +00:00
Jorim Jaggi
3c800a4917 Set correct stack before restoring tasks
When restoring a task when starting it from recents, we need to set
all the relevant state for the transition before we actually restore
the task and attach the docked stack, as all kinds of weird things
might go wrong otherwise.

Bug: 28194162
Bug: 27607141
Change-Id: I21d173a43c62d425e507e8cc3a1a576f95cfe048
2016-04-18 20:16:15 +00:00
Jorim Jaggi
d450aa9ac5 Fix IME layout
When introducing the fitToDisplay variable, it should have been

fitToDisplay = task != null -> (implies) !task.isFloating();

but was written as task != null && !task.isFloating.

Bug: 28182018
Change-Id: If0be86f1ed8bb88914ce167e9f5273b6b3dc2571
2016-04-18 20:15:49 +00:00
Jeff Sharkey
fed6c65f2a Merge "Iterate through all known users after moving." into nyc-dev 2016-04-18 19:43:50 +00:00
Jeff Sharkey
ad14b884f4 Merge "Consistent creation/destruction of user data." into nyc-dev 2016-04-18 19:43:18 +00:00
Chris Craik
c79c3246c9 Merge "Improve multi-window render clipping logic" into nyc-dev 2016-04-18 19:40:50 +00:00
TreeHugger Robot
77ca3629f6 Merge "Reduce activity lifecycle churn when exiting split-screen mode." into nyc-dev 2016-04-18 19:22:39 +00:00
Adam Lesinski
ff22a56ef8 Use Activity resources in DecorContext
We use the application context in DecorContext to avoid holding a reference
to the Activity. However, the resources don't match the Activity's in a multi-window
world, so we use the resources from the Activity, which  get updated as the Activity
goes between multi-window states. This avoids holding a reference to the Activity.

Bug:28096052
Change-Id: I2804f2420afad6dcecc56e5dece008c390540d72
2016-04-18 12:14:12 -07:00
Felipe Leme
079f89614c Remove initial screenshot on interactive bugreport.
One of the changes in the 'interactive bugreport' bugreport workflow
introduced on N is that the initial screenshot was taken right away (by
Shell, not dumpstate).

Unfortunately, such initial screenshot is often delayed when the system
is overload. Also, if the user is not interested in a screenshot, it
would be adding more load on the system unnecessarily.

Given these issues, and the fact that the user can still easily take an
initial screenhsot by selecting the proper notification action, the
initial screenshot is being removed.

BUG: 28167977

Change-Id: I2cf6616ce3124102b62ec9a36dc5a0ce6455a909
2016-04-18 12:06:58 -07:00
Ruben Brunk
9d1d006cb3 Merge "Fix VR->VR Activity transitions." into nyc-dev 2016-04-18 19:04:30 +00:00
Michael Wright
c348fa319d Merge "Add new, hidden MotionEvent flag for partially obscured windows." into mnc-dev am: 224582e am: c6629bd am: a8064c2
am: bc57aae

* commit 'bc57aaed0e9ac88a63fa989dba145dc35d048c48':
  Add new, hidden MotionEvent flag for partially obscured windows.

Change-Id: I7663785a6877f61eaec121303dbdcedcbd242ec6
2016-04-18 19:03:25 +00:00
Craig Donner
9906259202 Disables VR components by default, but enables them if a VR app is installed.
If an existing app or newly installed app is installed, then enable them,
otherwise, they stay disabled.

Fixes: 26568985
Change-Id: I8274b061220f41b9462d83b8aff501905d84a508
2016-04-18 11:59:29 -07:00
Michael Wright
bc57aaed0e Merge "Add new, hidden MotionEvent flag for partially obscured windows." into mnc-dev am: 224582e am: c6629bd
am: a8064c2

* commit 'a8064c2a8b54881bceade03a9d2f6c1223e055f3':
  Add new, hidden MotionEvent flag for partially obscured windows.

Change-Id: I4e8d2bff82a3308c5966a0b0c154209b727db669
2016-04-18 18:57:54 +00:00
Michael Wright
a8064c2a8b Merge "Add new, hidden MotionEvent flag for partially obscured windows." into mnc-dev am: 224582e
am: c6629bd

* commit 'c6629bd5dff622a26683269f9201b8d7871c6ef1':
  Add new, hidden MotionEvent flag for partially obscured windows.

Change-Id: I0d602765de707548ede0b1c0a6a38790626e7da1
2016-04-18 18:52:13 +00:00