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);
}
相关推荐
Lei活在当下43 分钟前
【Perfetto从入门到精通】2. 使用 Perfetto 追踪/分析 APP 的 Native/Java 内存
android·性能优化·架构
愤怒的代码1 小时前
🔗 深度解析 SystemUI 进程间通信机制(一)
android·操作系统·app
RainyJiang2 小时前
聊聊协程里的 Semaphore:别让协程挤爆门口
android·kotlin
Dev7z4 小时前
在MySQL里创建数据库
android·数据库·mysql
invicinble4 小时前
mysql建立存数据的表(一)
android·数据库·mysql
似霰5 小时前
传统 Hal 开发笔记1----传统 HAL简介
android·hal
Zender Han6 小时前
Flutter Gradients 全面指南:原理、类型与实战使用
android·flutter·ios
火柴就是我6 小时前
Flutter Path.computeMetrics() 的使用注意点
android·flutter
モンキー・D・小菜鸡儿8 小时前
Android 系统TTS(文字转语音)解析
android·tts
2501_915909068 小时前
iOS 反编译防护工具全景解析 从底层符号到资源层的多维安全体系
android·安全·ios·小程序·uni-app·iphone·webview