2372 Commits

Author SHA1 Message Date
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
John Spurlock
dcf4f21460 Hideybars feature confirmation toast bar.
Enhance Toast to support new standard toast bar style, similar
to the undo bar in Gmail.  Toast bars can be interactive,
and can have a single action.  Add a new toast duration to
indicate persistent toasts (no auto-hide delay).

Use the new toast bar to implement a feature hint when hiding
the navigation bar in hideybars mode.

Per UX, the feature confirmation bar can also be dismissed on
any outside touch as long as the user confirmed it using the
OK button at least once globally.

Bug: 8754108
Change-Id: Iaa85d3b4da7ada1952a562f1e31de04380f5d587
2013-05-28 13:09:23 -04:00
Jeff Brown
e9b2f9a069 am 04be10a5: am 36b3b1dd: Merge "Support double-tap home to go to recents." into jb-mr2-dev
* commit '04be10a5b1053d3d263a5522239f5ff6faf283e4':
  Support double-tap home to go to recents.
2013-05-20 19:22:56 -07:00
Jeff Brown
caca88150c Support double-tap home to go to recents.
Add config resources to enable the following behavior for
certain devices:

* press home - go home
* long-press home - launch assist intent
* double-tap home - open recents

Bug: 8891502
Change-Id: I4564d9e4d127f782ed5bd8eb613ef8f2255176cc
(cherry picked from commit b7805698035622a633b2d76f7ca60169aaa9f0ca)
2013-05-20 23:34:03 +00:00
Brett Chabot
98354974f9 am 6ffce75f: am 154bb559: Merge "Fix PhoneWindowManager#getUserRotationMode" into jb-mr2-dev
* commit '6ffce75fa78fba82bde8f1df5828d177457b7a7a':
  Fix PhoneWindowManager#getUserRotationMode
2013-05-17 17:19:02 -07:00
Brett Chabot
7e55c40e92 Fix PhoneWindowManager#getUserRotationMode
This method should be reading from the ACCELEROMETER_ROTATION instead
of the USER_ROTATION setting.

Needed for uiautomator to properly restore the current auto rotation
setting after test run finishes.

Bug 8985351

Change-Id: I50f100117c0590dd65a646b584d027751ad5d3ce
2013-05-16 19:41:34 -07:00
John Spurlock
04db1762fb Window manager cleanup.
Specifically:
 - Fix policy vs wm lock management issues.
 - Share runnable to avoid allocation.
 - Remove unused noop runnable.
 - Make sure to handle status bar = null case.
 - Fix javadoc typo.

Bug: 8890313
Change-Id: I242eaef8e946025f6885d6dba3225722fb0ca7ce
2013-05-13 17:24:24 -04:00
Amith Yamasani
e8e93a143e Fix build error due to incorrect merge
Keyguard package was moved, so a new file didn't get to the right directory.

Change-Id: I2cdf2d9ef785ca7852c38278f51b5af9f96320f7
2013-05-09 18:12:30 -07:00
Amith Yamasani
ecd5afe1ef resolved conflicts for merge of 069d7e9b to master
Change-Id: Ia8fd5de3d4cc275fd358132bcb2c198d1e7b6877
2013-05-09 17:07:08 -07:00
Jim Miller
0055383554 Merge "Attempt to fix NPE in keyguard" into jb-mr2-dev 2013-05-10 00:03:56 +00:00
Jim Miller
982d21b9dc Attempt to fix NPE in keyguard
This attempts to fix a bug where it looks like we have null content in
one of the widget pages in keyguard.

Based on the bug description, it's likely the transport control was just
removed from the view hierarchy.  Not sure how the content can be null
in this case, but this will hopefully prevent the crash and give us some
insight into what caused it.

Fixes bug 8886916

Change-Id: I22c26c49f22fa5b06987e8199070a9aaead2ff8a
2013-05-09 16:23:34 -07:00
Amith Yamasani
6fc1d4e8e6 Cache the scaled avatar drawables in the keyguard user switcher
Loading the avatar icons and drawing them into the sized bitmap
turns out to be quite expensive and the cost increases with number
of users. Caching them shaves off several hundred milliseconds from
Keyguard inflation time during user switching on the lockscreen.

For instance, 15ms vs. 750ms with 3 avatars on a certain 7" tablet.

Bug: 7986933
Change-Id: I3e2065bfa25aa263133ba204ca364c3b04d7c0ff
2013-05-09 14:44:38 -07:00
John Spurlock
e3b642ea4d Handle missing status/nav bar case inside hideybar check.
Don't assume mNavigationBar != null.

Bug: 8890313
Change-Id: If2745b32a8502df629199edbf5493fe8d197a7d3
2013-05-09 16:20:36 -04:00
John Spurlock
ad3e6cb4db Navigation hideybar via new system ui opt-in flag.
Apps using SYSTEM_UI_FLAG_HIDE_NAVIGATION to hide the nav bar
or SYSTEM_UI_FLAG_FULLSCREEN to hide the status bar can now
opt into hideybars by also using a new public sysui flag:
  View.SYSTEM_UI_FLAG_ALLOW_OVERLAY

When opting in, apps accept the fact that bars can be overlayed
over their content, but gain the ability to use the entire gesture
space - something that was not possible before, particularly when
hiding the nav bar.

Swiping from the nav bar edge of the screen will reveal the new hidey
version of the nav bar, if applicable.

Bug: 8682181
Change-Id: I6405bee50e6516667ba6b9a62d4f1e43490b5562
2013-05-08 12:22:16 -04:00
Dianne Hackborn
ba50b97cff Add new app ops for various interesting audio service things.
Media buttons: note when an application tries to take ownership
of the media buttons.
Audio focus: note when an application tries to take audio focus.
Volume levels: note changes to the volume level of the various
streams.

Maybe we should also have some ops for muting streams, soloing
streams, etc?

Change-Id: I79a5d477b0bad4ff61486cdb73ffb1196a674964
2013-05-06 16:12:12 -07:00
John Spurlock
8929bae781 Merge "Hideybar gesture clears flags if SYSTEM_UI_FLAG_FULLSCREEN" 2013-04-29 12:52:26 +00:00
Craig Mautner
eda67299cf Generic refactoring for clarity.
- Log.* was being interspersed with Slog.*.
- WindowState Rects were being converted to local variables making
it harder to find all references to them.

Change-Id: I868a32028604d46dbbc15b005a440f0571336293
2013-04-28 13:50:14 -07:00
Jim Miller
c0b676dcc2 Add keyguard background scrim and protection around keyguard APIs
With this change, the system process will put up a scrim in the
event keyguard crashes to protect underlying content.

It also adds permission checks to prevent unathorized access
through the binder APIs.

Cleaned up KeyguardTestActivity to build separately.

Removed unused resources.

Change-Id: I9e370c6bfb7dca68eae9eae304c815fb84a753d2
2013-04-26 14:34:21 -07:00
John Spurlock
73bad0ec97 Hideybar gesture clears flags if SYSTEM_UI_FLAG_FULLSCREEN
If an app uses the system-clearable SYSTEM_UI_FLAG_FULLSCREEN to hide
the status bar, swiping from the top of the screen should clear the
clearable flags, revealing the system ui, and allowing apps to respond
to the change.

This differs from the behavior the gesture triggers when an app hides
the status bar using the non-clearable WM.LP.FLAG_FULLSCREEN.
In this case, we temporarily overlay the transparent auto-hiding bar.

Bug: 8682504
Change-Id: Ie5dc885fd13c8d980c136f6babcea181565ef2a2
2013-04-26 14:26:09 -04:00
Svetoslav
4293e233dc Lockscreen widgets not always announced.
1. The accessibility events for switching a widget were dispatched
   before we update the important for accessibility property. We
   were lucky to get events in some cases since the pages in the
   pager had alpha grater than zero, i.e. the page was already
   set as important for accessibility, due to a running animation.

2. Accessibility focus clear event not fired if we give focus to
   another view. The old focus was correctly cleared just the
   events were not dispatched.

bug:8599670

Change-Id: Ia2647d77eaa4e10fbaf3a047dc9ea5b728f9c3c3
2013-04-25 13:25:11 -07:00
John Spurlock
57306e6b79 Reveal hideybars using system gesture.
Monitor input events using a dedicated input channel created by
window manager.

This new input event receiver could be used in the future for other
system-wide gestures that do not consume events.

Change-Id: Ib1be2fee0015332279fcf10f5b669fffd61acdcd
2013-04-24 09:52:55 -04:00
Adam Cohen
12a7f76c86 Merge "Fix system server crash when uninstalling paid LS widget that has been added (issue 8647398)" into jb-mr2-dev 2013-04-19 20:26:02 +00:00
Daniel Sandler
8e251dc6da am b0efef2f: am f535c820: Merge "Restore dock home support for car docks." into jb-mr2-dev
* commit 'b0efef2f73533c8d434c47d014f66e1171b19277':
  Restore dock home support for car docks.
2013-04-19 11:10:23 -07:00
Daniel Sandler
f535c820c4 Merge "Restore dock home support for car docks." into jb-mr2-dev 2013-04-19 18:00:17 +00:00
Adam Cohen
128f276323 Fix system server crash when uninstalling paid LS widget that has been added (issue 8647398)
Change-Id: I4acf02dad6bd8347727ca4322d19e15b130a6621
2013-04-18 13:55:25 -07:00
Daniel Sandler
6396c7205a Restore dock home support for car docks.
While it's still not generally appropriate for the home key
to do anything other than take you home, a car is a somewhat
different context: because of the user's reduced ability to
interact with the device, it's especially useful to
temporarily replace the launcher with a car-optimized
variant. While it would be ideal for the entire system
(particularly the user's everyday Launcher) to dynamically
reconfigure their UIs upon entering car mode, it's not the
case today, and car home apps are a useful compromise.

Quick test:

	$ adb shell am broadcast \
		-a android.intent.action.DOCK_EVENT \
		--ei android.intent.extra.DOCK_STATE 2

This reverts commit 7c135205f2f4c192299ad0215276e9e481bccaa5.

Bug: 8234767
Change-Id: I17588fff46e7f5e3773d3ad202601a5642943444
2013-04-18 08:21:49 -04:00
Jeff Brown
59ecf6d383 am 3b90af23: am ab15e6ab: Merge "Add a config resource to force HDMI rotation on some devices." into jb-mr2-dev
* commit '3b90af234303cb674ed29dc258240e7cef96e943':
  Add a config resource to force HDMI rotation on some devices.
2013-04-17 18:47:12 -07:00
Jeff Brown
ab15e6ab37 Merge "Add a config resource to force HDMI rotation on some devices." into jb-mr2-dev 2013-04-18 01:42:01 +00:00
Jeff Brown
c82c89edc7 Add a config resource to force HDMI rotation on some devices.
If the hardware composer HAL does not provide full support for
multiple displays, it may be necessary to force the HDMI rotation
when not docked.  (When docked, we can use the dock's orientation.)

This configuration is not expected to be used on newer devices
with the requisite HAL support and may be removed in the future.

Bug: 8511721
Change-Id: I1ff50f00ee7fe621aceff94bd938ecf6385c3f38
2013-04-17 17:18:15 -07:00
Jim Miller
b1e5137a80 Merge "Move owner info from Settings.Secure to LockSettings" into jb-mr2-dev 2013-04-17 20:39:58 +00:00
Craig Mautner
53078b25c9 Merge "Implement stack splitting and task movement." 2013-04-17 01:58:15 +00:00
Jim Miller
187ec581c6 Move owner info from Settings.Secure to LockSettings
Fixes bug 8512972

Change-Id: Ic046aff0332b78489dda08b1e9e71f4c16154f10
2013-04-16 18:33:43 -07:00
John Spurlock
32beb2c6b1 Hideybars part I - Overlay status bar via an intent.
Implement new mode for status bar, allowing it to overlay
windows that use WM.LP.FLAG_FULLSCREEN, and introduce
transparency.

No gesture is implemented yet, for now the auto-hiding
status bar can be shown using a debugging intent.
  android.intent.action.HIDEYBARS

The auto-hiding status bar hides 3 seconds after shown,
or 3 seconds after last user-interaction with the shade.

Change-Id: Ie4bd625b9cbcddea8f818154719c7a6075972f2a
2013-04-16 11:03:40 -04:00
John Spurlock
9c3b3aec40 Translate MR2 status bar fix to master.
Fix is different in master due to recent keyguard refactoring.

Bug:8567697
Change-Id: Ie668ef0e3018e3f835166508afd9a72c3c1dda84
2013-04-16 09:58:24 -04:00
John Spurlock
c724f65793 am 4f63f54f: am 5584737f: Merge "FLAG_DISMISS_KEYGUARD should not hide status bar if secure." into jb-mr2-dev
* commit '4f63f54fdea298358fe9c05a5f4cc975769a69af':
  FLAG_DISMISS_KEYGUARD should not hide status bar if secure.
2013-04-16 06:29:54 -07:00
John Spurlock
5584737fff Merge "FLAG_DISMISS_KEYGUARD should not hide status bar if secure." into jb-mr2-dev 2013-04-16 13:23:47 +00:00
Craig Mautner
967212cb54 Implement stack splitting and task movement.
Split stacks and move tasks between them. Layout the windows
according to the new stack split.

After layout content rectangles are known split the available area
between all stack boxes. Then use those values for future layout.

Provide stack contents to ActivityManager.

Change-Id: I9746e6185445633810d506be514d0b7b540a7f99
2013-04-15 13:46:47 -07:00
Brian Colonna
a5239891dc Enabling Face Unlock for user switching (bug 8495282)
We had been intentionally disabling FUL when switching to a new user.
The reason was that we were only getting a signal when the user switch
started, not when it completed.  If we started FUL at the beginning of
the user switch, it could be completed by the time the user switch
completed.  We now have a signal to tell us that the switch completed.

Prior to this change, FUL would start whenever keyguard is created.
For a user switch, keyguard is recreated when we get
onUserSwitching(), but we don't want FUL to start until we get
onUserSwitchComplete().  So with this change, if onResume() happens
because of a user switch it doesn't start FUL until we get
onUserSwitchComplete().

Change-Id: I1d3da0a32b9b4cf0cfa5c577f1697d2a41ee4fda
2013-04-15 11:45:40 -04:00
John Spurlock
3733c4c2fe FLAG_DISMISS_KEYGUARD should not hide status bar if secure.
Otherwise, setting both FLAG_DISMISS_KEYGUARD + FLAG_FULLSCREEN
will hide the status bar (by not forcing it) when the secure
keyguard is showing.

Bug:8567697
Change-Id: I441d9c1bc0e106672b6d29427d291f41eaf1e697
2013-04-12 11:43:49 -04:00
Dianne Hackborn
b999d37009 am d9d9c17d: am 77216642: Merge "Implement #7341342 API request: way to determine current orientation..." into jb-mr2-dev
* commit 'd9d9c17dda9a343b8b5386d1b9233c89ab6f3419':
  Implement #7341342 API request: way to determine current orientation...
2013-04-11 17:15:02 -07:00
Dianne Hackborn
7721664288 Merge "Implement #7341342 API request: way to determine current orientation..." into jb-mr2-dev 2013-04-12 00:08:13 +00:00
Dianne Hackborn
b9ec1ac51b Implement #7341342 API request: way to determine current orientation...
...to allow for orientation locking

This doesn't add an API to get the current orientation, since that is
inherantly racy.  Instead there is a new "locked" orientation mode that
locks the screen into whatever the current rotation is.

While at it, added a few other useful orientation modes.

Change-Id: I5c369e6511cb72294e9e922ea8acffd770df9440
2013-04-11 17:07:40 -07:00
Jim Miller
2262610784 Merge "Fix bug where transport shows all the time in keyguard" into jb-mr2-dev 2013-04-11 22:37:34 +00:00
Jim Miller
e5fb5e4c4d Fix missing clock in keyguard
This fixes a bug where the clock sometimes doesn't show due to the
alpha values not being reset when the widget page order changes
due to removing a widget.

Fixes bug 8545025.

Change-Id: I17c531af4c844647b3262fcf56faa84fff8bafc5
2013-04-10 16:10:06 -07:00
Michael Wright
43e27f7e46 Fix shortcut keys to operate as current user
Change-Id: I967b52604b7faee0d5f341dbbe51b2a4734f4d91
2013-04-10 14:06:48 -07:00
Jim Miller
4894a016f4 Fix bug where transport shows all the time in keyguard
This fixes a bug caused by not keeping track of previous play
state properly in keyguard as well as showing the transport
even when in STATE_INVISIBLE.

Fixes bug 8473575

Change-Id: I28bd382c53645a7c44541b3139c0a60569865219
2013-04-09 18:15:53 -07:00
John Spurlock
c6ff35c76f am fc9b371e: am 04c83357: Merge "Awaken dreams on home + recents." into jb-mr2-dev
* commit 'fc9b371e90545c9be46730a9d3ab555edfa7da39':
  Awaken dreams on home + recents.
2013-04-08 13:13:51 -07:00
John Spurlock
c8b46ca575 Awaken dreams on home + recents.
Fixes the KEYCODE_HOME case, awakes when home is
started for any reason.

Also awaken when toggling recents (and not locked).

Bug:8557212
Change-Id: I6578ae3971740a03c27596b838d27a5ab9b03752
2013-04-08 19:18:59 +00:00
Adam Powell
5677e78863 am 2987c218: am 728827ff: Merge "Uphold common ordering expectations around action bar Home/Up dispatch" into jb-mr2-dev
* commit '2987c218e351c76941f09bddb3eb46a572ca6644':
  Uphold common ordering expectations around action bar Home/Up dispatch
2013-04-04 11:10:24 -07:00