Android 7.1.1 去除Launcher3的抽屉(2018/12/5)

主要参考博客:https://blog.csdn.net/qq_31012033/article/details/73289232

 

我只修改了2个文件

alps/packages/apps/Launcher3_m/src/com/android/launcher3/LauncherAppState.java

LauncherAppState.isDisableAllApps()是一个隐藏主菜单的开关,返回true隐藏,false显示,因此使isDisableAllApps类固定返回true。

    public static boolean isDisableAllApps() {
-        // Returns false on non-dogfood builds.
+	//LJY @{
+	/*		// Returns false on non-dogfood builds.
         return getInstance().mBuildInfo.isDogfoodBuild() &&
                 Utilities.isPropertyEnabled(Launcher.DISABLE_ALL_APPS_PROPERTY);
-    }
+    */
+		return true;
+	//LJY }@
+	}

alps/packages/apps/Launcher3_m/src/com/android/launcher3/LauncherModel.java

使应用布局在第一层

if (DEBUG_LOADERS) LauncherLog.d(TAG, "step 2: loading all apps");
                loadAndBindAllApps();

+				//LJY @{
+				if (LauncherAppState.isDisableAllApps()) {
+                verifyApplications();
+				}
+				//LJY }@
				

修改布局

Android 7.1.1 去除Launcher3的抽屉(2018/12/5)_第1张图片

你可能感兴趣的:(Work)