1.文件位置:
frameworks/base/packages/SystemUI/res/values/config.xml
a.这个文件定义了初始化的一些组件,部分代码如下:
//overlay/frameworks/base/packages/SystemUI/res/values/config.xml
<!-- The default tiles to display in QuickSettings -->
<string name="quick_settings_tiles_default" translatable="false">
wifi,bt,dnd,flashlight,rotation,battery,cell,airplane,cast,screenrecord
</string>
//以下这几行不更改貌似也可以生效
<!-- The minimum number of tiles to display in QuickSettings -->
<integer name="quick_settings_min_num_tiles">6</integer>
<!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
<string name="quick_settings_tiles_stock" translatable="false">
wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,location,hotspot,inversion,saver,dark,work,cast,night,screenrecord,reverse
</string>
对里面的字符串,进行增加或删除就会去掉相应的快捷图标。
b.还有一些组件是 被设定 了 true 和 false ,用来进行 控制是否让 他们在初始化的时候进行显示。
对于这样的组件你可以自行查找和设置,比如:
<bool name="config_keyguardUserSwitcher">false</bool>
false 修改为 true 就会在下拉菜单显示出 用户账户小图标。
2.下拉菜单屏蔽快捷开关:转储SYSUI堆
diff --git a/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java b/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java
index c182a58a28c4..89df1dfa8daa 100644
--- a/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java
+++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java
@@ -186,7 +186,8 @@ public class QSFactoryImpl implements QSFactory {
// Debug tiles.
if (Build.IS_DEBUGGABLE) {
if (tileSpec.equals(GarbageMonitor.MemoryTile.TILE_SPEC)) {
- return mMemoryTileProvider.get();
+ // return mMemoryTileProvider.get();
+ return null;
}
}
3.下拉菜单屏蔽弹窗:已启用序列控制台
diff --git a/frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java b/frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
index 0ae9cc279e68..039f28b01ffe 100644
--- a/frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -5574,6 +5574,9 @@ public class ActivityManagerService extends IActivityManager.Stub
}
private void showConsoleNotificationIfActive() {
+ if (!SystemProperties.get("persist.sys.console.am").equals("0")) {
+ return;
+ }
if (!SystemProperties.get("init.svc.console").equals("running")) {
return;
}
4.android状态栏修改可参考链接:Android下拉状态栏 快捷开关的添加与删除 - 代码天地 (codetd.com)