997 Commits

Author SHA1 Message Date
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
Jeff Brown
4dfce20cac Make SENSOR orientation modes trump rotation lock.
Bug: 5371750

Change-Id: I4d18b6c8ba1de0afd5929ddb8d7123272e35fbe2
2011-10-05 16:12:07 -07:00
Brian Colonna
0c422a72ed Added callback for Face Unlock service to poke the wakelock
Change-Id: I76a4e0f8ac0fe17e39195f4593fac7e36d7281f0
2011-10-05 16:13:18 -04:00
Steven Ross
dce0bb62ce Killing Facelock when a phonecall comes in
This needs to actively listen for phonecall callbacks,
or calls that come in while Facelock is active will drop.

Change-Id: I818433e5de9085f0357f61d6a04b395e58871396
2011-10-05 13:51:45 -04:00
Jim Miller
85b10b0dd0 Fix 5317948: Don't display facelock when transport controls are showing.
Change-Id: I0061fa9ec184846b0ed82c977a2e48b36cb079af
2011-10-04 21:14:15 -07:00
Ben Komalo
a1aebdf787 Merge "New PIN unlock screen layout." 2011-10-04 14:27:24 -07:00
Amith Yamasani
e5320a0270 Merge "Tie the lockscreen sounds with the ringer volume." 2011-10-04 13:02:31 -07:00
Ben Komalo
51ea88a86e New PIN unlock screen layout.
Moves "OK" to the right and moves backspace up to beside the text field.

Bug: 5255976
Change-Id: I1b97ee108c9f10f11e5feb361810150bd6dbc776
2011-10-03 18:29:39 -07:00
Danielle Millett
fee5cb54af Merge "Reworked biometric weak check functions" 2011-10-03 17:38:47 -07:00
Danielle Millett
58396984ef Reworked biometric weak check functions
Renamed isBiometricEnabled to isBiometricWeakInstalled.  This function
now checks if the system property is set, the facelock package is
installed, and if the phone has a front facing camera.  It no longer
checks if facelock is currently set as the unlock method.
Added isBiometricWeakInstalled checks to all cases where facelock is used
in LockPatternKeyguardView

Change-Id: Ia86a7ad6118101c6aab90ffb2ee9c42bf2548149
2011-10-03 18:41:01 -04:00
Justin Ho
893746bef5 Merge "allow override of HDMI rotation" 2011-10-03 15:32:14 -07:00
Adam Powell
f8419a0299 Fix bugs around overlay action modes.
Multiple focusable windows cause undesired behavior around selection
modes. TextView isn't sure how to behave when it loses window focus
with regard to selection handles and action modes need to be focusable
for WebView find on page since it uses an EditText as a custom view.

For now:

* Use a layered window decor for overlay action mode when there is no
  action bar requested. This eliminates an extra window and avoids the
  issue described for full-screen UIs.

* Disable WebView's find-on-page mode when the action mode's UI will
  not be focusable. This only affects WebViews in floating windows.

Also remove the "Text Selection" title for WebView's selection mode at
UX's request, as it is inconsistent with TextView's selection mode and
the string does not fit on phones in portrait even on wide
devices. This now uses the same mechanism used in TextView to decide
whether to use title text.

Change-Id: I80caeecea9b47728cf26bb0a388153ca0bdeafe1
2011-10-03 13:20:23 -07:00
Amith Yamasani
8cb751b05a Tie the lockscreen sounds with the ringer volume.
Actual volume is a ratio of the ringer volume and drops along with
but slower than the ringer volume, so that at lowest ringer volume,
the lockscreen sounds are still somewhat audible.

Don't start the sounds if the ringer is muted.

Bug: 5394473
Change-Id: Ifcf242b3198b4ec8f12334e26ec23ebf05a96b83
2011-09-30 17:14:18 -07:00
Marco Nelissen
ee1d541ec8 Merge "Use SoundPool instead of Ringtone." 2011-09-29 13:13:17 -07:00
Marco Nelissen
d5545bd0a9 Use SoundPool instead of Ringtone.
The lock screen was using Ringtone for the lock/unlock sounds, which
meant two new MediaPlayers were created every time a sound needed to
be played. In addition, the Ringtone was assigned to a local variable,
which means it could go be garbage collected and finalized while it
was still playing.
For short sounds that need to be played repeatedly, SoundPool is a
better option anyway, so use that instead.
b/5382634

Change-Id: I8794cbb24604fa7c03032bd5e32ceab37a858054
2011-09-29 12:52:04 -07:00
Justin Ho
b9a4b3c18a Fix lockscreen
Bug: 5391404

Change-Id: I021a37705b72ab1990f7651fecbe743a8af4e372
2011-09-29 12:33:28 -07:00
Adam Powell
e0b6cd14ac Fix bug 5386915 - Action mode is intercepting touches it shouldn't be
Standalone action mode windows should not be touch modal.

Change-Id: Ia3bab69b3ac344837093a17c4b58451bcc3471bf
2011-09-28 22:06:39 -07:00
Brian Colonna
cfdd6242eb Fix 5385186 - Face Unlock no longer shown when first booted
Face Unlock used to show on first boot via an onScreenTurnedOn()
callback.  At some point something changed and this no longer gets
called at boot time.  This left us in the state where the black box
was covering the backup method, but Face Unlock was not starting.

Instead of finding a new way to make Face Unlock start at boot, it
was decided that it is probably best for it not to start at boot
anyway.  So much is happening at boot time, including camera
initialization, that trying to make this work right might cause more
problems than it solves.

This fix moves the code that makes the black box cover the backup
method.  Instead of happening when the layout is originally created,
it now happens in the show() function, which gets called not only
when the screen is turned on, but also before the screen turns off,
such that it is ready to go when the screen turns back on.  This not
only keeps the black box from displaying on boot (because show()
doesn't get called at boot time), but also makes sure the black box is
already there before the screen is turned on, preventing any glitches
that may briefly show the underlying backup method.

Change-Id: I99bdae561a70918b5f12ea5badff08b07d74403c
2011-09-28 20:20:55 -04:00
Brian Colonna
d90172e05f Merge "Pulled out part of onScreenTurnedOn() into show() function" 2011-09-28 16:29:48 -07:00
Adam Powell
8917838b53 Merge "Fix bug 5386180 - Wire up action bar home/up for dialogs" 2011-09-28 16:02:13 -07:00
Adam Powell
915ce0d917 Fix bug 5386180 - Wire up action bar home/up for dialogs
Action bars in dialogs are largely an undocumented "feature" but they
do work - with the exception of this since it previously relied on the
host being an Activity. Make it work.

Change-Id: I52ae24c3bfdd9766e4c0f035183e7f148a4e0162
2011-09-28 15:53:55 -07:00
Brian Colonna
4284e9d19a Pulled out part of onScreenTurnedOn() into show() function
The onScreenTurnedOn() function in LockPatternKeyguardView was
actually being called in two cases - when the screen was turned on,
AND when the show() function was called in KeyguardViewManager, which
actually happens just before the screen is turned off.  Face Unlock
functionality was added to the onScreenTurnedOn() function, not
expecting that the function was also being called just before the
screen turns off.  This causes Face Unlock to run when the screen is
turned off, preventing it from running when the screen is turned on.
This was not obvious during testing because it's not a problem when
testing from the lock screen.  To reproduce the problem you must log
in successfully, then turn the screen off, wait, and turn it back on.

The solution was to pull the non-face unlock functionality from
onScreenTurnedOn() into its own function called show(), which is
called from the KeyguardViewManager show() function and also called
from onScreenTurnedOn().  In this way, the onScreenTurnedOn()
functionality is not changed, but the show() function can be used
for the onScreenTurnedOn() functionality minus the Face Unlock stuff.

One exception to note - I left setting mScreenOn inside of
onScreenTurnedOn() and didn't pull it into show()...that seems like
the correct thing to do.

Change-Id: I9dcc144c7842112c4d35eb3f8b4ab1cd42c05675
2011-09-28 12:08:58 -04:00
Brian Colonna
267cb2b284 Fix 5323545 - FaceLock no longer appears when taking a call
Prior to this fix if the screen was off and a call was received, the
onScreenTurnedOn() callback would bring up the FaceLock service,
which would cover the phone interface.  It now requires the call state
to be CALL_STATE_IDLE to start FaceLock.  When the phone interface
closes, the user is left at the backup lock screen.  Bringing FaceLock
up after a call ends does not seem like the correct thing to do.

While working near the FaceLock callback code, the sleepDevice()
callback was removed because it is no longer used (Fix 5327896).

Some cleanup was also done with regards to KeyguardViewManager.
FaceLock calls were being made from the KeyguardViewManager in
onScreenTurnedOn() and onScreenTurnedOff() via an interface to
LockPatternKeyguardView.  This level of indirection was removed
because it can just be handled inside of the corresponding calls
in LockPatternKeyguardView.  Likewise the FaceLock functionality
inside of hide() in KeyguardViewManager is now in
onDetachedFromWindow() in LockPatternKeyguardView.  Overall this
is much cleaner, especially considering interfacing through
KeyguardViewBase was a bit of a hack.

Patch Set 2:

- Now using KeyguardUpdateMonitor to get phone state

- Removed unnecessary wrapper functions for hiding / viewing
  FaceLock area
  - These were really only there because at one point I was calling
    them from KeyguardViewManager and the naming was confusing

- Removed if(DEBUG) from a couple of log messages that are actually
  warnings that shouldn't show up and I want to know if they happen
  even if I don't have DEBUG set to true

Change-Id: Id7befc47dd421156ff6cdb3aaf62fc76fe9cfad2
2011-09-27 12:45:13 -04:00
Jim Miller
a2f00da374 am b4f0a9f3: Merge "Fix 5326463: rework sim state handling in lockscreen" into ics-factoryrom
* commit 'b4f0a9f3894c1f039168ad672f4aa194999c7cdd':
  Fix 5326463: rework sim state handling in lockscreen
2011-09-26 20:40:59 -07:00
Erik Gilling
9a41ef890d allow override of HDMI rotation
This allows kiosk/demos to be given in portrait mode.  Set with:
adb shell setprop persist.demo.hdmirotation portrait

Change-Id: Ic0c858dcf6329ca34180f582d4869539dde8f69b
Signed-off-by: Erik Gilling <konkers@android.com>
2011-09-26 19:25:15 -07:00
Jim Miller
3f5f83b54f Fix 5326463: rework sim state handling in lockscreen
Previously it was possible to get an inconsistent state because there
were two paths that updated the lock screen sim state.  This reworks
the data flow to ensure the same path is always used to update the state.

KeyguardUpdateMonitor now correctly updates the entire state of the callee
whenever a new callback is registered.

In addition, KeyguardUpdateMonitor now caches the phone state in order
to avoid a round-trip binder call in updateEmergencyCallButtonState().
This avoids a condition that could make lockscreen unresponsive while
updating the emergency call button state.

KeyguardStatusViewManager also ensures the TransportControlView is
hidden when created to ensure we don't inappropriately update the carrier
line while waiting for the first callbacks to update the status lines.

Change-Id: I6b3975b703a7d90bac8d0fe29fbc0f1d9c5e0e7d
2011-09-26 15:17:05 -07:00
Brian Colonna
0e86bc0788 Merge "FaceLock is now closed if emergency dial button is pressed" 2011-09-26 06:03:02 -07:00
Jeff Brown
4c253119db Merge "Prevent unintended rotations. Bug: 4981385" 2011-09-23 18:28:01 -07:00