去掉Launcher3的Taskbar 显示SystemUI的底部导航栏
diff
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
index 3d8bf9ea63..50674b339b 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
@@ -357,11 +357,12 @@ public class TaskbarManager {
destroyExistingTaskbar();
- boolean isTaskbarEnabled = dp != null && isTaskbarPresent(dp);
+ boolean isTaskbarEnabled = false;//dp != null && isTaskbarPresent(dp);
debugWhyTaskbarNotDestroyed("recreateTaskbar: isTaskbarEnabled=" + isTaskbarEnabled
+ " [dp != null (i.e. mUserUnlocked)]=" + (dp != null)
+ " FLAG_HIDE_NAVBAR_WINDOW=" + FLAG_HIDE_NAVBAR_WINDOW
+ " dp.isTaskbarPresent=" + (dp == null ? "null" : dp.isTaskbarPresent));
+
if (!isTaskbarEnabled) {
SystemUiProxy.INSTANCE.get(mContext)
.notifyTaskbarStatus(/* visible */ false, /* stashed */ false);
diff --git a/res/xml/device_profiles.xml b/res/xml/device_profiles.xml
index c9a44a1be0..40a9e736b6 100644
--- a/res/xml/device_profiles.xml
+++ b/res/xml/device_profiles.xml
@@ -169,7 +169,7 @@
launcher:numFolderColumns="3"
launcher:numHotseatIcons="6"
launcher:hotseatColumnSpanLandscape="4"
- launcher:numAllAppsColumns="6"
+ launcher:numAllAppsColumns="5"
launcher:isScalable="true"
launcher:inlineNavButtonsEndSpacing="@dimen/taskbar_button_margin_6_5"
launcher:devicePaddingId="@xml/paddings_6x5"
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 86c9f1617e..006a5d21d5 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -281,9 +281,9 @@ public class DeviceProfile {
@NonNull final Consumer<DeviceProfile> dimensionOverrideProvider) {
this.inv = inv;
- this.isLandscape = windowBounds.isLandscape();
+ this.isLandscape = false;//windowBounds.isLandscape();
this.isMultiWindowMode = isMultiWindowMode;
- this.transposeLayoutWithOrientation = transposeLayoutWithOrientation;
+ this.transposeLayoutWithOrientation = false;//transposeLayoutWithOrientation;
this.isMultiDisplay = isMultiDisplay;
this.isGestureMode = isGestureMode;
windowX = windowBounds.bounds.left;
diff --git a/src/com/android/launcher3/states/RotationHelper.java b/src/com/android/launcher3/states/RotationHelper.java
index 7b4e2485ce..693be43718 100644
--- a/src/com/android/launcher3/states/RotationHelper.java
+++ b/src/com/android/launcher3/states/RotationHelper.java
@@ -55,7 +55,7 @@ public class RotationHelper implements OnSharedPreferenceChangeListener,
// original dimensions to determine if rotation is allowed of not.
float originalSmallestWidth = dpiFromPx(Math.min(info.currentSize.x, info.currentSize.y),
DENSITY_DEVICE_STABLE);
- return originalSmallestWidth >= MIN_TABLET_WIDTH;
+ return false;//originalSmallestWidth >= MIN_TABLET_WIDTH;
}
public static final int REQUEST_NONE = 0;
diff --git a/src/com/android/launcher3/util/DisplayController.java b/src/com/android/launcher3/util/DisplayController.java
index 02ebb15cd1..6dcbe5be19 100644
--- a/src/com/android/launcher3/util/DisplayController.java
+++ b/src/com/android/launcher3/util/DisplayController.java
@@ -382,7 +382,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
* Returns {@code true} if the bounds represent a tablet.
*/
public boolean isTablet(WindowBounds bounds) {
- return smallestSizeDp(bounds) >= MIN_TABLET_WIDTH;
+ return false;//smallestSizeDp(bounds) >= MIN_TABLET_WIDTH;
}
/**
diff --git a/src/com/android/launcher3/util/window/WindowManagerProxy.java b/src/com/android/launcher3/util/window/WindowManagerProxy.java
index 4093bc913d..00c4552759 100644
--- a/src/com/android/launcher3/util/window/WindowManagerProxy.java
+++ b/src/com/android/launcher3/util/window/WindowManagerProxy.java
@@ -145,7 +145,7 @@ public class WindowManagerProxy implements ResourceBasedOverride {
Resources systemRes = context.getResources();
Configuration config = systemRes.getConfiguration();
- boolean isTablet = config.smallestScreenWidthDp > MIN_TABLET_WIDTH;
+ boolean isTablet = false;//config.smallestScreenWidthDp > MIN_TABLET_WIDTH;
boolean isGesture = isGestureNav(context);
boolean isPortrait = config.screenHeightDp > config.screenWidthDp;
@@ -215,7 +215,7 @@ public class WindowManagerProxy implements ResourceBasedOverride {
systemRes = context.createConfigurationContext(conf).getResources();
}
- boolean isTablet = swDp >= MIN_TABLET_WIDTH;
+ boolean isTablet = false;//swDp >= MIN_TABLET_WIDTH;
boolean isTabletOrGesture = isTablet
|| (Utilities.ATLEAST_R && isGestureNav(context));