Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopWallpaperActivity.kt +10 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopWallpaperActivity.kt +10 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading