Commit Graph

5328 Commits

Author SHA1 Message Date
Luis Hector Chavez
5dd239a1f8 Make ZygoteInit not require CAP_BLOCK_SUSPEND
We are dropping CAP_BLOCK_SUSPEND since that prevents correct suspension in
Chrome OS.  This change makes it so that it only requests that capability if it
is not running inside a container.

TEST=Android boots correctly
BUG:24952794

(cherry picked from commit 5e38447a9bf81bb7d58d33c71498495e1e0f575f)
(cherry picked from commit dc3943951ee475ef09cc7a4825368f9b707e1344)

Change-Id: If39357f22955442d5532d1408ce74360384521bb
2015-10-15 17:03:59 +00:00
Adam Powell
b60d985561 am 2271385a: am bd4d81b0: am b248077a: am 2eac005b: Merge "Fix bugs introduced in ChooserActivity" into mnc-dr-dev
* commit '2271385ad8845d86af2a3aba6b03ec3113e9b9be':
  Fix bugs introduced in ChooserActivity
2015-10-15 00:13:47 +00:00
Adam Powell
2271385ad8 am bd4d81b0: am b248077a: am 2eac005b: Merge "Fix bugs introduced in ChooserActivity" into mnc-dr-dev
* commit 'bd4d81b08cc5d961da294c683a73c6c13e3eb931':
  Fix bugs introduced in ChooserActivity
2015-10-15 00:08:14 +00:00
Adam Powell
b248077a8a am 2eac005b: Merge "Fix bugs introduced in ChooserActivity" into mnc-dr-dev
* commit '2eac005bbfc94a774c0a3f870fd393a3e7389f8c':
  Fix bugs introduced in ChooserActivity
2015-10-14 23:52:14 +00:00
Adam Powell
4eb9871ead Fix bugs introduced in ChooserActivity
* Wait to start animations until all state has been initialized, as
  the process of starting an Animator will set initial values,
  triggering other events relying on the configured state.

* Correctly track underlying item indexes for columns.

* Do not over-extend the ResolverDrawerLayout when multiple rows
  animate in.

Bug 24926885
Bug 24928706

Change-Id: I4772e1a0ba79b17b5dc19c778f3ef0cb5200c533
2015-10-14 13:10:18 -07:00
Filip Gruszczynski
2dfcf5ce2e Keep freeform window surface translucent during resize.
Freeform window surfaces are translucent because most of the time they
have shadows. During a resize we stop displaying the shadow, which
might change the surface opacity from translucent to opaque. This change
only happens if the activity gets recreated during the resize, as this
triggers recalculation of the necessary opacity. If configuration change
happens the relayout will now contain new, opaque pixel format and cause
the recreation. The second blink will happen after we finish resizing,
as the surface needs to become translucent again.

Bug: 24668341
Change-Id: I450323276c49f176f0f6dfb3b21a5f6d742a8418
2015-10-14 09:22:42 -07:00
Adam Powell
d86a7f4cf7 am 1901a9e1: am 40ce70c9: am 11af1878: Merge "Add animation and positional stability to intent chooser UI" into mnc-dr-dev
* commit '1901a9e199eee9102c829413528029dc25855987':
  Add animation and positional stability to intent chooser UI
2015-10-13 00:20:51 +00:00
Adam Powell
40ce70c9c0 am 11af1878: Merge "Add animation and positional stability to intent chooser UI" into mnc-dr-dev
* commit '11af18783d32f8646428500a0ff3a2a57a77bf95':
  Add animation and positional stability to intent chooser UI
2015-10-12 23:33:22 +00:00
Adam Powell
11af18783d Merge "Add animation and positional stability to intent chooser UI" into mnc-dr-dev 2015-10-12 23:28:36 +00:00
Chong Zhang
8dbd9ad682 Fix missing frame or wrong frame position when resize starts
When multi-thread renderer is used, delay the report to draw to the
first doFrame in ResizeFrameThread. Otherwise we could unfreeze the
window before the frame is drawn.

Also when content draw bounds is updated for the first frame, let
content draw before ResizeFrameThread so that the bounds get applied.

bug: 24715185

Change-Id: I5485dc0be3eae24c555bcc31ee8f71523b68ca8d
2015-10-12 11:01:14 -07:00
Wale Ogunwale
d16ebb0d09 Allow apps in home workspace to have non-client-decor.
Currently required for apps like recents to resize correctly
with the 2-render thread approach. Eventually we will want to
separate the functionality from the non-client-decor.

Bug: 24742523
Bug: 24810450
Change-Id: Id241bf8fe47dd8c4ec570c90149c859c45aa6285
2015-10-09 13:25:14 -07:00
Wale Ogunwale
013f84ab79 Merge "Synchronize critical sections in NonClientDecorView.ResizeFrameThread" 2015-10-08 23:33:10 +00:00
Alan Viverette
1aba36d721 Merge "Revert "Reduce CascadingMenuPopup's reliance on internal ListView state"" 2015-10-08 19:54:49 +00:00
Alan Viverette
2ac975deb3 Revert "Reduce CascadingMenuPopup's reliance on internal ListView state"
Introduced some regressions. Reverting until we can do better testing.

This reverts commit 8375d63998.

Change-Id: I9b15d63e52c814ef8985b86f8a50359e39355d39
2015-10-08 19:54:16 +00:00
Wale Ogunwale
25cd08ca15 Synchronize critical sections in NonClientDecorView.ResizeFrameThread
Prevents multiple-threads from accessing/changing member variables at
the same time that can lead to the app crashing.

Also, setName on ResizeFrameThread so we can easily find it in systrace.

Bug: 24745288
Change-Id: Ic2fc7d661db5360c13314197c40e8b2315d2b7e5
2015-10-08 12:44:53 -07:00
Filip Gruszczynski
c10bcedc3a Fix leak of decor view children.
When activity doesn't have a non client decor view but we preserve its
windows, we need to remove the children directly from the decor view
instead.

Bug: 24750271
Change-Id: I50e83ef61deba92e668ee165c4a297547a56071f
2015-10-08 12:24:02 -07:00
Skuhne
980ee47ffe Resolving incorrect rendering of content while resize
The staged content bounds need to be set by the content renderer
and not by the resize thread.

Bug: 24671393
Change-Id: I8f84ec01a4ac6c1e783cc6208ca77ca6c01ba838
2015-10-06 13:52:17 -07:00
Chong Zhang
a42521ca0a Merge "Make window callbacks non static member of ViewRootImpl" 2015-10-06 18:56:13 +00:00
Alan Viverette
266cdd4839 Merge "Reduce CascadingMenuPopup's reliance on internal ListView state" 2015-10-06 18:43:24 +00:00
Adam Powell
acaaee06f6 Merge "Add animation and positional stability to intent chooser UI" 2015-10-06 18:14:02 +00:00
Chong Zhang
dcee1dea6b Make window callbacks non static member of ViewRootImpl
Move add/removeWindowCallbacks to onAttachedToWindow/onDetachedFromWindow.

There might be more than one windows in an app process, the window
callbacks need to be per window, not global.

bug: 24679461
Change-Id: I216ff27b2a41ecfe7399a8161df362bebc0ac96a
2015-10-06 10:29:55 -07:00
Alan Viverette
8375d63998 Reduce CascadingMenuPopup's reliance on internal ListView state
Bundles cascading menu information and stores it in a stack representing
the hierarchy of added menus.

Bug: 23970448
Change-Id: Icc0a96ea2dd4320fd4dae9626435ed82a6165480
2015-10-06 10:40:25 -04:00
Chet Haase
4164e6a8da Merge "Enable activity rendering during window animations" 2015-10-05 22:27:02 +00:00
Chet Haase
9c45041105 Enable activity rendering during window animations
A change was made back in ICS that prevents the view hierarchy from rendering
during window animations. Specifically, it allows the hierarchy to render once (to draw
the results of its first layout), but further drawing is suppressed at the
ViewRoot/performTraversals level until the window animation is complete.

This change was introduced to avoid jank problems that were resulting from
thrashing the GPU by issuing drawing commands from multiple processes simultaneously,
and limited the number of rendering processes to mainly the system server (and
possibly the System UI), which allowed window animations to be much smoother.

This fix contributed to another source of jank, however, in which applications
which attempt to animate when they first appear will not render any frames of
animations until the window animation is done, resulting is a snapping to the resulting
state once the window animations are complete.

Meanwhile, hardware has gotten faster and GPUs have gotten better, and it is time to
revisit this logic. This change disables the earlier fix and allows view hierarchies
to draw normally, regardless of whether window animations are taking place.

Issue #22232939 Remove flag that prevents drawing during window animations

Change-Id: I4c960180771ff09a7088abd77b437586e835a991
2015-10-05 14:58:17 -07:00
Filip Gruszczynski
14418daa09 Fix recents crashing during docked stack resize.
Whether acitvity window should be preserved during the relaunch is
controlled by the activity manager and the existence of
non-client-decor should not affect it. For example, docked activities
will not have non-client-decor, but we would like to preserve them
anyway.

Bug: 24573657
Change-Id: I5d4852c3b7c26ac3ec1bbc105639f75b67d1d3ad
2015-10-05 10:56:49 -07:00
Skuhne
cc075c76ff Possible resize flickering on config change
It is possible that while a config change is going on, the
view hiererchy got created but not layouted. In that case
the reported size of the main window would be 0,0. In this
event we need to use the cached window sizes from the past
render.

Bug: 24595899
Change-Id: Ia41f7ae0999e4f2bda364506029bcbdfd7d3f4b4
2015-10-02 16:23:44 -07:00
Adam Powell
63b3169845 Add animation and positional stability to intent chooser UI
Dejank the process of bringing in new ChooserTargets from queried
services. Animate the service target rows in upward so that if the
user's finger is already headed for a visible choice we don't inject
something wrong right under them at the last second. Keep things sane
if the user is dragging the UI while we're bringing in new items.

To animate this, since we can't use RecyclerView from the framework we
treat the height of rows as a conceptual data set change for
ListView. To get away with doing this per-frame we pre-measure the
item height (which remains constant) instead of doing more expensive
wrap_content calculations. ResolverDrawerLayout is now aware of how to
account for a cheat-measured ListView to compensate.

Bug 24038066

Change-Id: I01414a5746815255ff948a6d0887bb5ad0897285
2015-10-02 19:37:29 +00:00
Adam Powell
6ef8578ef4 Add animation and positional stability to intent chooser UI
Dejank the process of bringing in new ChooserTargets from queried
services. Animate the service target rows in upward so that if the
user's finger is already headed for a visible choice we don't inject
something wrong right under them at the last second. Keep things sane
if the user is dragging the UI while we're bringing in new items.

To animate this, since we can't use RecyclerView from the framework we
treat the height of rows as a conceptual data set change for
ListView. To get away with doing this per-frame we pre-measure the
item height (which remains constant) instead of doing more expensive
wrap_content calculations. ResolverDrawerLayout is now aware of how to
account for a cheat-measured ListView to compensate.

Bug 24038066

Change-Id: I01414a5746815255ff948a6d0887bb5ad0897285
2015-10-02 12:32:24 -07:00
Skuhne
b816087962 Rendering the window frame with a second thread
Using a multi threaded render node to render the window frame
asynchronously from the application relayout.

Bug: 22527834
Bug: 24400680
Bug: 24459827
Bug: 24409773
Bug: 24537510
Change-Id: I1010fc6a8b6e38424178140afa3ca124433ab7e4
2015-10-02 07:11:45 -07:00
Chong Zhang
5482018a31 Merge "Only send touch event in NonClientDecorView to caption bar" 2015-09-30 21:18:17 +00:00
Chong Zhang
509ea6b285 Only send touch event in NonClientDecorView to caption bar
bug: 24537314
Change-Id: I3735398b2c9425b11c44f37669ba7267f9cc32bf
2015-09-30 14:12:11 -07:00
Jeff Sharkey
54c331a05b am 5dfd06f7: am c2fa99ed: am 792a9cc3: am 30fd0628: Merge "Relax auto-launch checks for GET_CONTENT." into mnc-dr-dev
* commit '5dfd06f7d00476dcffb933584ef7e083469215e3':
  Relax auto-launch checks for GET_CONTENT.
2015-09-30 20:36:50 +00:00
Jeff Sharkey
5dfd06f7d0 am c2fa99ed: am 792a9cc3: am 30fd0628: Merge "Relax auto-launch checks for GET_CONTENT." into mnc-dr-dev
* commit 'c2fa99edf1591eca47ad678889cfd4924f2470a8':
  Relax auto-launch checks for GET_CONTENT.
2015-09-30 20:27:36 +00:00
Jeff Sharkey
792a9cc3a5 am 30fd0628: Merge "Relax auto-launch checks for GET_CONTENT." into mnc-dr-dev
* commit '30fd0628970b418dea382b388120f52504ff2243':
  Relax auto-launch checks for GET_CONTENT.
2015-09-30 20:11:22 +00:00
Jeff Sharkey
30fd062897 Merge "Relax auto-launch checks for GET_CONTENT." into mnc-dr-dev 2015-09-30 16:22:17 +00:00
Jason Monk
45b1ae3463 Merge "Add more QS tiles" 2015-09-30 13:57:00 +00:00
Adam Lesinski
eda63f4bf9 am 67ee88e8: am 8b7beaec: am 8197e2de: am ffc6ce00: Merge "Fix asymmetry in parceling/unparceling code for BatteryStats summary" into mnc-dr-dev
* commit '67ee88e8ad19f0dc67add174903f24a7c479e74f':
  Fix asymmetry in parceling/unparceling code for BatteryStats summary
2015-09-29 23:51:23 +00:00
Adam Lesinski
67ee88e8ad am 8b7beaec: am 8197e2de: am ffc6ce00: Merge "Fix asymmetry in parceling/unparceling code for BatteryStats summary" into mnc-dr-dev
* commit '8b7beaecffde9a98b50cd33be893b7944f2ab271':
  Fix asymmetry in parceling/unparceling code for BatteryStats summary
2015-09-29 23:45:28 +00:00
Filip Gruszczynski
0daf2102a2 Fix leaking the first activity while preserving windows.
This is achieved by not having the decor view hold onto the activity
context. Instead, we are wrapping application context, so that we can
have theme support and also have a special instance of window manager
that is aware of the phone window (the same way as activity do).

This reverts commit a5ffea3b7d.

Change-Id: I924f4c7ef8f0d20e9174bd7b3e00ec00b44443b9
2015-09-29 16:31:40 -07:00
Adam Lesinski
8197e2de06 am ffc6ce00: Merge "Fix asymmetry in parceling/unparceling code for BatteryStats summary" into mnc-dr-dev
* commit 'ffc6ce000568c08a50f7b538bd4cd7729e64c229':
  Fix asymmetry in parceling/unparceling code for BatteryStats summary
2015-09-29 23:30:27 +00:00
Adam Lesinski
ffc6ce0005 Merge "Fix asymmetry in parceling/unparceling code for BatteryStats summary" into mnc-dr-dev 2015-09-29 23:22:59 +00:00
Chong Zhang
fdb5d2f7ce Merge "Carry over app token when preserving window" 2015-09-29 21:11:36 +00:00
Chong Zhang
a8be1b99ec Carry over app token when preserving window
Otherwise the token in the window's attr will be null after relaunch.
When this attr is updated with WindowManagerGlobal, setStoppedState()
will no longer find the view from the token.

bug: 24404382
Change-Id: Ib6935b03346a84dd023e224f72896041fda9dcd5
2015-09-29 13:58:46 -07:00
Jason Monk
abe1974a11 Add more QS tiles
(only for paging prototype)

Change-Id: Ifb09e3262540a486c9ee7e83a904f96cc4e33fec
2015-09-29 16:47:15 -04:00
Jeff Sharkey
cc2ae6b421 Relax auto-launch checks for GET_CONTENT.
When a developer wraps an intent with Intent.createChooser(), they're
indicating that the user should always be prompted, instead of using
any "always use" defaults.  A recent CL changed the chooser behavior
to ensure that UI is always shown in the case where there is only one
match.

However, this caused us to start prompting for the GET_CONTENT intent,
for which there is only ever one DocumentsUI system app.  Since that
app delivers on the createChooser() contract described above, we're
okay automatically launching it.

Bug: 24464358
Change-Id: I0279d3343479c134a35f41ddf3cb4204d0ae6a90
2015-09-29 13:04:48 -07:00
Abodunrinwa Toki
66e47b6aa1 Merge "FloatingToolbarEspressoUtils + more TextView selection by touch tests" 2015-09-29 18:44:41 +00:00
Abodunrinwa Toki
8a5e1ae2f4 FloatingToolbarEspressoUtils + more TextView selection by touch tests
Bug: 24102650
Change-Id: Idd7d8b29ad8cfdf10d75137762bb1cb677bda6b7
2015-09-29 15:27:11 +01:00
Bill Rassieur
84b6bb1826 am 6e78bb42: am 2711eb4c: am 3de2d53a: am c25d5460: Merge "Fix jank: Don\'t write lockout deadline if not needed" into mnc-dr-dev
* commit '6e78bb42fc8af64f4f2208b48585451793e303c9':
  Fix jank: Don't write lockout deadline if not needed
2015-09-28 23:30:29 +00:00
Bill Rassieur
6e78bb42fc am 2711eb4c: am 3de2d53a: am c25d5460: Merge "Fix jank: Don\'t write lockout deadline if not needed" into mnc-dr-dev
* commit '2711eb4c3950ee0b5776c07957f0af3c31aa1c67':
  Fix jank: Don't write lockout deadline if not needed
2015-09-28 23:19:32 +00:00
Bill Rassieur
3de2d53a75 am c25d5460: Merge "Fix jank: Don\'t write lockout deadline if not needed" into mnc-dr-dev
* commit 'c25d546050423845c42a5e8cc8e356caa1f4f71a':
  Fix jank: Don't write lockout deadline if not needed
2015-09-28 23:09:10 +00:00