5497 Commits

Author SHA1 Message Date
Wale Ogunwale
99db1863a8 Added support for pinned stack.
Used to support picture-in-picture use case for multi-window

Bug: 25006507
Change-Id: I3bef3f75e0c003f5974274294f1250171d424625
2015-10-26 11:17:33 -07:00
Wale Ogunwale
1485acc222 Merge "Updated support for drawing background drawable when resizing" 2015-10-23 21:48:39 +00:00
Wale Ogunwale
5bcd3189c5 Updated support for drawing background drawable when resizing
f3a62fbc58bbc7f081a53248cae48a8951294e8f added support for drawing
the background draweable when resizing an activity window.
However, after some additional discussion we decided that
R.styleable.Window_windowResizingBackground and
R.integer.config_windowResizingBackgroundColorARGB are not needed.
We use R.styleable.Window_windowBackground for the background
drawable and fallback to using R.styleable.Window_windowBackgroundFallback
which is now public if the first isn't set.

Bug: 24534744
Change-Id: Ia0507e25a1893ea941d259f1d4e88ce500dda154
2015-10-23 12:30:28 -07:00
Alan Viverette
b3f2463990 Implement new keyboard interaction model in TimePicker
Also enlarges the touch targets for the AM/PM buttons by redirecting
unhandled touches within the containing view group.

Bug: 20257430
Change-Id: I28e8d8894a4702116bb68cc6a6d4115e5aa87a69
2015-10-22 16:01:48 -04:00
Adam Powell
6e461518ab Merge "Don\'t query ChooserTargetService apps that haven\'t been used recently" into mnc-dr-dev am: b8cfc12c3f am: 8c7b3e872b am: f998b602bb
am: d6db05e4b1

* commit 'd6db05e4b1ea2410525f2a3d406d24262e06e7e7':
  Don't query ChooserTargetService apps that haven't been used recently
2015-10-21 21:08:51 +00:00
Adam Powell
d6db05e4b1 Merge "Don\'t query ChooserTargetService apps that haven\'t been used recently" into mnc-dr-dev am: b8cfc12c3f am: 8c7b3e872b
am: f998b602bb

* commit 'f998b602bb0145ab7c0a0556795bbaaf69661c74':
  Don't query ChooserTargetService apps that haven't been used recently
2015-10-21 21:01:18 +00:00
Adam Powell
8c7b3e872b Merge "Don\'t query ChooserTargetService apps that haven\'t been used recently" into mnc-dr-dev
am: b8cfc12c3f

* commit 'b8cfc12c3f0b83e9d00b1f324be4ff5c977645ce':
  Don't query ChooserTargetService apps that haven't been used recently
2015-10-21 20:47:14 +00:00
Adam Powell
3a09c52914 Don't query ChooserTargetService apps that haven't been used recently
Resolver/ChooserActivity sort apps based on usage factors for the last
two weeks. A score of zero means no usage data within that timeframe.
For system health and UI relevance, don't bother even waking up apps
that have zero scores.

Bug 25126166

Change-Id: Iae34a9667eb1985d6fe986670f3fb3f1177576da
2015-10-21 13:21:28 -07:00
Dianne Hackborn
ccbf4e4211 Merge "Initial implementation of light-weight idle mode." 2015-10-20 17:51:34 +00:00
Dianne Hackborn
08c47a5dec Initial implementation of light-weight idle mode.
This mode turns on after the screen has been off for 15 minutes,
and then cycles through 15 minutes of idle and 1 minute of
maintenance, ragardless of whether the device is moving around.

It currently only impacts network access and sync/job scheduling.
It does not remove access to wake locks or alarms for any apps.
It also doesn't report in the public API that the device is in
idle mode (since it isn't modifying the behavior of the power
manager) -- this is probably what we desire, since we don't want
stuff like GCM to be reporting these frequent changes.

We'll probably at least want to have the alarm manager do some
kind of more aggressive batching of alarms in this most (not allowing
more than one wakeup every minute?).  That's for the future.

Also updated batterystats to include this new information, which
means the format of some of the data has changed -- device_idle
is no longer a flag, but an enum of (off, light, full), and there
is no information about time spent in light modes.

Also added new data about the maximum duration spent in both light
and full idle modes, to get a better understanding of how those
are behaving.

And did a little cleanup of DeviceIdleController, removing the
sensing alarm which was redundant with the regular alarm.

Change-Id: Ibeea6659577dc02deff58f048f97fcd9b0223307
2015-10-20 10:43:14 -07:00
Adam Powell
f94ce52404 Merge "DO NOT MERGE Fix jank when intent resolver/chooser windows animate in" into mnc-dr-dev am: 4ecfbcfdea am: eeed032eae
am: 2a61cc8032

* commit '2a61cc803203e605b1f4a017deec0aedb21605f3':
  DO NOT MERGE Fix jank when intent resolver/chooser windows animate in
2015-10-20 01:49:35 +00:00
Adam Powell
eeed032eae Merge "DO NOT MERGE Fix jank when intent resolver/chooser windows animate in" into mnc-dr-dev
am: 4ecfbcfdea

* commit '4ecfbcfdeaed67c3a08002069a530fa58582a48b':
  DO NOT MERGE Fix jank when intent resolver/chooser windows animate in
2015-10-20 00:54:34 +00:00
Adam Powell
918b90108b DO NOT MERGE Fix jank when intent resolver/chooser windows animate in
An old optimization in ViewRoot prevents updating a window surface
while a window animation is playing. SystemUI and other small system
components that blend these animations disable this for a smoother
experience. Disable it in ResolverActivity as well.

Bug 24989381

Change-Id: Iac7d1c7b1101ed8d2bc4c3557277a773ce871beb
2015-10-19 16:56:20 -07:00
Chris Wren
75313c4ebb Merge "update metrics enums" 2015-10-19 14:17:44 +00:00
Chris Wren
f885276e6f update metrics enums
Change-Id: I5c4b20dc514889493e3049b4242876633ebebcde
2015-10-16 17:41:13 -04:00
Adrian Roos
5419280fb3 am 2de89ae8: am 3c439c72: am 85fae34e: am 70ea8578: Merge "Fix wrongly laid out navigation color view" into mnc-dr-dev
* commit '2de89ae843a0a6b492eaa55f96a641df16b718a8':
  Fix wrongly laid out navigation color view
2015-10-16 21:19:03 +00:00
Wale Ogunwale
645e8a9ae8 Merge "Added support for resizing background color for an app window" 2015-10-16 21:14:06 +00:00
Adrian Roos
2de89ae843 am 3c439c72: am 85fae34e: am 70ea8578: Merge "Fix wrongly laid out navigation color view" into mnc-dr-dev
* commit '3c439c720d460266358c10d8d2eea9ef9e79beb0':
  Fix wrongly laid out navigation color view
2015-10-16 21:12:06 +00:00
Adrian Roos
85fae34e81 am 70ea8578: Merge "Fix wrongly laid out navigation color view" into mnc-dr-dev
* commit '70ea857859b78a708fb99ac708ead7bdaddf79a7':
  Fix wrongly laid out navigation color view
2015-10-16 20:49:59 +00:00
Adrian Roos
70ea857859 Merge "Fix wrongly laid out navigation color view" into mnc-dr-dev 2015-10-16 20:43:32 +00:00
Wale Ogunwale
f3a62fbc58 Added support for resizing background color for an app window
R.styleable.Window_windowResizingBackground allows an activity to
specify the background drawable that should be used when it is being
resized in multi-window mode. If unset, the system will try to use
R.styleable.Window_windowBackground if set, then
R.styleable.Window_windowBackgroundFallback if set. Otherwise, the
system default resizing background color set by
R.integer.config_windowResizingBackgroundColorARGB.

Also, use decor title color as caption background color when resizing
instead of black.

Bug: 24534744
Change-Id: I83313865b4044b976ebc78d598e14e17e0f37212
2015-10-16 12:54:31 -07:00
Adam Powell
8ebd66ca24 am 4c0011e9: am 824347dd: am d08f339b: am 749334bf: Merge "Fix ChooserTarget app scoring" into mnc-dr-dev
* commit '4c0011e98212cf2b2a9e0aa2bab32c069de3b253':
  Fix ChooserTarget app scoring
2015-10-16 18:32:13 +00:00
Adam Powell
4c0011e982 am 824347dd: am d08f339b: am 749334bf: Merge "Fix ChooserTarget app scoring" into mnc-dr-dev
* commit '824347dd8afc3b8b40e28e4b5d0743b56e341b98':
  Fix ChooserTarget app scoring
2015-10-16 18:27:05 +00:00
Adam Powell
d08f339bcc am 749334bf: Merge "Fix ChooserTarget app scoring" into mnc-dr-dev
* commit '749334bffbc92aeaef27c274a1586fa7365cbfdc':
  Fix ChooserTarget app scoring
2015-10-16 18:13:19 +00:00
Adam Powell
77a533f5b2 Fix ChooserTarget app scoring
An initial sorting step before applying modifiers to the ChooserTarget
scores provided by apps was backwards, causing subsequent target
scores to be heavily penalized. Targets are then heavily influenced by
the lowest score in the set relative to the targets from other apps.

Bug 25013559

Change-Id: I39d5d7c601712fc6a19e694d5846d2c8d17a214f
2015-10-16 10:58:08 -07:00
Abodunrinwa Toki
6a82ccbce9 am 85978d7c: am a3234f01: am 9c76f61d: Merge "DO NOT MERGE: Reduce delay of floating toolbar appearance." into mnc-dr-dev
* commit '85978d7c36e94f107bd72166bc18f893b4817cf9':
  DO NOT MERGE: Reduce delay of floating toolbar appearance.
2015-10-16 16:56:38 +00:00
Abodunrinwa Toki
a3234f0192 am 9c76f61d: Merge "DO NOT MERGE: Reduce delay of floating toolbar appearance." into mnc-dr-dev
* commit '9c76f61dea69e21eba3b89adbc2a00bcb522584e':
  DO NOT MERGE: Reduce delay of floating toolbar appearance.
2015-10-16 16:41:26 +00:00
Abodunrinwa Toki
a6200068af DO NOT MERGE: Reduce delay of floating toolbar appearance.
Bug: 21956394
Change-Id: I3db39e84afd3474b5bb53522c5a4c738ec1511bf
2015-10-16 16:01:00 +01:00
Adrian Roos
fc7476da7a Fix wrongly laid out navigation color view
The SystemUI visibility listener in DecorView
gets called between the measure and layout passes
and is therefore not allowed to change layout parameters.

This change makes sure that changes to the color view
layout parameters are applied eagerly when the insets
change instead of waiting for the views to become visible.

Bug: 24614374

Change-Id: If9df18f582163d0869c28a852c36697b1ce50621
2015-10-15 15:39:46 -07:00
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 8375d639986529969ea5e118de548d29db16ec97.

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