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

Commit aa475e91 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Desks: Default DesktopWallpaperActivity focusability to false" into main

parents edea2725 75cb4640
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -37,7 +37,16 @@ class DesktopWallpaperActivity : Activity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        updateFocusableFlag(focusable = true)
        Log.d(TAG, "onCreate")
        // Set to |false| by default. This shouldn't matter because
        // [Activity#onTopResumedActivityChanged] is supposed to be called after [onResume] which
        // should set the correct state. However, there's a lifecycle bug that causes it not to
        // be called after [onCreate] (see b/416700931) and may leave the wallpaper touchable after
        // entering desktop mode with another app. To prevent this make it not focusable by
        // default, as it is more likely a user will enter desktop with a task than without one
        // (entering through an empty desk may result in a reversed bug: unfocusable when we wanted
        // it to be focusable).
        updateFocusableFlag(focusable = false)
    }

    override fun onTopResumedActivityChanged(isTopResumedActivity: Boolean) {