Merge "Ensure notif panel behavior in immersive mode" into rvc-qpr-dev
This commit is contained in:
@@ -25,7 +25,8 @@
|
|||||||
<ViewStub android:id="@+id/notification_panel_stub"
|
<ViewStub android:id="@+id/notification_panel_stub"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout="@layout/notification_panel_container"/>
|
android:layout="@layout/notification_panel_container"
|
||||||
|
android:layout_marginBottom="@dimen/car_bottom_navigation_bar_height"/>
|
||||||
|
|
||||||
<ViewStub android:id="@+id/keyguard_stub"
|
<ViewStub android:id="@+id/keyguard_stub"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -194,6 +194,12 @@
|
|||||||
<dimen name="car_navigation_bar_width">760dp</dimen>
|
<dimen name="car_navigation_bar_width">760dp</dimen>
|
||||||
<dimen name="car_left_navigation_bar_width">96dp</dimen>
|
<dimen name="car_left_navigation_bar_width">96dp</dimen>
|
||||||
<dimen name="car_right_navigation_bar_width">96dp</dimen>
|
<dimen name="car_right_navigation_bar_width">96dp</dimen>
|
||||||
|
<!-- In order to change the height of the bottom nav bar, overlay navigation_bar_height in
|
||||||
|
frameworks/base/core/res/res instead. -->
|
||||||
|
<dimen name="car_bottom_navigation_bar_height">@*android:dimen/navigation_bar_height</dimen>
|
||||||
|
<!-- In order to change the height of the top nav bar, overlay status_bar_height in
|
||||||
|
frameworks/base/core/res/res instead. -->
|
||||||
|
<dimen name="car_top_navigation_bar_height">@*android:dimen/status_bar_height</dimen>
|
||||||
|
|
||||||
<dimen name="car_user_switcher_container_height">420dp</dimen>
|
<dimen name="car_user_switcher_container_height">420dp</dimen>
|
||||||
<!-- This must be the negative of car_user_switcher_container_height for the animation. -->
|
<!-- This must be the negative of car_user_switcher_container_height for the animation. -->
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ public class SystemBarConfigs {
|
|||||||
new SystemBarConfigBuilder()
|
new SystemBarConfigBuilder()
|
||||||
.setSide(TOP)
|
.setSide(TOP)
|
||||||
.setGirth(mResources.getDimensionPixelSize(
|
.setGirth(mResources.getDimensionPixelSize(
|
||||||
com.android.internal.R.dimen.status_bar_height))
|
R.dimen.car_top_navigation_bar_height))
|
||||||
.setBarType(mResources.getInteger(R.integer.config_topSystemBarType))
|
.setBarType(mResources.getInteger(R.integer.config_topSystemBarType))
|
||||||
.setZOrder(mResources.getInteger(R.integer.config_topSystemBarZOrder))
|
.setZOrder(mResources.getInteger(R.integer.config_topSystemBarZOrder))
|
||||||
.setHideForKeyboard(mResources.getBoolean(
|
.setHideForKeyboard(mResources.getBoolean(
|
||||||
@@ -184,7 +184,7 @@ public class SystemBarConfigs {
|
|||||||
new SystemBarConfigBuilder()
|
new SystemBarConfigBuilder()
|
||||||
.setSide(BOTTOM)
|
.setSide(BOTTOM)
|
||||||
.setGirth(mResources.getDimensionPixelSize(
|
.setGirth(mResources.getDimensionPixelSize(
|
||||||
com.android.internal.R.dimen.navigation_bar_height))
|
R.dimen.car_bottom_navigation_bar_height))
|
||||||
.setBarType(mResources.getInteger(R.integer.config_bottomSystemBarType))
|
.setBarType(mResources.getInteger(R.integer.config_bottomSystemBarType))
|
||||||
.setZOrder(
|
.setZOrder(
|
||||||
mResources.getInteger(R.integer.config_bottomSystemBarZOrder))
|
mResources.getInteger(R.integer.config_bottomSystemBarZOrder))
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
package com.android.systemui.car.notification;
|
package com.android.systemui.car.notification;
|
||||||
|
|
||||||
import static android.view.WindowInsets.Type.navigationBars;
|
|
||||||
|
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.car.Car;
|
import android.car.Car;
|
||||||
import android.car.drivingstate.CarUxRestrictionsManager;
|
import android.car.drivingstate.CarUxRestrictionsManager;
|
||||||
@@ -25,6 +23,8 @@ import android.content.Context;
|
|||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.inputmethodservice.InputMethodService;
|
||||||
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.GestureDetector;
|
import android.view.GestureDetector;
|
||||||
@@ -82,6 +82,7 @@ public class NotificationPanelViewController extends OverlayPanelViewController
|
|||||||
private final StatusBarStateController mStatusBarStateController;
|
private final StatusBarStateController mStatusBarStateController;
|
||||||
private final boolean mEnableHeadsUpNotificationWhenNotificationShadeOpen;
|
private final boolean mEnableHeadsUpNotificationWhenNotificationShadeOpen;
|
||||||
private final NotificationVisibilityLogger mNotificationVisibilityLogger;
|
private final NotificationVisibilityLogger mNotificationVisibilityLogger;
|
||||||
|
private final int mNavBarHeight;
|
||||||
|
|
||||||
private float mInitialBackgroundAlpha;
|
private float mInitialBackgroundAlpha;
|
||||||
private float mBackgroundAlphaDiff;
|
private float mBackgroundAlphaDiff;
|
||||||
@@ -138,7 +139,10 @@ public class NotificationPanelViewController extends OverlayPanelViewController
|
|||||||
mStatusBarStateController = statusBarStateController;
|
mStatusBarStateController = statusBarStateController;
|
||||||
mNotificationVisibilityLogger = notificationVisibilityLogger;
|
mNotificationVisibilityLogger = notificationVisibilityLogger;
|
||||||
|
|
||||||
|
mNavBarHeight = mResources.getDimensionPixelSize(R.dimen.car_bottom_navigation_bar_height);
|
||||||
|
|
||||||
mCommandQueue.addCallback(this);
|
mCommandQueue.addCallback(this);
|
||||||
|
|
||||||
// Notification background setup.
|
// Notification background setup.
|
||||||
mInitialBackgroundAlpha = (float) mResources.getInteger(
|
mInitialBackgroundAlpha = (float) mResources.getInteger(
|
||||||
R.integer.config_initialNotificationBackgroundAlpha) / 100;
|
R.integer.config_initialNotificationBackgroundAlpha) / 100;
|
||||||
@@ -179,6 +183,21 @@ public class NotificationPanelViewController extends OverlayPanelViewController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition,
|
||||||
|
boolean showImeSwitcher) {
|
||||||
|
if (mContext.getDisplayId() != displayId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
|
||||||
|
int bottomMargin = isKeyboardVisible ? 0 : mNavBarHeight;
|
||||||
|
ViewGroup container = (ViewGroup) getLayout();
|
||||||
|
ViewGroup.MarginLayoutParams params =
|
||||||
|
(ViewGroup.MarginLayoutParams) container.getLayoutParams();
|
||||||
|
params.setMargins(params.leftMargin, params.topMargin, params.rightMargin, bottomMargin);
|
||||||
|
container.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
|
||||||
// OverlayViewController
|
// OverlayViewController
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -204,7 +223,7 @@ public class NotificationPanelViewController extends OverlayPanelViewController
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getInsetTypesToFit() {
|
protected int getInsetTypesToFit() {
|
||||||
return navigationBars();
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user