This reverts commit 0f53fd20d5.
The previous version of this didn't account for padding in onMeasure
(I'd taken this out when copying from FrameLayout, as I didn't think we
used padding), which is applied based on window insets. Tests also added
to check this case.
Forwards we go again :)
Bug: 170858298
Test: Included. Manually tested on phone, with feature enabled too; PIN/Pattern/Password all render correctly.
Change-Id: I7b1f35a185214ffdd2187f1c059f77535197a215
I'd like to test other things (like tap makes the IME move), but to do
that means replacing the mock with a proper fake. That can come later,
but this at least tests that the flagging works correctly.
The changes between this and
commit cae34b8e22 is the bouncer height is
now measured using wrap_content, so the placement can be controlled
properly by the outer View (as the position of the bouncer changes
depending on the size of the screen).
This reverts commit cae34b8e22.
Test: Included
Bug: 170858298
Change-Id: I18428a6df9abf0e8e37c1c179be6843e4eee793c
We assumed that the KeyguardSecurityContainer could only have one child;
that assumption was incorrect. Updated code to (1) explicitly search for
KeyguardSecurityViewFlipper when it is required, and (2) measure
multiple children in onMeasure.
Test: Verified with atest
CtsDevicePolicyManagerTestCases: com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSecondaryLockscreen
Bug: 179313275
Change-Id: Iaec57d70c33149e0a2a6867efd9c9ba09d9d6946
This is currently enabled by settings
persist.sysui.keyguard.one_handed_keyguard_enabled to true. If enabled,
this will cause "one-handed able" security modes to be measured with
half of the width of the SecurityViewContainer. Tapping either side of
the screen will then move the keyguard by changing the margins.
There's some flaws here, but it's a start. There's a frame of the
bouncer being on the wrong side of the screen if the keyguard is on the
right, and it doesn't respond to opening/closing the device properly yet.
Bug: b/170858298
Change-Id: Ib997b9b3cb4ca7a069c805c7a8f3a79434eebd4c
Test: Incoming :)
Password bouncer: animate the text field alpha and y positioning along
with the IME reveal. Also fix the ordering of focus events to ensure
the soft keyboard appears.
Fixes: 174020436
Fixes: 175243820
Test: SystemUITests
Change-Id: I62898870f57da1cd5b3da6bc4a2cfb23fe95097f
This CL also refines the color view logic which checks the system bar
appearance instead of system UI flags.
Bug: 149813814
Test: atest InsetsAnimationControlImplTest InsetsControllerTest
InsetsStateTest InsetsPolicyTest InsetsStateControllerTest
Change-Id: I26d93b3508c84e436133085bd316ade54d00d76a
KeyguardInputView no longer implements KeyguardSecurityView.
This cl seeks to clean up some of the lingering vestiges from this
large chain of refactors.
I have manually tested none, swipe, pattern, pin, and password views
for successfully unlocking, as well as multiple failed attempts
resulting in temporary lock outs.
Fixes: 166448040
Test: atest SystemUITests && manual
Change-Id: I36275598001184e774677cf2dbb16dec8dc7ab5b
Move the guts of KeyguardSecurityContainer into
KeyguardSecurityContainerController. This removes a lot of
Dependency#get calls, and is another step towards simplifying our
view inflation process.
CustomViews that previously implemented KeyguardSecurityView now
all extend KeyguardInputView, allowing them to be simultaneously
treated as one while also being recognized as a View (the interface
required a lot of casting back and forth to a View).
LockscreenUtil is made a Singleton in this CL.
Bug: 166448040
Test: atest SystemUITests && manual
Change-Id: I6fa05012c55f5e003ab551d2f8360891a62fa2a7
This removes the factory method from SystemUIFactory that built the
KeyguardBouncer and moves it into its own subcomponent. This is the
first step in removing view injection from the last keygard related
views.
Bug: 166448040
Test: manual
Change-Id: I4a682f324dcee6d506b0f286f8f61682f9777859
It is far easier to move _everything_ into SysUIComponent, and then
selectively promote things back to GlobalScope and/or WMScope than
it is to try to do it one at a time. With this change, though lots
of files are touched, very little actually changes structurally.
After this change goes in, folks should stop using @Singleton quite
so freely. Most things should live in @SysuiSingleton. @Singleton
is due to quickly be replaced by @GlobalScope.
Bug: 162923491
Test: atest SystemUITests && manual
Change-Id: Idc31d3d83b030581fb1fa869f7fafc4f2d3a8828
This class used unnecessarily complex subcomponent and module
initialization.
I am simplifyhing this class in anticipation of moving a great deal
of code from the GlobalRootComponent into the SysUIRootComponent.
Bug: 162923491
Test: manual
Change-Id: I5e8808d43742925af5bdedf1bbcf6193e1527065
Make sure IME animation aligns with overall timing of disappear
animation. Otherwise, there will be jank. For that, we just do
1/4 of the height and fade it out as well.
Bug: 156367695
Change-Id: I9b35cf493895b7206bf12208a531e35dbefff1fc
When swiping down from the top of the screen to dismiss the bouncer,
the input field should hide the keyboard, otherwise it would get stuck
on the lock screen.
Test: manual
Test: atest KeyguardHostViewTest
Test: atest KeyguardBouncerTest
Fixes: 154245193
Fixes: 152882608
Change-Id: I99ee2cff85df1ab0b6544e9b5b472e105fca7b72
For implementations of DevicePolicyKeyguardService to provide a SurfacePackage via SurfaceControlViewHost, they must be running on the UI thread.
Additionally, fix dismissal logic to bypass re-checking the secondary lockscreen, and add defensive null checks.
Bug: 136085151
Bug: 151365616
Test: atest AdminSecondaryLockScreenControllerTest
Test: atest KeyguardUpdateMonitorTest
Change-Id: Ibcd7090f50831cddbf952914adf020015750afd8
Bouncer would get stuck if authentication method changed after view
inflation.
Bug: 149773776
Bug: 149828540
Test: atest PlatformScenarioTests:android.platform.test.scenario.sysui.lockscreen.LockscreenWithInvalidPIN
Change-Id: I39ee2ec2e2ba9b6cf7dfba6b8141efc8b380b48e
Previously we passed back a SurfaceControl to the keyguard, updated to pass a SurfacePackage instead. The updated SurfaceControlViewHost logic addresses underlying accessibility bugs.
Bug: 136085151
Test: atest AdminSecondaryLockScreenControllerTest
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I4881d5766f118b99f497ee306cd71d3c5a65a2f3
- Layout of notif shade is no longer custom, so need to handle
insetsIgnoringVisibility on client.
- Do not special case Keyguard anymore. Just treat it as regular
control target.
- No more special sauce to hide navigation bar on Keyguard.
- Treat it as BEHAVIOR_SHOW_TRANSIENT_BARS_ON_SWIPE but don't
actually do that in DisplayPolicy
Test: InsetsPolicyTest
Test: Lockscreen with PIN
Bug: 118118435
Change-Id: I1edce4fdb792fd97a181165a03957ba5d6d3e551
The new DPM API allows DP/POs to set whether the keyguard needs to show a secondary lockscreen after the primary locking mechanism is dismissed. If enabled, the keyguard will check for a service handling ACTION_BIND_SECONDARY_LOCKSCREEN_SERVICE and request the secondary lockscreen content from it.
Bug: 136085151
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest KeyguardUpdateMonitorTest
Test: atest AdminSecondaryLockScreenControllerTest
Change-Id: If82921b4fc2d78c0522a20ef91b48f9a93dd8b61
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by *StatsLog.java
that is autogenerated for each module.
This CL adds autogenerated SysUiStatsLog to SystemUI and replaces usages
of StatsLog with SysUiStatsLog.
Since the write calls in SysUiStatsLog are public, StatsLogCompat is no
longer needed.
Bug: 145952197
Test: m
Test: fastboot flashall
Test: adb shell cmd stats print-logs && adb logcat "*:S statsd:*"
Change-Id: I192ff29d21cedbe715bb02ffa05921b4912af371
This is to attempt erasing any lockscreen password remnants from memory,
which is a NIAP certification requirement.
Bug: 142861621
Test: reboot device, enter lockscreen password, then use pmdump to dump
process memory for SystemUi, verify password does not exist in the dump.
Change-Id: Ifbec81a64e4c592b566f5653bd93fd7326693ec7
The PIN area can be dragged vertically to retry face auth,
the touch slope was already scaled up to avoid accidental
drags but some users still reported that taps were being
ignored. This CL increases the touch slope size.
Fixes: 140030986
Bug: 141873371
Test: manual
Change-Id: I8db78942797f2c44caf9c9bdc0ec693e6c6a65f9
The view is just proxying to an underyling object. Query the object directly.
Bug: 140059518
Test: atest SystemUITests.
Change-Id: I797f7c6a3d8734795d8a34a3709eaeed2e571dfa
Merging UnlockMethodCache and KeyguardMonitor into KeyguardStateController,
making it injectable and introducing KeyguardStateController#isUnlocked
in order to make it easier to keep track of the lock screen state.
Test: atest SystemUiTests
Test: unlock with face, lock again
Test: unlock with password, lock again
Bug: 139363827
Change-Id: I37ac8c7826101852c61382559be9868125c15fac
Test: presubmit setup on source branch
Bug: 130289146 Create a Gradle build for SystemUI
Bug: 136279712 Daggerize FalsingManager
Bug: 137324767 "Unable to instantiate service com.android.systemui.doze.DozeService" exception breaks launcher tests
Bug: 137563419 Remove Bouncer reveal delay from bypass flow
Bug: 138787339 Allow Services and Activities to be injected into directly.
Bug: 139128921 [AS 3.5 RC2, SDK API 29 rev 2] Overload resolution ambiguity: while removing element from HashMap
Bug: 64712476 Import translations for dev branches
Change-Id: Ib7fd4706c070907fd556c3532957f3b1b046de6d
This CL introduces a way of blocking IPCs on the main thread.
This is enforced by StrictMode, and enabled on tests and eng
builds.
All current blocking IPCs were whitelisted and bugs will be
filed, in order to fix them for R.
Bug: 139360025
Test: adb logcat
Test: atest SystemUITests
Change-Id: I45af2619605ee36b6bae83ef080272c62754b654
We don't want the bouncer to be dismissed right under the user's finger
when typing.
Let's abort face auth after we start typing.
Test: solve challenge when face auth is running
Test: repeat for pin/pattern/password
Fixes: 136525169
Change-Id: I8f1ccbca4be9c84f5cb108618b84aefe03b74cc4
User should still be able to swipe up to retry or still see
the bypass lock screen when face auth is disabled or sim
card is locked. Having different UX on those cases is
confusing.
Bug: 138125943
Change-Id: Iece4d28e7a988af846c9e8aa9eb0fff5a1d74249
Fixes the issue where only one SIM's PIN is checked when unlocking.
This undoes behavior changes introduced in aosp/769050
Test: manually verify with single and dual SIM that SIM PIN functions
correctly with different lockscreen settings
Bug: 135496265
Change-Id: I8db4565c4e5d5bcfb166b5962e878531a84dbafb
Retrying auth, or succeeding is a strong signal that the user
is present. The device should not sleep, otherwise the keyguard
will be dismissed (as it should) but not automatically locked,
since screen timaeouts don't lock instantly.
Test: Manual
Fixes: 135967964
Change-Id: I9a8bcf0ddb80536719d093aab9e00c76d87ad24b
Test: drag accross pattern
Test: start dragging from edges
Test: start drawing, drag outside the bounds
Test: repeat on small and large device
Fixes: 132687980
Change-Id: Idab9279dd7cb002cbd43aab0ce1d48f265d39f04