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);
}
相关推荐
mmsx6 分钟前
osmdroid 地图实战 03|谷歌影像的 URL,为什么不能 setTileSource 了事?
android
hai_android16 分钟前
Kotlin 协程上下文(CoroutineContext)深度解析
android
恋猫de小郭32 分钟前
Flutter A2UI 深度解析,它是怎么提供动态生产力的,然后为什么 A2UI 不只是 Flutter
android·前端·flutter
心平气和量大福大1 小时前
android-控件-单选框RadioButton
android
Meteors.1 小时前
Android 性能优化:08.耗电优化
android·性能优化
Kapaseker1 小时前
Compose SelectionState API — 主动控制文本选择
android·kotlin
拾光Ծ3 小时前
【MySQL】对表数据的操作:增删查改(CRUD)
android·数据库·sql·mysql
一笑的小酒馆13 小时前
Android中的tcp通信
android
默阳123416 小时前
2026年Android中高级面试题专栏(Android进阶篇)
android