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);
}
相关推荐
YIN_尹17 小时前
【MySQL】数据类型(上)
android·mysql·adb
robotx18 小时前
AOSP设备节点权限添加相关
android
顾林海18 小时前
Android文件系统安全与权限控制:给应用数据上把“安全锁”
android·面试·操作系统
青莲84318 小时前
Android 动画机制完整详解
android·前端·面试
城东米粉儿18 小时前
android 离屏预渲染 笔记
android
未知名Android用户18 小时前
Android自定义 View + Canvas—声纹小球动画
android
_李小白19 小时前
【Android FrameWork】延伸阅读:AMS 的 handleApplicationCrash
android·开发语言·python
_李小白20 小时前
【Android FrameWork】第四十九天:SystemUI
android
Mr -老鬼20 小时前
移动端跨平台适配技术框架:从发展到展望
android·ios·小程序·uni-app