...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
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
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
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
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
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
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
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
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
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
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
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
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
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
This needs to actively listen for phonecall callbacks,
or calls that come in while Facelock is active will drop.
Change-Id: I818433e5de9085f0357f61d6a04b395e58871396
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
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
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
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
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
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
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
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
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>
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