2421 Commits

Author SHA1 Message Date
John Spurlock
bd84760165 Merge "Remove opaque-on-interaction from nav bar." into klp-dev 2013-09-05 23:20:00 +00:00
John Spurlock
cfc359a9e6 Remove opaque-on-interaction from nav bar.
And decouple it from the status bar opaque-on-interaction logic.

It's still important to track nav bar interaction for hideybar
suspension purposes.

Also fix a sysui NPE that can occur when restarting SystemUI
(vs the shell).

Bug:10606136
Change-Id: I66a15e02cff352e26b25aebc1c42fb58c042effa
2013-09-05 11:44:34 -04:00
John Spurlock
9e7884a091 Force the nav bar visible when an IME window is visible.
Bug:9499956
Change-Id: I1ed895c6283476440b6c47e1764b6b0fe2aa949a
2013-09-05 09:37:56 -04:00
John Spurlock
ab8fe69296 Merge "Rename hideybars constant to SYSTEM_UI_FLAG_IMMERSIVE." into klp-dev 2013-08-29 01:00:03 +00:00
John Spurlock
d4e6575c4f Ensure IME windows always appear north of the nav bar.
Even if the bars are transparent / invisible.

Refactor the PSB bar mode override logic to take the IME hint into
account.  Bars are overriden to opaque when hint is showing.

Initialize bar state to showing, fix bug that would mark state
as hidden pre-show (on shell restart).

Bug:10505132
Bug:9499956
Change-Id: I21e830e90c7e9812b4192ca65c3c0cd7a6b72798
2013-08-28 14:20:22 -04:00
John Spurlock
e47193d8e1 Rename hideybars constant to SYSTEM_UI_FLAG_IMMERSIVE.
And add more colour to the docs.

Bug:10460791
Change-Id: I703d927101bb034ba6dd061e6afd3e1946440fe5
2013-08-27 14:53:21 -04:00
John Spurlock
ef4adae5de Allow wallpaper to extend into the entire screen.
Previously it was constrained to displayInfo.appWidth/appHeight
which comes from PWM.getNonDecorDisplayWidth/Height, which includes
the nav bar.

Also adjust window layout to entire screen.

This allows wallpaper to extend into the navigation bar region,
important if the nav bar is hidden or transparent.

Bug:10505328
Change-Id: Ia6057b9c57b476a48f3b2d8b6368fd631e944a3e
2013-08-27 12:56:41 -04:00
John Spurlock
0ec64c65fb Add new logging for system bar window state.
And re-enable PhoneStatusBar dump output in bugreports.

Bug:10488453
Change-Id: If39b32e82dee59f3c166c5a948d379030da0ea01
2013-08-26 15:37:58 -04:00
John Spurlock
b77edbfdab Improve transparent bar transitions.
1. Migrate transparent transitions to the new optimized
background color animations.

2. Ensure sysui animation transparent -> opaque has enough
time to run before window manager crops off the content area.

3. Lose the individual alpha on each status bar icon if the bars
are not opaque.  Animate the alpha if visible, make sure they
play together.

4. Documentation typo fix found in AnimatorSet.

Bug:10344949
Change-Id: I615668ce3c552d3df15dbba5cdeeca67549a0220
2013-08-23 08:08:24 -04:00
John Spurlock
5b9145bf99 Improve transient bar transitions.
1. If app clears transient flag w/ a gesture, the touch-outside
listener would always win, causing an unsightly hide + immediate
reshow.  Instead, give the app some time to clear the flag, then
perform a smooth transition in place.

2. When the transient bars are hidden, we do not know ahead of time
which background will be used on reshow (if transient bars are
revealed, the background is semi-transparent, if transient bars
are cleared, the background is opaque).  Window manager is responsible
for showing windows, but sysui is responsible for setting the view
background.  Therefore, we need some level of coordination between
the two in this case.  Introduce two new non-public sysui flags
that represent the window manager's request to reshow the hidden
bars, but do not reshow until sysui acknowledges (by clearing the flag).
This gives sysui whatever time is necessary to prepare itself for
reshow, avoiding unsightly blip from opaque -> transparent during
the enter animation.

3. When both system bars are hidden, any low-profile changes are
moot.  Avoid unsightly low-profile animations during bar reshow
by suppressing the flag in this case.

4. Improve transient bar home -> launcher transition by cancelling
the -> opaque animation.  This also fixes a bug where hitting
home from the transient bar would leave you with a semi-transparent
bar in a non-transient state.

Bug:10284800
Change-Id: I238210561d8d5f70c1a517283b986c9105a1ec75
2013-08-20 15:37:03 -04:00
John Spurlock
27735a4ba5 Maintain TRANSIENT_*_BAR flags until transient bars hidden.
Also factor common bar-management code into a separate helper
class called BarController instead of continuing to pollute
PhoneWindowManager with duplicate logic.

Bug:10345412
Change-Id: I880900e61daa6c2c53b169e4885e68ebc62ecb6c
2013-08-15 17:16:28 -04:00
John Spurlock
2617006950 Ensure LOW_PROFILE is always clear when bars are transient.
Bug:10326361
Change-Id: I4d12c4973153aac72bc840840f061ec782e27a87
2013-08-14 16:08:45 -04:00
John Spurlock
4cf6a948f9 Delay transient navigation confirmation prompt.
Ensure the nav bar is hidden, then wait about the same amount
of time before showing the prompt.

Bug:10312565
Change-Id: Ifbbbc55edf2e40844296e3e96fcc5b491f1b246f
2013-08-13 20:32:28 -04:00
John Spurlock
34e13d90ed Update transient navigation confirmation logic.
Show the confirmation toast when hiding the transient
navigation bar only the first time per app, per reboot.

Hitting the power key while the transient nav is hidden
is taken as a signal of possible user confusion, so reshow
the prompt the next time.

This requires the confirmation prompt to live in policy
(not sysui).  It arguably should have been here in the first
place, since the transient bar state/policy was here, and
sysui should not have not been able to fail to display
the prompt correctly.

Also take this opportunity to remove a hack wrt positioning
the confirmation properly while the nav bar is transitioning.
Toasts now support LAYOUT_HIDE_NAVIGATION if applied to the
toast's view.

Bug: 10246225
Change-Id: Ieb6355e4ca975c0758918a39e3c2ec13da81c7f4
2013-08-13 13:18:14 -04:00
keunyoung
30f420fd6a add local focus mode and input event injection API to Window
- This enables keyboard navigation for window without focus.
 - FLAG_LOCAL_FOCUS_MODE puts window into local focus mode.
 - Application needs to put window in local focus mode, control focus, and
   inject events to make dpad navigation work.
 - Window in local focus mode does not interact with window manager or ime
   regarding focus related events.
 - Also renamed ViewRootImpl.dispatchKey to dispatchInputEvent to allow both key and touch events injection.

Change-Id: I8e8561f29e0dade3797fb7ae3ee7690e6b7f8895
2013-08-08 19:45:21 -07:00
Jeff Brown
ef981a40aa Fix propagation of display overscan information.
Fix several problems in the way that the overscan was plumbed in
which could result in information not being delivered to applications.
There was also a violation of certain invariants regarding the
immutability of returned DisplayInfo objects.

Bug: 10213771
Change-Id: I21184a14305e44278b5e81353bf95d511e8517fb
2013-08-07 14:33:50 -07:00
John Spurlock
e1f366faf8 Introduce new transparent bars sysui flags.
Two new public sysui flags for views to request transparent
bars:
  View.SYSTEM_UI_FLAG_TRANSPARENT_STATUS
  View.SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION

This first change simply introduces the flags at the framework
level, and makes the requisite layout tweaks to WM.

As part of this change, expunge the term "hideybars" from the
codebase. The flag to declare support for transient bars is called:
  View.SYSTEM_UI_FLAG_ALLOW_TRANSIENT

Final visuals/transitions between opaque/transparent bars will be
done as a subsequent change. Right now the transparent style is
identical to the transient bars.

Change-Id: I5ead9c5e7b77f212df5b2a5f6e770596cd2226f3
2013-08-06 14:17:22 -04:00
John Spurlock
32230ef4e6 Merge "Collapse/disable shade when hiding status bar window." 2013-08-05 13:18:54 +00:00
Craig Mautner
5c7132560a Merge "Add force default orientation." 2013-08-03 22:32:04 +00:00
Craig Mautner
46ac6fa614 Add force default orientation.
Devices can be configured to remain in their default landscape or
portrait orientation by setting config_forceDefaultOrientation true
in overlay/.../values/config.xml.

Activities that desire to run in the non-default orientation are
supported by creating a logical display within the physical display.
Transitions to and from the activity perform a crossfade rather than
the normal rotation animation.

Also, improve SurfaceTrace debug output.

Fixes bug 9695710.

Change-Id: I053e136cd2b9ae200028595f245b6ada5927cfe9
2013-08-02 16:23:58 -07:00
Adam Powell
9b0dc2894d Fix a regression where android:windowContentOverlay did not draw properly.
This was the victim of an earlier refactoring. Have the
ActionBarOverlayLayout draw this directly over the content so that it
can stay properly in sync with any animations and also remove an extra
couple of views from the decor layout.

Some apps now expect the broken behavior in default themes. Protect
them from themselves until they bump their targetSdkVersion.

Public bug https://code.google.com/p/android/issues/detail?id=58280

Change-Id: I4284503577e322f3e68d4a7fabda8441d3749b98
2013-08-01 16:02:02 -07:00
John Spurlock
9764218ff9 Collapse/disable shade when hiding status bar window.
Provide system bar window visibility (showing/hiding) to sysui,
information it did not have before.

Use this new info to disable shade interaction when bars are hiding.

Bug: 8682123
Change-Id: I4105b789866f847582af1c68a703240d773fa71e
2013-07-31 14:54:03 -04:00
John Spurlock
9ba21fdc9d Tweak system gesture listener.
Swipe gestures now need only travel a status bar's length
to trigger.  Name distance threshold variable appropriately
to avoid future confusion.

Bug: 10045892
Change-Id: I70fcf218e97c85e2653560bf2e2242d9c36537fd
2013-07-29 10:38:47 -04:00
Craig Mautner
b816bedf6f Limit TYPE_SYSTEM_ERROR to system decor bounds.
Because windows of TYPE_SYTEM_ERROR lie in a layer above the
Navigation Bar they cannot be allowed to extend into the Navigation
Bar area or it will block touches to the Home button.

Fixes bug 9626315

Change-Id: Ib5e4a2d2954cb79adc98d69e3c43108cb1389cc9
2013-07-23 10:56:16 -07:00
Craig Mautner
d4ec332428 Restore nav bar position when wm size is reset.
The mNavigationBarCanMove variable was not reset when the dimensions
were restored using 'adb shell wm size reset'. This change restores
the correct value to it.

Fixes bug 9885741.

Change-Id: I6c9d3107fbc8a1e7acc0249691f4542cd8c07e93
2013-07-22 10:37:43 -07:00
michaelwr
20555cb645 Merge "Add a keycode to switch audio tracks (1/2)" 2013-07-16 01:38:46 +00:00
keunyoung
a446bf0e8c add TYPE_PRIVATE_PRESENTATION window type
- This window type can be used for Presentation created on top of virtual
  private display.
- There can be PRIVATE_PRESENTATION specific policy / behavior, but for now,
  there is nothing special.

Change-Id: I9fde0f0376e57fcc60000d3a3f8657a21ef58993
2013-07-12 14:41:10 -07:00
Jaekyun Seok
bfdad8ecad Add a keycode to switch audio tracks (1/2)
A key to switch audio tracks is general on media devices like blu-ray.

Bug: 9728155
Change-Id: Ib61822b8aa9c143a8febc3cff4707fa775119448
2013-07-12 17:23:29 +09:00
John Spurlock
f56bef147d Resolve car dock home activities properly.
Look up the actual user id (package manager does not understand
UserHandle.USER_CURRENT) and return metadata during resolution
for subsequent checking.

Bug: 9738229
Change-Id: Ib060bacc84473b27a1fb2e717651dc84f018d6f9
2013-07-11 11:00:26 -04:00
Craig Mautner
4f09d517c5 Remove debug logging.
Bug has been fixed.

Change-Id: Ifda11ac6e83012498855e0c7254c99491b128f04
2013-07-01 13:47:49 -07:00
Craig Mautner
9b40728fdc Change order of setting isOpen
Because the WindowManager.addView() method can indirectly call
PhoneWindow.closePanel() it is critical to set isOpen after the
addView call returns in PhoneWindow.openPanel. Otherwise when
closePanel sets isOpen to false PhoneWindow will be in to an
inconsistent state.

Fixes bug 9404689.

Change-Id: If0129a0859546b35445df0f4be2f422c4807fba7
2013-07-01 13:03:19 -07:00
Craig Mautner
1e09cfaa68 Merge "More debug for 9404689." 2013-06-28 18:01:33 +00:00
Craig Mautner
f1f5054f7a More debug for 9404689.
Changing focus to PhoneWindow.

Change-Id: I75c2ce6b1a20729daf8d2b7f83b2a871e1a7e642
2013-06-28 10:43:07 -07:00
Jim Miller
e51cf7aeb6 Simplify wake management code in keyguard.
Removes onWakeKey/Motion handling from keyguard since it's no longer used.
The legacy code was originally intended to have keyguard filter wake events
which is now done in PhoneWindowManager. Ultimately it just needs to call
PowerManager.wakeUp() since keyguard no longer filters these keys.

Change-Id: I5b8ef9b422abf850a85b57f21944e5eb09fbedc2
2013-06-27 15:58:29 -07:00
Amith Yamasani
655d0e2029 Single-user restrictions
Introduces a new "blocked" state for each package. This is used to temporarily
disable an app via Settings->Restrictions.

PIN creation and challenge activities for use by Settings and other apps. PIN
is stored by the User Manager and it manages the interval for retry attempts
across reboots.

Change-Id: I4915329d1f72399bbcaf93a9ca9c0d2e69d098dd
2013-06-25 16:03:55 -07:00
John Spurlock
80f00c1f23 Remove concept of system bar from window manager.
It was already hardcoded to false, this change removes the dead code.

Change-Id: I5e543344e60f69cb9882a70ba29f7c09404ad9fc
2013-06-14 13:20:17 -04:00
Adam Powell
0a317e9116 Show the default activity icon in the action bar if one is not supplied
Fix a regression where the system default activity icon was not used
in the action bar if neither the activity nor application supplied
one.

Bug 9409846

Change-Id: I80a95a0bee511f21cd326372edaf6af811272825
2013-06-13 13:15:43 -07:00
Craig Mautner
037aa8d434 Centralize all system InputEventReceiver monitors.
Implement all system level InputEvent monitors as new
InputEventListeners. Only one InputChannel required and monitoring
can be enabled or disabled by registering with WindowManagerService.

Change-Id: I64714ab858342ed183c62b421098478ffb6637bc
2013-06-12 10:59:16 -07:00
Amith Yamasani
3df2172215 Hide "Take bugreport" for secondary users
In QuickSettings and GlobalActions.

Bug: 9304471
Change-Id: Ia3118b3258b1f6983c47e96168b7b875b6fc798b
2013-06-10 13:45:10 -07:00
John Spurlock
245fd017b3 Put overlay system bar testing behind a setting.
And disable the system gesture by default.  Also remove observer
for obsolete "fancy_rotation_anim" setting.

Change-Id: I08012c164e10bfa5f10a1df8a3db4a3f0203f236
2013-06-07 11:02:53 -04:00
Craig Mautner
fb7044598b Merge "Extend stacks up under status bar" 2013-06-06 00:28:20 +00:00
Craig Mautner
c5a6e44f59 Extend stacks up under status bar
Retain compatibility with earlier behavior. Fixes bug 8685941.

Change-Id: Ida800a2476ba3a18cd97deccbc65c8a02739d118
2013-06-05 17:22:35 -07:00
Jeff Brown
16f6b1514d am b093ea59: am f8038bdd: Merge "Fix regression in long-press home behavior on tablets." into jb-mr2-dev
* commit 'b093ea59fec05d3644a8dfbeda90c635f04a88fc':
  Fix regression in long-press home behavior on tablets.
2013-06-05 15:06:20 -07:00
Jeff Brown
f8038bddce Merge "Fix regression in long-press home behavior on tablets." into jb-mr2-dev 2013-06-05 22:00:58 +00:00
Jeff Brown
f71343ddf0 Fix regression in long-press home behavior on tablets.
Some config.xml resources have values that vary based on the
configuration.  A previous change caused initialization to
occur at a time when the configuration is was not yet available.
This change fixes the problem.

Bug: 8891502
Change-Id: Ia768dc2308cc6ae5f11812c6bce6a6e116cfd759
2013-05-31 17:59:11 -07:00
Adam Powell
04fe6ebb9f Fix a bug resolving the correct icon/logo in action bars
Remove some abstraction-breaking magic in ActionBarView and replace it
with proper resolution of the icon/logo when creating a window. The
old implementation relied on the ActionBarView's context being an
Activity.

Bug 9171554

Change-Id: Idbbb1942622195dcb55e8119f2d64287b07bb509
2013-05-31 15:00:24 -07:00
Jim Miller
00d4c94625 Merge "Fix keyguard issue where an incoming SMS would switch widget" into jb-mr2-dev 2013-05-31 21:41:34 +00:00
Jim Miller
dfb57cdcfc Fix keyguard issue where an incoming SMS would switch widget
This fixes a bug where an incoming notification from AudioManager
would trigger showAppropriateWidgetPage() to be called even though
nothing has changed.

Fixes bug 9202611

Change-Id: If8bbd30b6b324233b5ad6552183c10cc5a335061
2013-05-30 18:22:01 -07:00
John Spurlock
5bee398f16 Merge "Clear low profile bit when showing hideybars." 2013-05-29 13:21:23 +00:00
John Spurlock
d85618ef57 Clear low profile bit when showing hideybars.
Consider this an interaction, ensures that the hideybar
does not reveal itself in low profile mode.

Bug: 9102473
Change-Id: I8819a7d3d7aef0e08afb6f8c574c0ac519066cca
2013-05-28 14:58:50 -04:00