2398 Commits

Author SHA1 Message Date
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
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
Jim Miller
d794e648c3 Check for invalid pointer index in PagedView
Fixes bug 9088039

Change-Id: I54897df39adbf224ef3dd3de4ce7254fb70b587c
2013-05-22 16:05:08 -07: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