Loading core/java/android/view/InsetsSourceConsumer.java +3 −2 Original line number Diff line number Diff line Loading @@ -181,8 +181,9 @@ public class InsetsSourceConsumer { } private void applyHiddenToControl() { if (mSourceControl == null || mSourceControl.getLeash() == null || mController.getAnimationType(mType) != ANIMATION_TYPE_NONE) { // TODO: Handle case properly when animation is running already (it shouldn't!) if (mSourceControl == null || mSourceControl.getLeash() == null) { return; } Loading packages/SystemUI/src/com/android/keyguard/KeyguardHostView.java +0 −9 Original line number Diff line number Diff line Loading @@ -409,15 +409,6 @@ public class KeyguardHostView extends FrameLayout implements SecurityCallback { mAudioManager.dispatchMediaKeyEvent(keyEvent); } @Override public void dispatchSystemUiVisibilityChanged(int visibility) { super.dispatchSystemUiVisibilityChanged(visibility); if (!(mContext instanceof Activity)) { setSystemUiVisibility(STATUS_BAR_DISABLE_BACK); } } /** * In general, we enable unlocking the insecure keyguard with the menu key. However, there are * some cases where we wish to disable it, notably when the menu button placement or technology Loading packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +19 −4 Original line number Diff line number Diff line Loading @@ -15,7 +15,12 @@ */ package com.android.keyguard; import static android.view.ViewRootImpl.NEW_INSETS_MODE_FULL; import static android.view.ViewRootImpl.sNewInsetsMode; import static android.view.WindowInsets.Type.ime; import static android.view.WindowInsets.Type.systemBars; import static com.android.systemui.DejankUtils.whitelistIpcs; import static java.lang.Integer.max; import android.app.Activity; import android.app.AlertDialog; Loading @@ -38,6 +43,7 @@ import android.view.SurfaceControl; import android.view.VelocityTracker; import android.view.View; import android.view.ViewConfiguration; import android.view.WindowInsets; import android.view.WindowManager; import android.widget.FrameLayout; Loading Loading @@ -339,12 +345,21 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe } @Override protected boolean fitSystemWindows(Rect insets) { public WindowInsets onApplyWindowInsets(WindowInsets insets) { // Consume bottom insets because we're setting the padding locally (for IME and navbar.) setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), insets.bottom); insets.bottom = 0; return false; int inset; if (sNewInsetsMode == NEW_INSETS_MODE_FULL) { int bottomInset = insets.getInsetsIgnoringVisibility(systemBars()).bottom; int imeInset = insets.getInsets(ime()).bottom; inset = max(bottomInset, imeInset); } else { inset = insets.getSystemWindowInsetBottom(); } setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), inset); return insets.inset(0, 0, 0, inset); } private void showDialog(String title, String message) { if (mAlertDialog != null) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java +9 −0 Original line number Diff line number Diff line Loading @@ -16,8 +16,10 @@ package com.android.systemui.statusbar.phone; import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_BEHAVIOR_CONTROLLED; import static com.android.systemui.DejankUtils.whitelistIpcs; import static com.android.systemui.statusbar.NotificationRemoteInputManager.ENABLE_REMOTE_INPUT; Loading Loading @@ -180,6 +182,13 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mLp.setTitle("NotificationShade"); mLp.packageName = mContext.getPackageName(); mLp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; // We use BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE here, however, there is special logic in // window manager which disables the transient show behavior. // TODO: Clean this up once that behavior moves into the Shell. mLp.privateFlags |= PRIVATE_FLAG_BEHAVIOR_CONTROLLED; mLp.insetsFlags.behavior = BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE; mWindowManager.addView(mNotificationShadeView, mLp); mLpChanged.copyFrom(mLp); onThemeChanged(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +15 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ package com.android.systemui.statusbar.phone; import static android.view.ViewRootImpl.NEW_INSETS_MODE_FULL; import static android.view.ViewRootImpl.sNewInsetsMode; import static android.view.WindowInsets.Type.navigationBars; import static com.android.systemui.plugins.ActivityStarter.OnDismissAction; import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_UNLOCK_FADING; import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK; Loading Loading @@ -789,8 +792,13 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb private Runnable mMakeNavigationBarVisibleRunnable = new Runnable() { @Override public void run() { if (ViewRootImpl.sNewInsetsMode == NEW_INSETS_MODE_FULL) { mStatusBar.getNotificationShadeWindowView().getWindowInsetsController() .show(navigationBars()); } else { mStatusBar.getNavigationBarView().getRootView().setVisibility(View.VISIBLE); } } }; protected void updateStates() { Loading Loading @@ -856,10 +864,15 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } } else { mContainer.removeCallbacks(mMakeNavigationBarVisibleRunnable); if (sNewInsetsMode == NEW_INSETS_MODE_FULL) { mStatusBar.getNotificationShadeWindowView().getWindowInsetsController() .hide(navigationBars()); } else { mStatusBar.getNavigationBarView().getRootView().setVisibility(View.GONE); } } } } /** * @return Whether the navigation bar should be made visible based on the current state. Loading Loading
core/java/android/view/InsetsSourceConsumer.java +3 −2 Original line number Diff line number Diff line Loading @@ -181,8 +181,9 @@ public class InsetsSourceConsumer { } private void applyHiddenToControl() { if (mSourceControl == null || mSourceControl.getLeash() == null || mController.getAnimationType(mType) != ANIMATION_TYPE_NONE) { // TODO: Handle case properly when animation is running already (it shouldn't!) if (mSourceControl == null || mSourceControl.getLeash() == null) { return; } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardHostView.java +0 −9 Original line number Diff line number Diff line Loading @@ -409,15 +409,6 @@ public class KeyguardHostView extends FrameLayout implements SecurityCallback { mAudioManager.dispatchMediaKeyEvent(keyEvent); } @Override public void dispatchSystemUiVisibilityChanged(int visibility) { super.dispatchSystemUiVisibilityChanged(visibility); if (!(mContext instanceof Activity)) { setSystemUiVisibility(STATUS_BAR_DISABLE_BACK); } } /** * In general, we enable unlocking the insecure keyguard with the menu key. However, there are * some cases where we wish to disable it, notably when the menu button placement or technology Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +19 −4 Original line number Diff line number Diff line Loading @@ -15,7 +15,12 @@ */ package com.android.keyguard; import static android.view.ViewRootImpl.NEW_INSETS_MODE_FULL; import static android.view.ViewRootImpl.sNewInsetsMode; import static android.view.WindowInsets.Type.ime; import static android.view.WindowInsets.Type.systemBars; import static com.android.systemui.DejankUtils.whitelistIpcs; import static java.lang.Integer.max; import android.app.Activity; import android.app.AlertDialog; Loading @@ -38,6 +43,7 @@ import android.view.SurfaceControl; import android.view.VelocityTracker; import android.view.View; import android.view.ViewConfiguration; import android.view.WindowInsets; import android.view.WindowManager; import android.widget.FrameLayout; Loading Loading @@ -339,12 +345,21 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe } @Override protected boolean fitSystemWindows(Rect insets) { public WindowInsets onApplyWindowInsets(WindowInsets insets) { // Consume bottom insets because we're setting the padding locally (for IME and navbar.) setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), insets.bottom); insets.bottom = 0; return false; int inset; if (sNewInsetsMode == NEW_INSETS_MODE_FULL) { int bottomInset = insets.getInsetsIgnoringVisibility(systemBars()).bottom; int imeInset = insets.getInsets(ime()).bottom; inset = max(bottomInset, imeInset); } else { inset = insets.getSystemWindowInsetBottom(); } setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), inset); return insets.inset(0, 0, 0, inset); } private void showDialog(String title, String message) { if (mAlertDialog != null) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java +9 −0 Original line number Diff line number Diff line Loading @@ -16,8 +16,10 @@ package com.android.systemui.statusbar.phone; import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_BEHAVIOR_CONTROLLED; import static com.android.systemui.DejankUtils.whitelistIpcs; import static com.android.systemui.statusbar.NotificationRemoteInputManager.ENABLE_REMOTE_INPUT; Loading Loading @@ -180,6 +182,13 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mLp.setTitle("NotificationShade"); mLp.packageName = mContext.getPackageName(); mLp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; // We use BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE here, however, there is special logic in // window manager which disables the transient show behavior. // TODO: Clean this up once that behavior moves into the Shell. mLp.privateFlags |= PRIVATE_FLAG_BEHAVIOR_CONTROLLED; mLp.insetsFlags.behavior = BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE; mWindowManager.addView(mNotificationShadeView, mLp); mLpChanged.copyFrom(mLp); onThemeChanged(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +15 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ package com.android.systemui.statusbar.phone; import static android.view.ViewRootImpl.NEW_INSETS_MODE_FULL; import static android.view.ViewRootImpl.sNewInsetsMode; import static android.view.WindowInsets.Type.navigationBars; import static com.android.systemui.plugins.ActivityStarter.OnDismissAction; import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_UNLOCK_FADING; import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK; Loading Loading @@ -789,8 +792,13 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb private Runnable mMakeNavigationBarVisibleRunnable = new Runnable() { @Override public void run() { if (ViewRootImpl.sNewInsetsMode == NEW_INSETS_MODE_FULL) { mStatusBar.getNotificationShadeWindowView().getWindowInsetsController() .show(navigationBars()); } else { mStatusBar.getNavigationBarView().getRootView().setVisibility(View.VISIBLE); } } }; protected void updateStates() { Loading Loading @@ -856,10 +864,15 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } } else { mContainer.removeCallbacks(mMakeNavigationBarVisibleRunnable); if (sNewInsetsMode == NEW_INSETS_MODE_FULL) { mStatusBar.getNotificationShadeWindowView().getWindowInsetsController() .hide(navigationBars()); } else { mStatusBar.getNavigationBarView().getRootView().setVisibility(View.GONE); } } } } /** * @return Whether the navigation bar should be made visible based on the current state. Loading