2743 Commits

Author SHA1 Message Date
John Spurlock
c6ecac77cf am 38f81ccc: am fee6f69e: Merge "Volume panel should not clear system ui flags." into klp-dev
* commit '38f81ccc768958b1a9100cb2caa93ec3aedd9b5e':
  Volume panel should not clear system ui flags.
2014-03-04 19:15:56 +00:00
John Spurlock
c3371eb5d4 am 49eac16e: am 8ec59a72: Merge "Show hideycling for non-primary users." into klp-dev
* commit '49eac16ec00ea63feaafc137a1d313fcb4374b36':
  Show hideycling for non-primary users.
2014-03-04 19:15:53 +00:00
John Spurlock
fee6f69e83 Merge "Volume panel should not clear system ui flags." into klp-dev 2014-03-04 19:09:20 +00:00
Will Haldean Brown
ca6234e084 Add swipe-to-dismiss support to PhoneWindow.
This adds a new window feature -- FEATURE_SWIPE_TO_DISMISS -- and a
theme attribute to activate that feature. When the feature is
activated, a SwipeDismissLayout is inflated as the DecorView layout.
SwipeDismissLayout intercepts touch events and steals ones that are
large swipes to the right if its children don't. PhoneWindow registers
handlers that listen for these swipe events, translate the window when
necessary, and finish the activity at the end of the gesture.

Change-Id: I512e758f3c3ffd3b353dba3b911c0e80a88d6f5f
2014-03-04 09:26:15 -08:00
John Spurlock
ca4d040342 Volume panel should not clear system ui flags.
Remove private WM flag (used only by the volume panel) to force
the clearable system UI flags clear.

Instead, always lay out the volume panel as if the bars are visible,
as we do for system dialogs - and don't clear the flags.

Reverts part of I25f29af5b6518aba695b64a75977ae240b742118

Bug:11986621
Change-Id: I842729d729d2a6eb2a687d0b930ddb160c6a1b57
2014-03-04 10:12:01 -05:00
John Spurlock
a3e41e7088 Show hideycling for non-primary users.
User 0 owns the window (system_server) but should be allowed
to display on a user's behalf.

Use the corresponding private flag for this system window, since
we cannot classify it by type (TYPE_TOAST) in policy.

Bug:12015090
Change-Id: I33aedb4624288415a5e1ae937676b693024546a9
2014-03-04 10:08:56 -05:00
Craig Mautner
ab55e524b8 Show the keyguard if unsecure window on top
When traversing windows save the fact that windows above the topmost
fullscreen window do not hide the lockscreen. If there is such a
window don't show it.

Fixes bug 13225149.

Change-Id: Ib6f33cbcfb2f60d8957a9184729ecdec80c6a236
2014-03-03 13:26:03 -08:00
George Mount
e180337ee9 Change Activity Scene Transitions to be more automatic redo.
This reverts commit 206e30cd93afe3eb72ec94178324417db5424ed2
along with removing the additional startActivity* methods
and replaces them with ActivityOptions makeSceneTransitionAnimation
methods.

Change-Id: I52bec31ae3c4cea6d549810ae5a7acd8aea176d8
2014-02-26 15:30:22 -08:00
George Mount
206e30cd93 Revert "Change Activity Scene Transitions to be more automatic."
This reverts commit f10587faadb9080a7bf9991cbe04bac5525da482.

Change-Id: I2785a3d2d6b667cad6d61dcbbc1c624161735fa4
2014-02-26 08:56:30 -08:00
George Mount
121e25dcf0 Merge "Change Activity Scene Transitions to be more automatic." 2014-02-25 23:47:57 +00:00
George Mount
f10587faad Change Activity Scene Transitions to be more automatic.
Shared element transitions are enabled by default
when the Window has a TransitionManager.

Shared element location and size are captured and
transferred to the target Activity.

ActionBar is treated as a shared element.

Change-Id: I0f22ea4e5cbe80254e848444e3f235cb742684f4
2014-02-25 11:12:16 -08:00
Kenny Guy
1a447535ce Hide managed profiles from user switchers.
Hide managed profiles from lockscreen user switcher on tablets.
Hide managed profiles from power menu user switcher on phones.
Add flag to enable multi user ui turned off by default.

Change-Id: I4c69a6f7b0f39c249fc85fd940318df1ddab073f
2014-02-24 19:24:42 +00:00
Craig Mautner
5eb4adcbda resolved conflicts for merge of d2794f5e to master
Change-Id: I24339e45e5fc697abf294286e2d6b57620ed9d1a
2014-02-21 17:52:15 -08:00
Craig Mautner
42bf39edbd Reset deferred task removal when app token added.
A task is scheduled for deletion after the final activity has
been removed and has animated away. But if another activity is then
added to the task the deletion flag must be reset.

Also added improved debugging.

Fixes bug 12987986.

Change-Id: I207ea6e9592a9e036d67aa5d1465b4acc5bdd120
2014-02-21 16:46:22 -08:00
Jeff Brown
10102e4c0e resolved conflicts for merge of baaa080b to master
Change-Id: I3ee12321e298f7a2ea577a99f30c49f3bb497fae
2014-02-20 18:05:03 -08:00
Jeff Brown
2687550272 Add a new "doze mode" based on Dream components.
When a doze component has been specified in a config.xml resource
overlay, the power manager will try to start a preconfigured dream
whenever it would have otherwise gone to sleep and turned the
screen off.  The dream should render whatever it intends to show
then call startDozing() to tell the power manager to put the display
into a low power "doze" state and allow the application processor
to be suspended.  The dream may wake up periodically using the
alarm manager or other features to update the contents of the display.

Added several new config.xml resources related to dreams and dozing.
In particular for dozing there are two new resources that pertain to
decoupling auto-suspend mode and interactive mode from the display
state.  This is a requirement to enable the application processor
and other components to be suspended while dozing.  Most devices
do not support these features today.

Consolidated the power manager's NAPPING and DREAMING states into one
to simplify the logic.  The NAPPING state was mostly superfluous
and simply indicated that the power manager should attempt to start
a new dream.  This state is now tracked in the mSandmanSummoned field.

Added a new DOZING state which is analoguous to DREAMING.  The normal
state transition is now: AWAKE -> DREAMING -> DOZING -> ASLEEP.
The PowerManager.goToSleep() method now enters the DOZING state instead
of immediately going to sleep.

While in the doze state, the screen remains on.  However, we actually
tell the rest of the system that the screen is off.  This is somewhat
unfortunate but much of the system makes inappropriate assumptions
about what it means for the screen to be on or off.  In particular,
screen on is usually taken to indicate an interactive state where
the user is present but that's not at all true for dozing (and is
only sometimes true while dreaming).  We will probably need to add
some more precise externally visible states at some point.

The DozeHardware interface encapsulates a generic microcontroller
interface to allow a doze dream for off-loading rendering or other
functions while dozing.  If the device possesses an MCU HAL for dozing
then it is exposed to the DreamService here.

Removed a number of catch blocks in DreamService that caught Throwable
and attempted to cause the dream to finish itself.  We actually just
want to let the process crash.  Cleanup will happen automatically if
needed.  Catching these exceptions results in mysterious undefined
behavior and broken dreams.

Bug: 12494706
Change-Id: Ie78336b37dde7250d1ce65b3d367879e3bfb2b8b
2014-02-20 13:39:13 -08:00
John Spurlock
ed0cd0c38d Merge "Don't call back into AM to get current user." 2014-02-19 16:17:31 +00:00
John Spurlock
4355a533bc Don't call back into AM to get current user.
Bug:13079471
Change-Id: I733d6e3c41c91008406261eac827e6b65bb400db
2014-02-19 09:49:25 -05:00
John Spurlock
1db8b68237 Content inset hint should consult PolicyControl.
Missed instance of sysuivis modification from prior commit.

Change-Id: I40af7da262a00a3a379234f42444e49883d76270
2014-02-18 11:20:57 -05:00
John Spurlock
d9b70bdc1a Simplify immersive mode confirmation cling logic.
Instead of keeping track of confirmations per-package, track
a global confirmation per-user.  If the panic signal is received,
reshow the cling at most once per-user per-reboot.

Ensure the nav bar becomes visible after the panic signal.
Usually this happens as a side effect of showing the keyguard.
However, in the case where there is no keyguard (Security = None)
show the transient nav bar temporarily as a hint.

Also listen to the correct observer uri to pick up confirmation
setting changes.

Bug:12242125
Change-Id: Ic95e2a8630ec3802b8ef462fcaa92366b9343a3f
2014-02-12 10:33:21 -05:00
John Spurlock
b8c37e2507 Fix NPE in PolicyControl.
Bug:12957738
Change-Id: I8051a7a0656f50ed63321f9a79faf0383d7c66b4
2014-02-10 15:36:24 -05:00
John Spurlock
0e29ad02f9 Merge "Global system setting to override certain window policy." 2014-02-06 00:53:42 +00:00
John Spurlock
c6d1c60fb1 Global system setting to override certain window policy.
Specifically, the ability to force immersive-mode-like behavior
on the status bar, the navigation bar (or both) on a
package-by-package basis - and to disable immersive mode
confirmations for specific packages.

Change-Id: I2df7092a91eceeb815367ef917dd7289f4f2b27e
2014-02-05 16:45:23 -05:00
George Mount
0a778eda69 Cross-Activity Scene transition API.
First pass at API for cross-Activity Scene transitions.
Remaining work:
  Transition back
  Automatically capture hero element info
  Transfer of surface texture to synchronize between Activities
  Possibly use scene names to indicate preferred transition

Change-Id: I59d07de1fae694a46b92b1c82525daa301ec1377
2014-02-04 16:18:43 -08:00
Alan Viverette
8eea3ea559 Add APIs for obtaining themed Drawable from Theme, Context
BUG: 12611005
Change-Id: Ic0057be4e4c2d0c61ce02a019b3f7d0625e3a016
2014-02-03 18:42:24 -08:00
John Spurlock
40e61fb7c8 Remove unused line from PhoneWindowManager.
Change-Id: I2b2dc1f08e32b2731409fcf192712ca0cc269f0a
2014-02-03 09:44:00 -05:00
Jim Miller
76bd2d9b52 am cd655f12: Merge "Fix broken homekey on devices without keyguard" into klp-modular-dev
* commit 'cd655f12e730a76e2a97ce6af775b852adc493ce':
  Fix broken homekey on devices without keyguard
2014-01-13 22:28:03 +00:00
Jim Miller
fb5fceaedc Fix broken homekey on devices without keyguard
Fixes bug 12447288

Change-Id: I580dbeac03b56c01d33844f094eaac20d7aba119
2014-01-11 02:33:04 +00:00
Craig Mautner
1f7488e219 resolved conflicts for merge of 4504de5d to master
Change-Id: I8d96fd2b479aebd6de913e617ca190f66c25aaa5
2014-01-10 11:15:19 -08:00
Craig Mautner
4504de5d5a Implement ActivityView.
With an existing ActivityContainer a caller can now create an
ActivityView which consists of a new VirtualDisplay immediately
attached to the ActivityContainer.

Change-Id: Id70333dcbef55d524a87df8f8c92d72ca5579364
2014-01-10 10:54:55 -08:00
shower
3ac2f66f4c Hang off call by power button while screen is on
Enable power button end call and screen is off.  User use power button
to turn on screen will end call.  Should turn on screen and not end call

Change-Id: Idf34f7724dbf1796205332c5c7ef663102f8a30c
Signed-off-by: shower <shower929@gmail.com>
2014-01-03 15:33:50 +08:00
Mike Lockwood
e63f6f7c8d DO NOT MERGE: Remove obsolete "headless" support
Change-Id: I829fe48e6ebcb819e260646bb19ac6ddfcf07f83
2013-12-09 15:14:37 -08:00
John Spurlock
0513d5abb6 Show hideycling for non-primary users.
User 0 owns the window (system_server) but should be allowed
to display on a user's behalf.

Use the corresponding private flag for this system window, since
we cannot classify it by type (TYPE_TOAST) in policy.

Bug:12015090
Change-Id: I33aedb4624288415a5e1ae937676b693024546a9
2013-12-09 11:59:45 -05:00
Adam Powell
cfbe9be5b3 Add support for cross-activity scenes and transitions
* Add theme attributes for specifying a top-level TransitionManager
  for an activity window.

* Add window feature for automatic content transitions. This
  automatically assigns/creates a Scene for setContentView calls.

* Add named transitions. This allows apps to define APIs for
  handshake-agreements about which exit/entrance transitions to play.

* Add new transition type for ActivityOptions. This lets the system
  use ActivityOptions to communicate transition specifics and
  arguments to the called activity.

* Have ActivityManager pass appropriate ActivityOptions through to the
  called Activity. Have the called activity call back into the caller
  to let it know which transition of a possible requested set was
  chosen.

Still to do:

* Define and pass arguments for transitions. This will require
  defining a Parcelable version of TransitionValues and deciding how
  much leeway apps should have for these things.

* Determine how to appropriately filter the ActivityOptions bundle so
  that only appropriate data reaches the target.

* Determine if generalizing the auto-Scenes functionality to
  ViewGroups is appropriate.

Change-Id: I10684b926129ab2fbc1adec9ef31767237acae79
2013-12-05 10:06:19 -08:00
John Spurlock
414c1f0e86 Volume panel should not clear system ui flags.
Remove private WM flag (used only by the volume panel) to force
the clearable system UI flags clear.

Instead, always lay out the volume panel as if the bars are visible,
as we do for system dialogs - and don't clear the flags.

Reverts part of I25f29af5b6518aba695b64a75977ae240b742118

Bug:11986621
Change-Id: I842729d729d2a6eb2a687d0b930ddb160c6a1b57
2013-12-04 13:47:36 -05:00
John Spurlock
6090995951 Remove unused imports from frameworks/base.
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
2013-11-20 11:31:47 -05:00
Alan Viverette
cac68c3f64 Merge "Deprecate Activity.setTitleColor()" 2013-11-15 23:47:53 +00:00
Alan Viverette
2525d9c843 Deprecate Activity.setTitleColor()
BUG: 11712103
Change-Id: Id34ffb59d3f848c591a98880c6cdd9058e5a38dc
2013-11-15 14:42:19 -08:00
Mike Lockwood
ed8902d3b5 Remove obsolete "headless" support
Change-Id: I18e7a4c5166163372ec0a8abbef1063668a0f5b6
2013-11-15 11:01:47 -08:00
Jim Miller
35f5bdd160 am fdf7c36d: am 378c804d: am c8867b28: Merge "Report keyguard as initially showing and secure until we know" into klp-dev
* commit 'fdf7c36daaeec8c6ad7872f81e1f9c3faf1a0e91':
  Report keyguard as initially showing and secure until we know
2013-11-13 18:48:36 -08:00
Jim Miller
fdf7c36daa am 378c804d: am c8867b28: Merge "Report keyguard as initially showing and secure until we know" into klp-dev
* commit '378c804d652f32547d3fe460842e5720b57bd9f1':
  Report keyguard as initially showing and secure until we know
2013-11-13 17:54:04 -08:00
Jim Miller
e5f17ab5a6 Report keyguard as initially showing and secure until we know
This fixes a bug where an app calls KeyguardManager.isLocked()
before keyguard has had a chance to show.  The fix is to assume
keyguard is showing and secure until we know otherwise.

Fixes bug 11670159

Change-Id: Ifbe4cdf40e3b76d2069ecace940f85fa58f31187
2013-11-13 15:40:48 -08:00
John Spurlock
0c574b72aa am bb3adc44: am da721a99: am 778eaf4b: Merge "Disallow transient status bar on the keyguard." into klp-dev
* commit 'bb3adc44dfdb02c087a79df85ddeceb770e9cfb2':
  Disallow transient status bar on the keyguard.
2013-11-11 20:52:19 -08:00
John Spurlock
bb3adc44df am da721a99: am 778eaf4b: Merge "Disallow transient status bar on the keyguard." into klp-dev
* commit 'da721a99febae345d28f9afa5b9679a1c54a2f6b':
  Disallow transient status bar on the keyguard.
2013-11-11 18:05:07 -08:00
John Spurlock
f92b6161b8 Disallow transient status bar on the keyguard.
FLAG_FULLSCREEN on the app under the keyguard was keeping
the transient status bar visible if the user locked while
revealing it.

Bug:11629810
Change-Id: I034d3a4f4fe5463702253a1fca6d32debd520c3c
2013-11-11 15:01:16 -05:00
Michael Wright
5f31a4bd90 Merge "Remove unnecessary input event indirection" 2013-11-08 23:25:37 +00:00
Michael Wright
c9c487e6d6 Remove unnecessary input event indirection
Rather than have a class whose sole job is to pass messages to
PointerLocationView, just have it consume them itself.

Change-Id: I889ce35d99852f746499c0585dc7c43378b4c3a0
2013-11-07 18:55:09 -08:00
John Spurlock
42bb698dbb am 9f6e8e03: am 94cab389: am 1e45fd78: Merge "Fix improperly hidden status bar." into klp-dev
* commit '9f6e8e0361ce615644208dd11adcbeed3265edc7':
  Fix improperly hidden status bar.
2013-11-07 16:54:08 -08:00
John Spurlock
9f6e8e0361 am 94cab389: am 1e45fd78: Merge "Fix improperly hidden status bar." into klp-dev
* commit '94cab389e4f81d454316789fb0a6fbe954080a08':
  Fix improperly hidden status bar.
2013-11-07 16:51:19 -08:00
John Spurlock
f25706fc3e Fix improperly hidden status bar.
An app lib exposed a possible timing problem, causing the bars
to remain hidden after screen rotation during immersive mode.

Bug:11440463
Change-Id: I5166bdce78a876bc08b18f8b9a340366fbbbb70a
2013-11-07 18:02:43 -05:00