Skip to content

Commit

Permalink
SystemUI: Add SCREEN_GESTURE as a CameraLaunchSourceModel
Browse files Browse the repository at this point in the history
This fixes a SystemUI crash while launching camera with any off-screen gestures, logging it as follows:

08-13 11:13:59.748  4947  4947 D AndroidRuntime: Shutting down VM
08-13 11:13:59.749  4947  4947 E AndroidRuntime: FATAL EXCEPTION: main
08-13 11:13:59.749  4947  4947 E AndroidRuntime: Process: com.android.systemui, PID: 4947
08-13 11:13:59.749  4947  4947 E AndroidRuntime: java.lang.IllegalArgumentException: Invalid CameraLaunchSourceModel value: 4
08-13 11:13:59.749  4947  4947 E AndroidRuntime:   at com.android.systemui.keyguard.domain.interactor.KeyguardInteractor$onCameraLaunchDetected$1$callback$1.onCameraLaunchGestureDetected(KeyguardInteractor.kt:29)
08-13 11:13:59.749  4947  4947 E AndroidRuntime:   at com.android.systemui.statusbar.CommandQueue$H.handleMessage(CommandQueue.java:1743)
08-13 11:13:59.749  4947  4947 E AndroidRuntime:   at android.os.Handler.dispatchMessage(Handler.java:106)
08-13 11:13:59.749  4947  4947 E AndroidRuntime:   at android.os.Looper.loopOnce(Looper.java:201)
08-13 11:13:59.749  4947  4947 E AndroidRuntime:   at android.os.Looper.loop(Looper.java:288)
08-13 11:13:59.749  4947  4947 E AndroidRuntime:   at android.app.ActivityThread.main(ActivityThread.java:7979)
08-13 11:13:59.749  4947  4947 E AndroidRuntime:   at java.lang.reflect.Method.invoke(Native Method)
08-13 11:13:59.749  4947  4947 E AndroidRuntime:   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
08-13 11:13:59.749  4947  4947 E AndroidRuntime:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)

Change-Id: Ieca3bbbac9e91d56b748ff1f9aa2501c5f886d78
  • Loading branch information
resist15 authored and basamaryan committed Aug 14, 2023
1 parent 516b2cd commit b64ed53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -195,6 +195,8 @@ constructor(
CameraLaunchSourceModel.LIFT_TRIGGER
StatusBarManager.CAMERA_LAUNCH_SOURCE_QUICK_AFFORDANCE ->
CameraLaunchSourceModel.QUICK_AFFORDANCE
StatusBarManager.CAMERA_LAUNCH_SOURCE_SCREEN_GESTURE ->
CameraLaunchSourceModel.SCREEN_GESTURE
else -> throw IllegalArgumentException("Invalid CameraLaunchSourceModel value: $value")
}
}
Expand Down
Expand Up @@ -25,4 +25,6 @@ enum class CameraLaunchSourceModel {
LIFT_TRIGGER,
/** Quick affordance button has been pressed */
QUICK_AFFORDANCE,
/** OffScreen Gestures Have Been Triggered **/
SCREEN_GESTURE,
}

0 comments on commit b64ed53

Please sign in to comment.