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);
}
相关推荐
流星雨在线5 分钟前
安卓路由技术选型调研
android·therouter·arouter
千里马学框架20 分钟前
Ubuntu 24 搭建aosp源码环境详细笔记
android·linux·ubuntu·framework·安卓·aosp·源码环境
空中海1 小时前
安卓 第六章:主题、样式与国际化
android
Ehtan_Zheng1 小时前
7个Kotlin Delegate
android
用户69371750013841 小时前
2026 Android 开发,现在还能入行吗?
android·前端·ai编程
YBZha1 小时前
Android Camera2 + OpenGL 竖屏或横屏预览会有“轻微拉伸”
android
seabirdssss2 小时前
Appium 在小米平板上的安装受限与闪退排查
android·appium·电脑
喂_balabala2 小时前
Kotlin-属性委托
android·开发语言·kotlin
空中海2 小时前
第一章:Android 系统架构与核心原理
android·系统架构
lI-_-Il3 小时前
适配工具箱:手机里的全能数字瑞士军刀
android·音视频