diff options
| author | 2022-10-14 19:47:37 +0000 | |
|---|---|---|
| committer | 2022-10-14 21:45:32 +0000 | |
| commit | 58c1dab11733cd649cf11697352bb5df1232efcd (patch) | |
| tree | 4825fa9d800660c7a8e8dac11f523fe3bae7408d | |
| parent | 27be95df6039d047b909d592f68158437063a665 (diff) | |
[DO NOT MERGE] User switcher activity - use immersive mode
Use insetscontroller to enter immersive mode, and hide the systembars,
per spec.
Test: manual - use activity, go to overview, go back, show/hide
taskbar
Fixes: 223537157
Change-Id: I40bba7f495d3983870df3abe8d2abbed1c52c81d
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/user/UserSwitcherActivity.kt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/user/UserSwitcherActivity.kt b/packages/SystemUI/src/com/android/systemui/user/UserSwitcherActivity.kt index 7f1195b78c77..7da2d47c1226 100644 --- a/packages/SystemUI/src/com/android/systemui/user/UserSwitcherActivity.kt +++ b/packages/SystemUI/src/com/android/systemui/user/UserSwitcherActivity.kt @@ -17,7 +17,8 @@ package com.android.systemui.user import android.os.Bundle -import android.view.View +import android.view.WindowInsets.Type +import android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE import androidx.activity.ComponentActivity import androidx.lifecycle.ViewModelProvider import com.android.systemui.R @@ -38,10 +39,10 @@ constructor( override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.user_switcher_fullscreen) - window.decorView.systemUiVisibility = - (View.SYSTEM_UI_FLAG_LAYOUT_STABLE or - View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or - View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) + window.decorView.getWindowInsetsController().apply { + setSystemBarsBehavior(BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE) + hide(Type.systemBars()) + } val viewModel = ViewModelProvider(this, viewModelFactory.get())[UserSwitcherViewModel::class.java] UserSwitcherViewBinder.bind( |