Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 613af531 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

Fixes bug where the camera app would launch below the lock-screen

In ag/19119857, we accidentally removed the logic that would dismiss the non-secure
"swipe" screen lock when the camera app would be launched by a
double-tap on the power button. This CL fixes that.

Test: manually verified the following:
1. With Screen Lock set to an insecure "Swipe", when the screen is locked,
   double-tapping the power button opens the camera app *on top of the
   lock-screen*. Hitting the back button when the camera app is in the
   foreground returns to the **unlocked** home screen
2. With Screen Lock set to a secure "Pattern", when the screen is locked,
   double-tapping the power button opens the camera app *on top of the
   lock-screen*. Hitting the back button when the camera app is in the
   foreground returns to the locked lock-screen
3. When unlocked and on the home screen, double-tapping the power button
   brings the camera app to the foreground. Hitting the back button
   returns to the home screen
Bug: b/235403546, b/238277981

Change-Id: I39b7c8ce2b93d9e95c89ab5625870e6263f77b70
parent 9b723322
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -125,6 +125,13 @@ class CameraGestureHelper @Inject constructor(
            // launched from behind the lock-screen.
            activityStarter.startActivity(intent, false /* dismissShade */)
        }

        // Call this to make sure that the keyguard returns if the app that is being launched
        // crashes after a timeout.
        centralSurfaces.startLaunchTransitionTimeout()
        // Call this to make sure the keyguard is ready to be dismissed once the next intent is
        // handled by the OS (in our case it is the activity we started right above)
        centralSurfaces.readyForKeyguardDone()
    }

    /**