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);
}
相关推荐
BINGCHN12 分钟前
NSSCTF每日一练 SWPUCTF2021 include--web
android·前端·android studio
fundroid19 分钟前
Androidify:谷歌官方 AI + Android 开源示例应用
android·人工智能·开源
4z331 小时前
Android15 Framework(2):应用进程的孵化器 Zygote 进程解析
android·源码阅读
00后程序员张2 小时前
iOS 抓不到包怎么办?从 HTTPS 解密、QUIC 排查到 TCP 数据流分析的完整解决方案
android·tcp/ip·ios·小程序·https·uni-app·iphone
李斯维3 小时前
布局性能优化利器:ViewStub 极简指南
android·性能优化
循环不息优化不止4 小时前
Ktor Pipeline 机制深度解析
android
q***56384 小时前
Springboot3学习(5、Druid使用及配置)
android·学习
q***64974 小时前
SpringSecurity踢出指定用户
android·前端·后端
q***76664 小时前
SpringSecurity 实现token 认证
android·前端·后端
Chejdj5 小时前
ViewModel#onCleared的实现原理
android·源码阅读