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));
 
相关推荐
myloveasuka26 分钟前
[Java]单列集合
android·java·开发语言
fundroid1 小时前
Room 3.0 完全解析:一次面向未来的现代化重构
android·数据库·database·kmp
漂洋过海来看你啊1 小时前
Jetpack Compose高效列表实战:状态管理与性能优化指南
android
张宏2361 小时前
android camera hal3-camera_module_t
android
hongtianzai2 小时前
Laravel9.X核心特性全解析
android·java·数据库
七夜zippoe2 小时前
Python 3.12+ 新特性深度解析:类型系统与性能革命
android·网络·python·类型系统·性能革命·3.12+
Kapaseker2 小时前
五分钟搞定 Compose 的打字机效果
android·kotlin
彭波3962 小时前
听歌软件下载!全网音乐随便听!手机电脑+电视端!音乐播放器推荐
android·智能手机·音频·开源软件·娱乐·软件需求
江澎涌3 小时前
鸿蒙动态导入实战
android·typescript·harmonyos
lifewange3 小时前
SQL中的聚合函数有哪些
android·数据库·sql