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);
}
相关推荐
NPE~10 分钟前
[App逆向]环境搭建上篇——抓取apk https包
android·教程·逆向·android逆向·逆向分析
qq_283720051 小时前
MySQL技巧(三):慢查询开启与分析优化案例
android·adb
常利兵1 小时前
从Groovy到KTS:Android Gradle脚本的华丽转身
android
穷人小水滴1 小时前
使用 WebRTC 实现局域网投屏: PC (GNOME ArchLinux) -> 平板 (Android)
android·linux·webrtc·浏览器·js·gnome·投屏
zh_xuan1 小时前
Android compose 无限滚动列表
android
诸神黄昏EX1 小时前
Android Binder 系列专题【篇六:自定义AIDL HAL进程】
android
Fate_I_C1 小时前
Android现代开发:Kotlin&Jetpack
android·开发语言·kotlin·android jetpack
Densen20141 小时前
[.NET 9] BlazorWebView 无法在较旧的 Android 设备上加载, 附临时解决方法
android
轩情吖1 小时前
MySQL Connect(2)
android·mysql·adb·workbench·mysql连接池·图形化mysql
三少爷的鞋1 小时前
从“调用方的如履薄冰”到“接口的天然语义”:Room/DataStore/Retrofit 的启示
android