Android13删除Taskbar

去掉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));
 
相关推荐
Rainman博17 小时前
WMS-窗口relayout&FinishDrawing
android
baidu_2474386119 小时前
Android ViewModel定时任务
android·开发语言·javascript
有位神秘人19 小时前
Android中Notification的使用详解
android·java·javascript
·云扬·20 小时前
MySQL Binlog落盘机制深度解析:性能与安全性的平衡艺术
android·mysql·adb
独自破碎E21 小时前
【BISHI9】田忌赛马
android·java·开发语言
代码s贝多芬的音符1 天前
android 两个人脸对比 mlkit
android
darkb1rd1 天前
五、PHP类型转换与类型安全
android·安全·php
gjxDaniel1 天前
Kotlin编程语言入门与常见问题
android·开发语言·kotlin
csj501 天前
安卓基础之《(22)—高级控件(4)碎片Fragment》
android
峥嵘life1 天前
Android16 【CTS】CtsMediaCodecTestCases等一些列Media测试存在Failed项
android·linux·学习