MTK Android12 隐藏顶部状态栏

1、解决路径:
复制代码
	(1)vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
	(2)vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java
2、方法:

(1)在StatusBar.java类的start()中:

java 复制代码
        RegisterStatusBarResult result = null;
        try {
            result = mBarService.registerStatusBar(mCommandQueue);
        } catch (RemoteException ex) {
            ex.rethrowFromSystemServer();
        }

        createAndAddWindows(result);
        // add start
		mStatusBarWindowController.setBarVisibility(View.GONE);
		// add end
        if (mWallpaperSupported) {
            // Make sure we always have the most current wallpaper info.
            IntentFilter wallpaperChangedFilter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED);
            mBroadcastDispatcher.registerReceiver(mWallpaperChangedReceiver, wallpaperChangedFilter,
                    null /* handler */, UserHandle.ALL);
            mWallpaperChangedReceiver.onReceive(mContext, null);
        } else if (DEBUG) {
            Log.v(TAG, "start(): no wallpaper service ");
        }
(2)在StatusBarWindowController.java类中
java 复制代码
public void setBarVisibility(int visibility) {
        mStatusBarView.setVisibility(visibility);
}
相关推荐
NPE~31 分钟前
[App逆向]脱壳实战
android·教程·逆向·android逆向·逆向分析
木易 士心1 小时前
别再只会用 drawCircle 了!一文搞懂 Android Canvas 底层机制
android
AtOR CUES2 小时前
MySQL——表操作及查询
android·mysql·adb
怣疯knight3 小时前
安卓App无法增加自定义图片作为图标功能
android
jinanwuhuaguo5 小时前
OpenClaw联邦之心——从孤岛记忆到硅基集体潜意识的拓扑学革命(第二十三篇)
android·人工智能·kotlin·拓扑学·openclaw
Gary Studio6 小时前
安卓HAL C++基础-命名域
android
诸神黄昏EX7 小时前
Android Google XTS
android
eSsO KERF7 小时前
MySQL Workbench菜单汉化为中文
android·数据库·mysql
pengyu9 小时前
【Kotlin 协程修仙录 · 筑基境 · 后阶】 | 调度器的艺术:Dispatchers 四大护法与 withContext 性能密码
android·kotlin
uElY ITER9 小时前
MySQL 中如何进行 SQL 调优
android·sql·mysql