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);
}
相关推荐
_阿南_8 小时前
Android文件读写和分享总结
android
通玄17 小时前
Jetpack Compose 入门系列(六):Navigation 3 页面导航
android
rocpp20 小时前
Android 多语言切换实战:从 Context 到 Android 13 应用语言适配
android·kotlin
释然小师弟21 小时前
Android开发十年:反思与回顾
android·后端·嵌入式
黄林晴1 天前
用了这么久 Koin Scope,原来一直都用错了?
android·kotlin
爱勇宝1 天前
我做了一个只用来搜歌词的小 App
android·前端·后端
众少成多积小致巨2 天前
JNI (Java Native Interface) 技术手册中文参考指南
android·java·c++
Coffeeee2 天前
如何使用Glide和Coil加载WebP动图
android·kotlin·glide
Kapaseker2 天前
5 分钟搞懂 Kotlin DSL
android·kotlin
恋猫de小郭2 天前
AI Agent 开发究竟是啥?如何用 AI 开发 Agent ?深入浅出给你一套概念
android·前端·ai编程