DO NOT MERGE Enable hiding system bars by side when IME appears.
Bug: 167593045 Test: Manual + Unit Tests Change-Id: Ib0c2c70e2df361f5cce156315c7fd4ae489ae279
This commit is contained in:
@@ -53,6 +53,16 @@
|
|||||||
<integer name="config_rightSystemBarZOrder">0</integer>
|
<integer name="config_rightSystemBarZOrder">0</integer>
|
||||||
<integer name="config_bottomSystemBarZOrder">10</integer>
|
<integer name="config_bottomSystemBarZOrder">10</integer>
|
||||||
|
|
||||||
|
<!-- If set to true, the corresponding system bar will be hidden when Keyboard (IME) appears.
|
||||||
|
NOTE: hideBottomSystemBarKeyboard must not be overlaid directly here. To change its value,
|
||||||
|
overlay config_automotiveHideNavBarForKeyboard in framework/base/core/res/res. -->
|
||||||
|
<bool name="config_hideTopSystemBarForKeyboard">false</bool>
|
||||||
|
<bool name="config_hideBottomSystemBarForKeyboard">
|
||||||
|
@*android:bool/config_automotiveHideNavBarForKeyboard
|
||||||
|
</bool>
|
||||||
|
<bool name="config_hideLeftSystemBarForKeyboard">false</bool>
|
||||||
|
<bool name="config_hideRightSystemBarForKeyboard">false</bool>
|
||||||
|
|
||||||
<!-- Disable normal notification rendering; we handle that ourselves -->
|
<!-- Disable normal notification rendering; we handle that ourselves -->
|
||||||
<bool name="config_renderNotifications">false</bool>
|
<bool name="config_renderNotifications">false</bool>
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,11 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
|||||||
private ActivityManagerWrapper mActivityManagerWrapper;
|
private ActivityManagerWrapper mActivityManagerWrapper;
|
||||||
|
|
||||||
// If the nav bar should be hidden when the soft keyboard is visible.
|
// If the nav bar should be hidden when the soft keyboard is visible.
|
||||||
private boolean mHideNavBarForKeyboard;
|
private boolean mHideTopBarForKeyboard;
|
||||||
|
private boolean mHideLeftBarForKeyboard;
|
||||||
|
private boolean mHideRightBarForKeyboard;
|
||||||
|
private boolean mHideBottomBarForKeyboard;
|
||||||
|
|
||||||
private boolean mBottomNavBarVisible;
|
private boolean mBottomNavBarVisible;
|
||||||
|
|
||||||
// Nav bar views.
|
// Nav bar views.
|
||||||
@@ -160,8 +164,13 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
|||||||
@Override
|
@Override
|
||||||
public void start() {
|
public void start() {
|
||||||
// Set initial state.
|
// Set initial state.
|
||||||
mHideNavBarForKeyboard = mResources.getBoolean(
|
mHideTopBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.TOP);
|
||||||
com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard);
|
mHideBottomBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(
|
||||||
|
SystemBarConfigs.BOTTOM);
|
||||||
|
mHideLeftBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.LEFT);
|
||||||
|
mHideRightBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(
|
||||||
|
SystemBarConfigs.RIGHT);
|
||||||
|
|
||||||
mBottomNavBarVisible = false;
|
mBottomNavBarVisible = false;
|
||||||
|
|
||||||
// Connect into the status bar manager service
|
// Connect into the status bar manager service
|
||||||
@@ -407,17 +416,30 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
|||||||
@Override
|
@Override
|
||||||
public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition,
|
public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition,
|
||||||
boolean showImeSwitcher) {
|
boolean showImeSwitcher) {
|
||||||
if (!mHideNavBarForKeyboard) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mContext.getDisplayId() != displayId) {
|
if (mContext.getDisplayId() != displayId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
|
boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
|
||||||
mCarNavigationBarController.setBottomWindowVisibility(
|
|
||||||
isKeyboardVisible ? View.GONE : View.VISIBLE);
|
if (mHideTopBarForKeyboard) {
|
||||||
|
mCarNavigationBarController.setTopWindowVisibility(
|
||||||
|
isKeyboardVisible ? View.GONE : View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mHideBottomBarForKeyboard) {
|
||||||
|
mCarNavigationBarController.setBottomWindowVisibility(
|
||||||
|
isKeyboardVisible ? View.GONE : View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mHideLeftBarForKeyboard) {
|
||||||
|
mCarNavigationBarController.setLeftWindowVisibility(
|
||||||
|
isKeyboardVisible ? View.GONE : View.VISIBLE);
|
||||||
|
}
|
||||||
|
if (mHideRightBarForKeyboard) {
|
||||||
|
mCarNavigationBarController.setRightWindowVisibility(
|
||||||
|
isKeyboardVisible ? View.GONE : View.VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -79,9 +79,7 @@ public class CarNavigationBarController {
|
|||||||
* Hides all system bars.
|
* Hides all system bars.
|
||||||
*/
|
*/
|
||||||
public void hideBars() {
|
public void hideBars() {
|
||||||
if (mTopView != null) {
|
setTopWindowVisibility(View.GONE);
|
||||||
mTopView.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
setBottomWindowVisibility(View.GONE);
|
setBottomWindowVisibility(View.GONE);
|
||||||
setLeftWindowVisibility(View.GONE);
|
setLeftWindowVisibility(View.GONE);
|
||||||
setRightWindowVisibility(View.GONE);
|
setRightWindowVisibility(View.GONE);
|
||||||
@@ -91,9 +89,7 @@ public class CarNavigationBarController {
|
|||||||
* Shows all system bars.
|
* Shows all system bars.
|
||||||
*/
|
*/
|
||||||
public void showBars() {
|
public void showBars() {
|
||||||
if (mTopView != null) {
|
setTopWindowVisibility(View.VISIBLE);
|
||||||
mTopView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
setBottomWindowVisibility(View.VISIBLE);
|
setBottomWindowVisibility(View.VISIBLE);
|
||||||
setLeftWindowVisibility(View.VISIBLE);
|
setLeftWindowVisibility(View.VISIBLE);
|
||||||
setRightWindowVisibility(View.VISIBLE);
|
setRightWindowVisibility(View.VISIBLE);
|
||||||
@@ -135,6 +131,11 @@ public class CarNavigationBarController {
|
|||||||
return mShowRight ? mNavigationBarViewFactory.getRightWindow() : null;
|
return mShowRight ? mNavigationBarViewFactory.getRightWindow() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Toggles the top nav bar visibility. */
|
||||||
|
public boolean setTopWindowVisibility(@View.Visibility int visibility) {
|
||||||
|
return setWindowVisibility(getTopWindow(), visibility);
|
||||||
|
}
|
||||||
|
|
||||||
/** Toggles the bottom nav bar visibility. */
|
/** Toggles the bottom nav bar visibility. */
|
||||||
public boolean setBottomWindowVisibility(@View.Visibility int visibility) {
|
public boolean setBottomWindowVisibility(@View.Visibility int visibility) {
|
||||||
return setWindowVisibility(getBottomWindow(), visibility);
|
return setWindowVisibility(getBottomWindow(), visibility);
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ public class SystemBarConfigs {
|
|||||||
readConfigs();
|
readConfigs();
|
||||||
checkEnabledBarsHaveUniqueBarTypes();
|
checkEnabledBarsHaveUniqueBarTypes();
|
||||||
checkSystemBarEnabledForNotificationPanel();
|
checkSystemBarEnabledForNotificationPanel();
|
||||||
|
checkHideBottomBarForKeyboardConfigSync();
|
||||||
setInsetPaddingsForOverlappingCorners();
|
setInsetPaddingsForOverlappingCorners();
|
||||||
sortSystemBarSidesByZOrder();
|
sortSystemBarSidesByZOrder();
|
||||||
}
|
}
|
||||||
@@ -122,6 +123,11 @@ public class SystemBarConfigs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean getHideForKeyboardBySide(@SystemBarSide int side) {
|
||||||
|
return mSystemBarConfigMap.get(side) != null
|
||||||
|
&& mSystemBarConfigMap.get(side).getHideForKeyboard();
|
||||||
|
}
|
||||||
|
|
||||||
protected void insetSystemBar(@SystemBarSide int side, CarNavigationBarView view) {
|
protected void insetSystemBar(@SystemBarSide int side, CarNavigationBarView view) {
|
||||||
int[] paddings = mSystemBarConfigMap.get(side).getPaddings();
|
int[] paddings = mSystemBarConfigMap.get(side).getPaddings();
|
||||||
view.setPadding(paddings[2], paddings[0], paddings[3], paddings[1]);
|
view.setPadding(paddings[2], paddings[0], paddings[3], paddings[1]);
|
||||||
@@ -167,6 +173,8 @@ public class SystemBarConfigs {
|
|||||||
com.android.internal.R.dimen.status_bar_height))
|
com.android.internal.R.dimen.status_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(
|
||||||
|
R.bool.config_hideTopSystemBarForKeyboard))
|
||||||
.build();
|
.build();
|
||||||
mSystemBarConfigMap.put(TOP, topBarConfig);
|
mSystemBarConfigMap.put(TOP, topBarConfig);
|
||||||
}
|
}
|
||||||
@@ -180,6 +188,8 @@ public class SystemBarConfigs {
|
|||||||
.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))
|
||||||
|
.setHideForKeyboard(mResources.getBoolean(
|
||||||
|
R.bool.config_hideBottomSystemBarForKeyboard))
|
||||||
.build();
|
.build();
|
||||||
mSystemBarConfigMap.put(BOTTOM, bottomBarConfig);
|
mSystemBarConfigMap.put(BOTTOM, bottomBarConfig);
|
||||||
}
|
}
|
||||||
@@ -192,6 +202,8 @@ public class SystemBarConfigs {
|
|||||||
R.dimen.car_left_navigation_bar_width))
|
R.dimen.car_left_navigation_bar_width))
|
||||||
.setBarType(mResources.getInteger(R.integer.config_leftSystemBarType))
|
.setBarType(mResources.getInteger(R.integer.config_leftSystemBarType))
|
||||||
.setZOrder(mResources.getInteger(R.integer.config_leftSystemBarZOrder))
|
.setZOrder(mResources.getInteger(R.integer.config_leftSystemBarZOrder))
|
||||||
|
.setHideForKeyboard(mResources.getBoolean(
|
||||||
|
R.bool.config_hideLeftSystemBarForKeyboard))
|
||||||
.build();
|
.build();
|
||||||
mSystemBarConfigMap.put(LEFT, leftBarConfig);
|
mSystemBarConfigMap.put(LEFT, leftBarConfig);
|
||||||
}
|
}
|
||||||
@@ -204,6 +216,8 @@ public class SystemBarConfigs {
|
|||||||
R.dimen.car_right_navigation_bar_width))
|
R.dimen.car_right_navigation_bar_width))
|
||||||
.setBarType(mResources.getInteger(R.integer.config_rightSystemBarType))
|
.setBarType(mResources.getInteger(R.integer.config_rightSystemBarType))
|
||||||
.setZOrder(mResources.getInteger(R.integer.config_rightSystemBarZOrder))
|
.setZOrder(mResources.getInteger(R.integer.config_rightSystemBarZOrder))
|
||||||
|
.setHideForKeyboard(mResources.getBoolean(
|
||||||
|
R.bool.config_hideRightSystemBarForKeyboard))
|
||||||
.build();
|
.build();
|
||||||
mSystemBarConfigMap.put(RIGHT, rightBarConfig);
|
mSystemBarConfigMap.put(RIGHT, rightBarConfig);
|
||||||
}
|
}
|
||||||
@@ -252,6 +266,24 @@ public class SystemBarConfigs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkHideBottomBarForKeyboardConfigSync() throws RuntimeException {
|
||||||
|
if (mBottomNavBarEnabled) {
|
||||||
|
boolean actual = mResources.getBoolean(R.bool.config_hideBottomSystemBarForKeyboard);
|
||||||
|
boolean expected = mResources.getBoolean(
|
||||||
|
com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard);
|
||||||
|
|
||||||
|
if (actual != expected) {
|
||||||
|
throw new RuntimeException("config_hideBottomSystemBarForKeyboard must not be "
|
||||||
|
+ "overlaid directly and should always refer to"
|
||||||
|
+ "config_automotiveHideNavBarForKeyboard. However, their values "
|
||||||
|
+ "currently do not sync. Set config_hideBottomSystemBarForKeyguard to "
|
||||||
|
+ "@*android:bool/config_automotiveHideNavBarForKeyboard. To change its "
|
||||||
|
+ "value, overlay config_automotiveHideNavBarForKeyboard in "
|
||||||
|
+ "framework/base/core/res/res.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void setInsetPaddingsForOverlappingCorners() {
|
private void setInsetPaddingsForOverlappingCorners() {
|
||||||
setInsetPaddingForOverlappingCorner(TOP, LEFT);
|
setInsetPaddingForOverlappingCorner(TOP, LEFT);
|
||||||
setInsetPaddingForOverlappingCorner(TOP, RIGHT);
|
setInsetPaddingForOverlappingCorner(TOP, RIGHT);
|
||||||
@@ -320,14 +352,17 @@ public class SystemBarConfigs {
|
|||||||
private final int mBarType;
|
private final int mBarType;
|
||||||
private final int mGirth;
|
private final int mGirth;
|
||||||
private final int mZOrder;
|
private final int mZOrder;
|
||||||
|
private final boolean mHideForKeyboard;
|
||||||
|
|
||||||
private int[] mPaddings = new int[]{0, 0, 0, 0};
|
private int[] mPaddings = new int[]{0, 0, 0, 0};
|
||||||
|
|
||||||
private SystemBarConfig(@SystemBarSide int side, int barType, int girth, int zOrder) {
|
private SystemBarConfig(@SystemBarSide int side, int barType, int girth, int zOrder,
|
||||||
|
boolean hideForKeyboard) {
|
||||||
mSide = side;
|
mSide = side;
|
||||||
mBarType = barType;
|
mBarType = barType;
|
||||||
mGirth = girth;
|
mGirth = girth;
|
||||||
mZOrder = zOrder;
|
mZOrder = zOrder;
|
||||||
|
mHideForKeyboard = hideForKeyboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getSide() {
|
private int getSide() {
|
||||||
@@ -346,6 +381,10 @@ public class SystemBarConfigs {
|
|||||||
return mZOrder;
|
return mZOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean getHideForKeyboard() {
|
||||||
|
return mHideForKeyboard;
|
||||||
|
}
|
||||||
|
|
||||||
private int[] getPaddings() {
|
private int[] getPaddings() {
|
||||||
return mPaddings;
|
return mPaddings;
|
||||||
}
|
}
|
||||||
@@ -383,6 +422,7 @@ public class SystemBarConfigs {
|
|||||||
private int mBarType;
|
private int mBarType;
|
||||||
private int mGirth;
|
private int mGirth;
|
||||||
private int mZOrder;
|
private int mZOrder;
|
||||||
|
private boolean mHideForKeyboard;
|
||||||
|
|
||||||
private SystemBarConfigBuilder setSide(@SystemBarSide int side) {
|
private SystemBarConfigBuilder setSide(@SystemBarSide int side) {
|
||||||
mSide = side;
|
mSide = side;
|
||||||
@@ -404,8 +444,13 @@ public class SystemBarConfigs {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private SystemBarConfigBuilder setHideForKeyboard(boolean hide) {
|
||||||
|
mHideForKeyboard = hide;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
private SystemBarConfig build() {
|
private SystemBarConfig build() {
|
||||||
return new SystemBarConfig(mSide, mBarType, mGirth, mZOrder);
|
return new SystemBarConfig(mSide, mBarType, mGirth, mZOrder, mHideForKeyboard);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -250,6 +250,28 @@ public class CarNavigationBarControllerTest extends SysuiTestCase {
|
|||||||
assertThat(window1).isEqualTo(window2);
|
assertThat(window1).isEqualTo(window2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSetTopWindowVisibility_setTrue_isVisible() {
|
||||||
|
mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
|
||||||
|
mCarNavigationBar = createNavigationBarController();
|
||||||
|
|
||||||
|
ViewGroup window = mCarNavigationBar.getTopWindow();
|
||||||
|
mCarNavigationBar.setTopWindowVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
assertThat(window.getVisibility()).isEqualTo(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSetTopWindowVisibility_setFalse_isGone() {
|
||||||
|
mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
|
||||||
|
mCarNavigationBar = createNavigationBarController();
|
||||||
|
|
||||||
|
ViewGroup window = mCarNavigationBar.getTopWindow();
|
||||||
|
mCarNavigationBar.setTopWindowVisibility(View.GONE);
|
||||||
|
|
||||||
|
assertThat(window.getVisibility()).isEqualTo(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetBottomWindowVisibility_setTrue_isVisible() {
|
public void testSetBottomWindowVisibility_setTrue_isVisible() {
|
||||||
mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
|
mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package com.android.systemui.car.navigationbar;
|
package com.android.systemui.car.navigationbar;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertFalse;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
import static org.junit.Assert.assertNull;
|
import static org.junit.Assert.assertNull;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
@@ -92,6 +93,16 @@ public class SystemBarConfigsTest extends SysuiTestCase {
|
|||||||
mSystemBarConfigs = new SystemBarConfigs(mResources);
|
mSystemBarConfigs = new SystemBarConfigs(mResources);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expected = RuntimeException.class)
|
||||||
|
public void onInit_hideBottomSystemBarForKeyboardValueDoNotSync_throwsRuntimeException() {
|
||||||
|
when(mResources.getBoolean(R.bool.config_hideBottomSystemBarForKeyboard)).thenReturn(false);
|
||||||
|
when(mResources.getBoolean(
|
||||||
|
com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard)).thenReturn(
|
||||||
|
true);
|
||||||
|
|
||||||
|
mSystemBarConfigs = new SystemBarConfigs(mResources);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getTopSystemBarLayoutParams_topBarEnabled_returnsTopSystemBarLayoutParams() {
|
public void getTopSystemBarLayoutParams_topBarEnabled_returnsTopSystemBarLayoutParams() {
|
||||||
mSystemBarConfigs = new SystemBarConfigs(mResources);
|
mSystemBarConfigs = new SystemBarConfigs(mResources);
|
||||||
@@ -111,6 +122,26 @@ public class SystemBarConfigsTest extends SysuiTestCase {
|
|||||||
assertNull(lp);
|
assertNull(lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getTopSystemBarHideForKeyboard_hideBarForKeyboard_returnsTrue() {
|
||||||
|
when(mResources.getBoolean(R.bool.config_hideTopSystemBarForKeyboard)).thenReturn(true);
|
||||||
|
mSystemBarConfigs = new SystemBarConfigs(mResources);
|
||||||
|
|
||||||
|
boolean hideKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.TOP);
|
||||||
|
|
||||||
|
assertTrue(hideKeyboard);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getTopSystemBarHideForKeyboard_topBarNotEnabled_returnsFalse() {
|
||||||
|
when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(false);
|
||||||
|
mSystemBarConfigs = new SystemBarConfigs(mResources);
|
||||||
|
|
||||||
|
boolean hideKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.TOP);
|
||||||
|
|
||||||
|
assertFalse(hideKeyboard);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void topSystemBarHasHigherZOrderThanHuns_topSystemBarIsNavigationBarPanelType() {
|
public void topSystemBarHasHigherZOrderThanHuns_topSystemBarIsNavigationBarPanelType() {
|
||||||
when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(
|
when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(
|
||||||
@@ -158,5 +189,14 @@ public class SystemBarConfigsTest extends SysuiTestCase {
|
|||||||
when(mResources.getInteger(R.integer.config_bottomSystemBarZOrder)).thenReturn(10);
|
when(mResources.getInteger(R.integer.config_bottomSystemBarZOrder)).thenReturn(10);
|
||||||
when(mResources.getInteger(R.integer.config_leftSystemBarZOrder)).thenReturn(2);
|
when(mResources.getInteger(R.integer.config_leftSystemBarZOrder)).thenReturn(2);
|
||||||
when(mResources.getInteger(R.integer.config_rightSystemBarZOrder)).thenReturn(3);
|
when(mResources.getInteger(R.integer.config_rightSystemBarZOrder)).thenReturn(3);
|
||||||
|
|
||||||
|
when(mResources.getBoolean(R.bool.config_hideTopSystemBarForKeyboard)).thenReturn(false);
|
||||||
|
when(mResources.getBoolean(
|
||||||
|
com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard)).thenReturn(
|
||||||
|
false);
|
||||||
|
when(mResources.getBoolean(R.bool.config_hideLeftSystemBarForKeyboard)).thenReturn(
|
||||||
|
false);
|
||||||
|
when(mResources.getBoolean(R.bool.config_hideRightSystemBarForKeyboard)).thenReturn(
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user