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);
}
相关推荐
2501_915909068 小时前
iOS应用性能优化:十大策略提升用户体验与开发效率
android·ios·小程序·https·uni-app·iphone·webview
sun0077008 小时前
打通android全链路,网卡驱动, 内核 , 到上层hal, framework
android
awu的Android笔记8 小时前
Android VpnService:如何把所有流量导入用户态
android
plainGeekDev9 小时前
AlertDialog → DialogFragment
android·java·kotlin
流星白龙9 小时前
【MySQL高阶】13.其他存储引擎
android·数据库·mysql
Lyyaoo.9 小时前
【MySQL】SQL优化
android·sql·mysql
ImTryCatchException9 小时前
Android 性能优化实战手册:从理论到落地的完整方法论
android·性能优化
sun0077009 小时前
qnx网络相关模块,全链路,硬件网卡 → 用户态驱动 (.so) → io‑pkt/io‑sock(用户态 TCP/IP + 转发 + 控制)
android
赏金术士9 小时前
Android app 项目:模块打包 AAR 教程
android·热修复·tinker·aar打包
ImTryCatchException10 小时前
React Native 嵌入现有 Android 项目:踩坑记录与解决方案
android·react native·react.js