924 Commits

Author SHA1 Message Date
Daniel Sandler
0c4ccff369 Add hasNavigationBar() to the window manager.
It is no longer sufficient to check the value of
internal.R.bool.config_showNavigationBar to determine if a
navigation bar (separate from the status bar) is shown on a
device, because the emulator needs to be able to override
this value (now possible by setting qemu.hw.mainkeys to "1"
or "0", for navbar or no navbar, respectively).

This logic is now contained in PhoneWindowManager, and any
clients wishing to know whether the system has a software
nav bar should consult the new hasNavigationBar() method.

Bug: 5404945
Change-Id: I119d32a8c84b88b2ef46f63244e7f11dc5de0359
2011-10-19 16:39:14 -04:00
Jim Miller
06398768ec Merge "Fix 5288804: Make music trasports in lockscreen more closely match design" into ics-mr0 2011-10-18 17:49:28 -07:00
Brian Colonna
2720cfae62 Merge "Fix 5433466 - FU out of position during orientation change" into ics-mr0 2011-10-18 15:46:54 -07:00
Jim Miller
02c4c8a700 Fix 5288804: Make music trasports in lockscreen more closely match design
This fixes three issues;
- Make the background black while the transport is showing.
- Show scrim sandwiched between artwork and overlapping UI.
- Remove gaps in sides of background assets.

Change-Id: I563fc680c4c042d8b25ec37332aeab528cf838ca
2011-10-18 15:21:20 -07:00
Jim Miller
f13313a073 Merge "Fix 5452698: fix broken logic in reportFailedAttempt() in lockscreen" into ics-mr0 2011-10-18 15:10:04 -07:00
Brian Colonna
9d20405e51 Fix 5433466 - FU out of position during orientation change
If you turn the device from portrait to landscape mode and immediately
invoke the lockscreen, it will come up in landscape mode and switch to
the desired portrait mode within a couple of seconds.  Previously,
Face Unlock would come up in landscape mode, but its position would
not change once lockscreen corrected itself, causing Face Unlock to be
partly off the screen.

This has been fixed by checking if we are already bound to Face Unlock
when the layout is created.  If this is true, then the layout is being
created due to a change in orientation, and we stop Face Unlock, and
restart it at the new position.

This commit also adds a fix where we now use INVISIBLE for the Face
Unlock area when it is not showing instead of using GONE.  The
dimensions of the Face Unlock area is 0-by-0 when set to GONE, and we
want to avoid the possibility for the Face Unlock service being
assigned a zero area.  I'm not sure if this was ever causing problems,
but it certainly is not the intended behavior.

Also cleaned up some comments and logging.

Change-Id: I68deb49cb26dafb5c238167d0c23f0eed2cfb75a
2011-10-18 17:04:21 -04:00
Winson Chung
5310a731ea Merge "Updating screenshot animation and behaviour. (Bug: 5333706)" into ics-mr0 2011-10-18 11:17:24 -07:00
Winson Chung
a63bb84bbe Updating screenshot animation and behaviour. (Bug: 5333706)
- Removing the second ticker text
- Adding a new animation to the status bar
- Adding a large icon to the notification

Change-Id: I8778178519fc72ffc299e8d624069b684475191d
2011-10-18 10:46:48 -07:00
Jim Miller
29aa5dc7de Fix 5452698: fix broken logic in reportFailedAttempt() in lockscreen
This fixes a bug where we were no longer showing the countdown dialog
every 5 attempts or "forgot pattern" button when the user has a fallback
password enabled on the pattern unlock screen.

It now correctly shows the dialog whenever the user hits a multiple of
5 bad attempts on any of the pin/pattern/password screens.

Change-Id: I4eb47b4149958a93572d256a4a70f9d67bc1eb38
2011-10-17 22:00:16 -07:00
Jim Miller
9a7e4ce72a Merge "Fix 5466678: use new setSystemUiVisibility() API to enable clock in statusbar" into ics-mr0 2011-10-17 18:03:38 -07:00
Dianne Hackborn
05f1cdc3e9 Fix stupid bug breaking touch on devices without a nav bar.
Change-Id: Id76b7ab5625470fcc72541fb2fe8845cddba523f
2011-10-17 15:02:25 -07:00
Jim Miller
305c78cce6 Fix 5466678: use new setSystemUiVisibility() API to enable clock in statusbar
This fixes a bug where the clock wasn't being shown in the statusbar while
the music widget is showing.

Change-Id: Ic1c52c4ab7fa1490fe14ddafaf2c494bcf51866d
2011-10-17 11:41:44 -07:00
Dianne Hackborn
cd8640fc1a Merge "Fix issue #5398675: It's (too) easy to keep the navigation bar..." into ics-mr0 2011-10-16 14:15:21 -07:00
Dianne Hackborn
e26ab70de2 Fix issue #5398675: It's (too) easy to keep the navigation bar...
...from ever becoming visible

Now there is a 1 second delay from when the user dismisses the nav bar
until when it can be re-hidden.

Also move the code for capturing touch events while nav bar is hidden
out to be used even when there is no nav bar, so this API behaves
consistently across devices whether or not they have some element of
the UI that is being hidden.  On devices with a nav bar, this will
all work the same as prime (the flag is set, the app gets the callback
about the flag being set, when the user touches that touch is captured
so the app doesn't see it put does clear the flag and tell the app
about this).

Change-Id: Icb5ea0ddaf614aa3f12d2140796217f128761dee
2011-10-16 13:21:33 -07:00
Jim Miller
7b5dd87351 Fix 5466793: Fix memory leak in system process when face lock is enabled.
Previously, the code was not unregistering the callback when we unlocked
the device, which kept a reference to LockPatternKeyguardView indirectly
by a reference to mFaceLockCallback.

It now correcly removes the callback when we unlock the device.

Change-Id: Ie592d007a1dfc2416b9e8956aba2c34e3d0120ee
2011-10-16 12:46:06 -07:00
Uriel Rodriguez
d814d4fa0c Merge "going directly to backup after face unlock fails 15 times" into ics-mr0 2011-10-15 08:44:21 -07:00
Jim Miller
ef0e259d59 Fix 5458658: Fix memory leak in lock screen
This fixes a memory leak caused by not unregistering the info callback
held when LockPatternKeyguardView gets destroyed.

Change-Id: I8c008b6f8a5e8471bd0e1fd3939aa75175923ce5
2011-10-14 13:46:19 -07:00
Uriel Rodriguez
fd2ed6910f going directly to backup after face unlock fails 15 times
- after 15 failed face unlock attempts, go to backup until the backup method is successful
- if the backup method times out (because too many unsuccessful unlocking attempts),
  face unlock will not be launched until the backup method is used sucessfully
- fixes 5365919

Change-Id: I9aef7a4f1abcceefc5d6f1c0458ae5cbe8a902df
2011-10-14 16:25:42 -04:00
Jim Miller
4e6d35829e Fix 5358124: Better transport control visibility management in lock screen
This changes TransportControlView to be "sticky" on lockscreen.  Basically, once it
appears on lockscreen, it stays there until unlocked and then locked again in paused state.

Tested basic design goals (using Music2):
- play then lock -> shows
- pause then lock -> not shown
- toggle pause to play while locked and not shown -> shows
- pause after played once while locked -> stays until we unlock and lock again while paused
- remote control play while paused & sleeping -> resume lockscreen -> shows

Also tested:
- configuration changes (orientation) to ensure widget continues to show after it once appears
- remote events while lock screen on -> keeps lockscreen on.
- remote events while sleeping -> doesn't wake.

Change-Id: I23418c5f7dfd1457c0844d2683772e8a3ed0abd1
2011-10-13 23:55:21 -07:00
Steven Ross
3406886939 Merge "Making FaceUnlock not pop up for overlays Fixes 5451837 Fixes 5446341" into ics-mr0 2011-10-13 21:02:15 -07:00
Brian Colonna
2ce6882bb4 Fixed problem where Face Unlock area was showing
I introduced a bug cl https://android-git.corp.google.com/g/#/c/141926
that caused black box to hide lock pattern even when not using Face
Unlock.

Fixed by adding the corresponding check to make sure Face Unlock is
being used.

Change-Id: I9c429c99d7db4d1ab831080f23a1e10123dbfe3e
2011-10-13 22:43:28 -04:00
Steven Ross
7726289c28 Making FaceUnlock not pop up for overlays Fixes 5451837 Fixes 5446341
When the screen turns on because of an incoming phone call or
when the emergency dialer is selected, FaceUnlock is deactivated
until the phone call is completed and the screen is turned off.

This also checks for non-phone overlays.
If the lockscreen becomes unfocused while the screen is on,
we assume that the reason is an overlay and prevent FaceUnlock
from starting.  The normal clock app is not considered an overlay by
this approach, and thus it works as intended (back button
brings up FaceUnlock).

Also reverts: https://android-git.corp.google.com/g/#/c/139885/2
to make FaceUnlock appear when music is playing again

Change-Id: Id715878556667d2b7e35c30a28d91be6a4eee575
2011-10-13 21:41:17 -04:00
Brian Colonna
3505abf31d Merge "Fix 5451144: Poking wakelock upon fallback" into ics-mr0 2011-10-13 18:19:30 -07:00
Brian Colonna
9eeaaa39c3 Fix 5451144: Poking wakelock upon fallback
Now poking the wakelock when Face Unlock goes to the fallback method.
Previously, the backup lock would stay up for a varying amount of
time depending on how long Face Unlock took before fallback.  The
backup is now consistently displayed for 5 seconds.

Also added comments to some older code.

Change-Id: I9f6bdd2d3015e7eb9cb90143737a3cdc87189993
2011-10-13 20:11:57 -04:00
Martijn Coenen
19fa262c52 Merge "Send ACTION_USER_PRESENT when provisioning is completed." into ics-mr0 2011-10-13 16:47:02 -07:00
Adam Powell
50b15348c5 Merge "Bug 5312828 - Menu button not responding" into ics-mr0 2011-10-13 16:13:55 -07:00
Adam Powell
c6d51889c2 Bug 5312828 - Menu button not responding
Increase tolerance for apps calling invalidateOptionsMenu at
inconvenient times.

Change-Id: I712b20002afd0f056c3f05b160c5fa9c2ef0b552
2011-10-13 15:51:25 -07:00
Dianne Hackborn
97175bc327 Merge "Fix issue #5446988: WindowManager warns BOOT TIMEOUT,..." into ics-mr0 2011-10-13 13:13:20 -07:00
Brian Colonna
534b7af027 Merge "Fix 5437700: Underlying backup method was exposed" into ics-mr0 2011-10-13 13:07:55 -07:00
Dianne Hackborn
38cc8960cb Fix issue #5446988: WindowManager warns BOOT TIMEOUT,...
...dev.bootcomplete flags is set before boot animation is out

Also:

- Fix crash in recent apps if the intent for an old app didn't
happen to have the new task flag set.
- Fix issue where a crash in system UI would cause the crash
dialog to be displayed below it, effectively locking the UI.  Now
the crash dialog for persistent processes is shown above everything
else.

Change-Id: I0312001a92beeae5f644c7c3e5c5e19f6716df36
2011-10-13 12:55:57 -07:00
Daniel Sandler
dba9356590 Break apart DISABLE_HOME and DISABLE_RECENT.
Additionally, start using setSystemUiVisibility() where
possible in the keyguard to allow activities and dialogs to
re-enable some of the navigation keys (notably: home but not
recents).

Finally, stop disabling MENU for activities atop the keyguard.

Bug: 5380495 // no home in driveabout, clock
Bug: 5396134 // able to show home/recent in keyguard
Change-Id: I04eb224554ee8cff79476b85148c4cda75bb0b62
2011-10-13 15:28:10 -04:00
Daniel Sandler
1000e3fa06 Merge "Stop enabling all disabled status bar features from GlobalActions. (DO NOT MERGE)" into ics-mr0 2011-10-13 10:51:19 -07:00
Brian Colonna
81cdada882 Fix 5437700: Underlying backup method was exposed
At one point we added a timeout to the black box that covers the
underlying backup unlock method so if Face Unlock doesn't start or
crashes, the user will see the backup method rather than being stuck
looking at a black box.  However, when powering the phone on and off
quickly, the message to time out the black box could be received at
the wrong time, causing it to expose the underlying backup method
when it shouldn't.

This solution clears the existing SHOW/HIDE messages from the
handler's message queue before sending a new SHOW/HIDE message.  In
particular, it clears out a delayed HIDE message when a SHOW is sent
so the SHOW can't be undone by a pending delayed HIDE message.

Also, logging errors for a couple of exceptions instead of rethrowing
so we can gracefully go to the backup in these cases.

Patch set 2 fixes problem where rare exceptions could prevent ever
binding to the service again because mBoundToFaceLockService was still
true.

Change-Id: Ieb7b6723161070f509277f67dc9ef100cf7c1aa6
2011-10-13 12:14:49 -04:00
Brian Colonna
63c8a47b7f Merge "Fixes 5446301" into ics-mr0 2011-10-12 19:14:03 -07:00
Jim Miller
aef555bcf2 Fix 5444675: Fix vibrate regression on Pattern and PIN unlock screens.
This fixes a regression caused by a resource change to the vibrate
pattern.  It used to contain an array of delays and values.  Now it has
another mode with just one value with an associated change to the vibrate
API.

Instead of using a custom vibration pattern, it now just follows the system
vibrate pattern for HapticFeedbackConstants.VIRTUAL_KEY, which is shared by the
home key, among other things.

Change-Id: Ib58493a96a42383955ae59f8ac3865bb46a86a31
2011-10-12 17:44:08 -07:00
Steven Ross
4841e29d0f Fixes 5446301
If the user is making an emergency call, don't bring up Facelock
Has the side effect of not bringing up Facelock if they cancel dialing

Change-Id: I5d23e89b7f687f260670d41f1cc55ebf2a135181
2011-10-12 18:31:22 -04:00
Jeff Brown
d5bb82d18c DO NOT MERGE. Improve screenshot chord debouncing.
Bug: 5011907

Introduce a 150ms delay in handling volume down keys
while waiting to see if a power key will follow.

Don't trigger the screenshot chord if both volume up and
volume down are pressed together.

Don't trigger the long-press power menu if volume keys are
also pressed.

Require the user to press both keys in the chord within
the debounce time and continue long-pressing them in order
to trigger the screenshot action.

Change-Id: I248968d37b73c09d6d08e7f62667c443eba32da0
2011-10-12 15:05:59 -07:00
Daniel Sandler
ec3f05e707 Stop enabling all disabled status bar features from GlobalActions. (DO NOT MERGE)
Leaky singleton bug! GlobalActions, recents, and the
keyguard are all in the same process and therefore receive
the same StatusBarManager instance. Therefore, their calls
to enable() and disable() clobber one another.

Bug: 5423182
Change-Id: Ie535d88f5a5bb940dabee5f1ac176027e1793c5c
2011-10-12 16:53:48 -04:00
Nick Pelly
24d7b5f22a Send ACTION_USER_PRESENT when provisioning is completed.
This is needed for application to know when the keyguard becomes
unlocked, because isKeyguardLocked() is typically true while
provisioning (setup wizard), but ACTION_USER_PRSENT was
not sent when it transitions to false after provisioning.

Bug: 5436867
Bug: 5430833
Change-Id: Icae13ff9cab84774a002a426eb9cb353fa1dc530
2011-10-11 13:50:33 -07:00
Adam Powell
538e565c06 Fix bug 5396097 - menu theme consistency
Fix a bug where action bar menus were using the wrong context to
inflate stock views. This was causing them to use the action bar's
themed widget context instead of the current theme's specific action
bar items.

Note that action views in the menu will still be inflated using the
themed widget context. This can produce some weird side effects if
the action views use theme attributes relating to these action bar
item attributes.

Change-Id: Ied3614d1fedb10a0f5366bbe7b90cd5f2f1ff969
2011-10-11 13:49:28 -07:00
Jim Miller
baa2812b37 Fix 5386408: Fix battery state information propagation in Lock Screen
This fixes a bug where Lock Screen would sometimes inappropriately show
"charged" if it took a while for Lock Screen to get an update on the
battery state.  It now starts with the state set to BATTERY_STATUS_UNKNOWN
so we properly update listeners when we finally get battery information
in handleBatteryUpdate().

Change-Id: I71018a233f38b2f897ff2e6592d7e310550fa016
2011-10-10 22:02:54 -07:00
Jim Miller
2b78c7006a Merge "Fix 5406921: Register for receiving phone state changes when KGSVM gets created." 2011-10-10 16:30:06 -07:00
Steven Ross
c3892c525d Fixes 5429869 Only displaying FaceUnlock when window is focused
Makes sure that the screen is on and the window is focused before bringing up FaceUnlock

Change-Id: I4c138c5c60fde217b6243627bd043194278835c2
2011-10-10 06:46:20 -04:00
Dianne Hackborn
ba8ecd206c Merge "Fix how we hide and show the nav bar." 2011-10-07 15:12:17 -07:00
Dianne Hackborn
df89e65bf0 Fix how we hide and show the nav bar.
The PhoneWindowManager is now responsible for hiding and showing
the nav bar.

For hiding, it just moves it off the screen (easy way to get a
nice slide animation on and off).  At the same time, we use a
new WM facility to put up a fake input window to capture all
touch events.

When a touch event is received, we force the system UI to clear
the navigation hiding bit so it will be shown again.

This removes a bunch of code from the system UI for hiding and
showing the nav bar.  Also removes the code calling from userActivity()
to the system UI, which was bad.  (Also no longer using userActivity()
fixes bugs around re-showing the nav bar due to key presses and
other wrong things.)

Change-Id: I8c3174873b5bcaa36a92322a51e8f7993e88e551
2011-10-07 14:32:01 -07:00
Jim Miller
19eb7014bd Fix 5406921: Register for receiving phone state changes when KGSVM gets created.
This fixes a bug where the state wasn't being updated because it wasn't
registered for KeyguardUpdateMonitor state changes when the view first created, like on first boot.

Change-Id: Ic6838afffd0de51decdc43a8e8a796696aed49df
2011-10-07 13:47:46 -07:00
Steven Ross
9c2df26179 Fixing alarm clock bug
The alarm clock doesn't actually hide the view until AFTER Facelock starts
hence the need to kill Facelock after it has started when the even is caught
Also fixing phone black box background in case the user cancels the call quickly

Also eliminating blackscreen after 4s for multiple reasons
so people can login if lockscreen locks up
also so cancel fade is to the backup lock

Change-Id: I8162ff67453038559f289408f4f0d452d4f79ab3
2011-10-07 16:11:08 -04:00
Dianne Hackborn
85b9edf2da Merge "Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately" 2011-10-06 15:15:32 -07:00
Dianne Hackborn
9a230e01a1 Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately
This cleans up how ui flags are managed between the client and window manager.
It still reports the global UI mode state to the callback, but we now only clear
certain flags when the system goes out of a state (currently this just means the
hide nav bar mode), and don't corrupt other flags in the application when the
global state changes.

Also introduces a sequence number between the app and window manager, to avoid
using bad old data coming from the app during these transitions.

Change-Id: I40bbd12d9b7b69fc0ff1c7dc0cb58a933d4dfb23
2011-10-06 14:57:37 -07:00
Jeff Brown
219f3c7126 Merge "Make SENSOR orientation modes trump rotation lock. Bug: 5371750" 2011-10-05 17:24:29 -07:00