History log of /frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b4045d3791566a1965024591def87dff7d120295 17-Mar-2017 Andrew Zeng <zenga@google.com> Notify keyguard of when power button is pressed.

This is done on wear power button doesn't turn off the screen,
when the device wakes from keyguard UI isn't visible yet, so
it needs to react to power press in some way.

Bug: 35147955
Change-Id: I22619ea446770d09b53370e9244215646b60a9db
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
241ae10b2189f449e57d8d660235ac56d8fb1b80 03-Nov-2016 Jorim Jaggi <jjaggi@google.com> Add explicit method to dismiss Keyguard

The flag is a bit clunky for most cases, and a method is more
clear.

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardTests

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardLockedTests

Test: runtest systemui -c
com.android.systemui.keyguard.DismissCallbackRegistryTest

Bug: 30961403
Bug: 27422134
Change-Id: I39de90c7cfecd99350a74f72cd76418e337f2b79
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
e69c93181f1f313dcedd07f677af1cea953fdf16 01-Nov-2016 Jorim Jaggi <jjaggi@google.com> The big Keyguard transition refactor (8/n)

Don't force mKeyguardGoingAway, as this never recovers. Make sure
to only show the dismissing Keyguard activtiy and recover the
state when trusted state changes.

Test: Make sure Keyguard is in a trusted state, start an activity
with FLAG_DISMISS_KEYGUARD from FLAG_SHOW_WHEN_LOCKED activity
and make sure there is no flicker.

Bug: 32057734
Change-Id: I5d212f6f9d5430250b22c8370f45dc95756432d2
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
8d78693157cb3fa7ab1c9072ef913af4d67c6314 27-Oct-2016 Jorim Jaggi <jjaggi@google.com> The big keyguard transition refactor (6/n)

Cleanup:
- Make sure all the state is nicely dumped.
- Remove some unused stuff.
- Fix a flicker when occluded -> unlocked

Bug: 32057734
Change-Id: Id87e26adccef740d608b325c2dc1f6db14dd4ec3
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
fe762344f4475a3a336bb46aef2d59c1fabf32ab 13-Oct-2016 Jorim Jaggi <jjaggi@google.com> The big keyguard transition refactor (1/n)

The heart of this change are two things:
1) Instead of using the force hide mechanism to hide windows behind
Keyguard, we actually make the activities invisible in activity manager.
2) When Keyguard is going away, we change the visibilities in activity
manager and run an app transition.

At the very core we move the responsibility of hiding activities to
ActivityStack, which checks whether Keyguard is showing, and then
hides all non-show-when-locked activities. For that, we need to check
whether any window of an activity has SHOW_WHEN_LOCKED set. We
introduce a callback from WM -> AM in case these Keyguard flags have
changed.

Furthermore, we decide whether to occlude Keyguard in KeyguardController,
which just checks whether the top activity has SHOW_WHEN_LOCKED set. When
this state changes, we prepare an occlude/unocclude app transition, and
in PWM we just inform the Keyguard about the animation so SysUI can play
along this animations in a mostly synchronized manner.

Since we now use an app transition when unlocking the phone, we get
lockscreen launch animations for free - window manager automatically
waits until the activity is drawn, or directly executes the transition
if there is nothing to animate. Thus, we can remove all the infrastructure
around "waitingForActivityDrawn".

The logic to show/hide non-app windows is moved to policy, and we add the
ability to run animations on non-app windows when executing an app
transition.

Test:
1) runtest frameworks-services -c com.android.server.wm.AppTransitionTests
2) Manually test unlocking Keyguard:
2a) Without security
2b) With security
2c) With security but trusted
2d) Portrait while activity behind is in landscape
3) Test launching things from Keyguard
3a) Without security
3b) With security
3c) Launch camera without security
3d) Launch camera with security
3e) Launch camera with securtiy and trusted
3f) Launch voice affordance
4) Set no notifications on lockscreen, drag down, make sure you get
the correct animation
5) Test clicking "emergency" on bouncer
5b) Test "Emergency info" on emergency dialer
5c) Test clicking edit button on emergency info, should show pattern on
Keyguard

Bug: 32057734
Change-Id: Icada03cca74d6a612c1f988845f4d4f601087558
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
94bad8bb68f0b91feff4eab5632fa9e43478258e 10-Oct-2016 Jorim Jaggi <jjaggi@google.com> Fix dismissing window showing am: f20b1428f8 am: 84e863e02f
am: cc742ac150

Change-Id: Ic75c15688d07795fc860fa8ce9c672e668fe1ac7
f20b1428f88fa81dbde0b96236c6f893f838d40d 03-Oct-2016 Jorim Jaggi <jjaggi@google.com> Fix dismissing window showing

Only show dismissing window if we are about to unlock, and not just
in all cases. For that, set a flag to true during the process, and
reset the flag after the Keyguard has unlocked.

Test: Have a FLAG_SHOW_WHEN_LOCKED activity that starts a
FLAG_DISMISS_KEYGUARD_ACTIVITY. Check whether window is hidden
when toggling the power button. Make sure that the device is
in a trusted state during the whole test.

Change-Id: I9346dd869d1cf50a42c64a5f7c69f8e24f1e1f9b
Fixes: 31810884
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
32cbdcc8c098b4a42212b3da345b929abad8ad6e 31-Aug-2016 Jorim Jaggi <jjaggi@google.com> resolve merge conflicts of c5bafe2 to master

Change-Id: I19dd5c88c664313c2f8b47d8f8fd556f630c8bf1
6626f54e658e3da44fab8a5cd6d9d3d4852e2cd1 22-Aug-2016 Jorim Jaggi <jjaggi@google.com> Add animation when unoccluding windows (1/2)

Before there was a jump-cut when a window that was occluding Keyguard
was going away, leading to an ugly flicker. To fix this, we do the
following.

- Always show windows with FLAG_SHOW_WHEN_LOCKED above lockscreen, even
if they don't "match" the currently occluding app (which is null in the
animation case)
- Move wallpaper behind last window that is not hidden by policy, so the
window doesn't get occluded by the wallpaper.
- Add a flag in the setOccluded call whether to animate or not. SystemUI
then plays a nice animation when it's set.
- Override the animation to always be the animation that happens when we
exit a window which is revealing the wallpaper behind, to make it
consistent with the home screen case.

Fixes: 30829255
Change-Id: Ib3fe20fc9003a0f9f291c974740f044ed8707e75
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
6fb0e52b85ebd5b31626703e3e0aea212ead70ac 18-Aug-2016 Jorim Jaggi <jjaggi@google.com> Fix a flicker when returning to the lockscreen am: d11d1a9486 am: afaf4ac7a9
am: 9322632f6a

Change-Id: I9cd7ead4caa2843e3063d55ea357e9e989c72f0e
d11d1a9486d44b98e28b70c25711ebfc283b746e 17-Aug-2016 Jorim Jaggi <jjaggi@google.com> Fix a flicker when returning to the lockscreen

If we return to the lockscreen from a FLAG_SHOW_WHEN_LOCKED activity,
there was an additional black flicker as the wallpaper wasn't shown
for a couple of frames. The issue is that we didn't set the wallpaper
flag again, to fix another flicker with lockscreen wallpapers. Now,
we pass the state whether we currently have a lockscreen wallpaper
and if we don't have one, we immediately set the wallpaper flag
again.

Bug: 30829255
Bug: 30883413
Change-Id: I9faeaa77b98eb02058171ce19cf90b43826ebe9e
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
1839645126c8e7e0909e8ed8f0686c2122ba6078 28-Jul-2016 Evan Rosky <erosky@google.com> Add support for custom user-switch UI

Given config_customUserSwitchUi, AM/UserController will not show any
UI during user-switch (no dialog or screen-freeze).

Provides a mechanism (WM.setSwitchingUser) by which a custom user-switch
UI can notify WM/Keyguard when it expects a user-switch operation to
be running.

Bug: 29329555
Change-Id: Ic903fc251d7ec3a54bc6a77906d3afa45a6a5fac
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
d88eb2693b6a70af0f5fbc5881ce855e28de33aa 04-Aug-2016 Adrian Roos <roosa@google.com> Keyguard: Refactoring for improving trusted unlock while occluded

- Adds a trusted signal from Keyguard to PhoneWindowManager
- Allows PhoneWindowManager to exempt DISMISS_KEYGUARD windows from force hiding
- Allows PhoneWindowManager to dismiss Keyguard while occluded

Bug: 27410215
Change-Id: I3ad490b64a5805b6f3888a9f37fcfbdd0116395e
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
e4044bb617ea849939058d953e250fcd540c75cc 11-May-2016 Jim Miller <jaggies@google.com> Fix KeyguardManager.isSecure() to observe work profile

The fix passes the calling userId instead of the current userId to
allow apps running as managed profiles to work.

Fixes bug 28666104

Change-Id: I9f8676ab11bd581d9e67b2b9f385036d4d3576ee
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
f1cdf9558d2b7f8fe5b8cf3d309b48809f04403b 06-Apr-2016 Jorim Jaggi <jjaggi@google.com> Don't lock device when double tapping

Bug: 24265204
Change-Id: Ia19e956def454604ed3f3e3e9815fc1872ef649a
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
84dc08a208eea7a4ddf043cadbb28987cf90ae22 12-Sep-2015 Jorim Jaggi <jjaggi@google.com> Dump Keyguard state in SystemUI and PhoneWindowManager

Bug: 23970549
Change-Id: Iec1e8ac507268086e0e2935847eda606ea1fb700
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
0d210f6395072db4a4c53d4cb8fac4a59a3965b4 10-Jul-2015 Jorim Jaggi <jjaggi@google.com> Animation for touch, wake and unlock

- Add callback to inform SysUI when the screen has been unblocked
and turned on.
- Cleanup inconsistent messaging about device interactive/screen on
and off.
- Add callbacks to inform SysUI about screen states
- Implement a quick fade for the scrim after touch, wake, and unlock.
First, start with a black scrim on top of everything, and then fade
it out.
- Make sure we play the normal unlock animation when device is pulsing
- Override navigation bar animations for touch, wake and unlock: Fade
in the same manner as the scrim.

Bug: 22571198
Bug: 21855614
Change-Id: I8ff08d72cced1e0f03c78d71ff710d8a4f6b848c
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
740452e8756cb7f51ed185c3906a5ca61b8fcdd4 09-Jul-2015 Jorim Jaggi <jjaggi@google.com> Touch, wake and unlock

- Add onFingerprintAcquired, so Keyguard can grab a wakelock to prevent
the device from sleeping.
- If we get a successful fingerprint, wake the device up, immediately
dismiss the keyguard and tell PWM that we kicked off our frame that
will represent the correct state.
- PWM then waits for this frame to be drawn, and then turns on the
screen, which results in unlocking directly to the previsouly
opened app.

Bug: 21855614
Change-Id: I5f43df17fa5e4e9c6a6392eef4a4590b07df4f96
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
d175b6cfe0b35dfe251cc9315aacb048bf6e54c5 28-May-2015 Jorim Jaggi <jjaggi@google.com> Cleanup Keyguard handling when turning off screen

Before, Keyguard was shown whenever PhoneWindowManager went to sleep.
However, this was too early on some devices, and too late on others.
Now, the callbacks are split up into two phases: startedGoingToSleep
and finishedGoingToSleep. In the first callback, we decide what to
do and play the lock sound if necessary. In the second callback, we
actually show the Keyguard, or reset its state necessary, so it
doesn't interfere with the screen off animation.

Bug: 17929748
Bug: 20782303
Change-Id: I4c4406595b07b7589d64f380cd3fa96bed3d20ee
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
b10e33ff804a831c71be9303146cea892b9aeb5d 04-Feb-2015 Jorim Jaggi <jjaggi@google.com> Split up android.policy into framework.jar and services.jar 1/3

Change-Id: Ifd69f1f3dd308a7e17a1442e2f3950da8b03cec4
/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java