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);
}
相关推荐
专注VB编程开发20年22 分钟前
b4a用VB语言开发安卓APP-图片缩放库ZoomImageView讲解-双指缩放 + 单指拖动核心源码
android·java·前端
恋猫de小郭43 分钟前
Dart 大更新,新增语法糖和各种能力,真的难得了
android·前端·flutter
EQ-雪梨蛋花汤1 小时前
【Sceneform-EQR】让Android 原生 3D开发更容易
android·3d
三少爷的鞋2 小时前
Android 架构指南之Data 层不要再暴露 start/stop 了:用 Flow 接管生命周期
android
李艺为2 小时前
Android 14 U盘无法正常显示中文盘符(卷标)问题解决
android
陆业聪2 小时前
Agent智能体:让AI自己调API干活——从Android Service到AI Agent的思维跃迁
android·人工智能·aigc
莞凰11 小时前
昇腾CANN的“灵脉根基“:Runtime仓库探秘
android·人工智能·transformer
NiceCloud喜云12 小时前
Claude Files API 深入:从上传、复用到配额管理的工程化指南
android·java·数据库·人工智能·python·json·飞书
ujainu12 小时前
CANN pto-isa:虚拟指令集如何连接编译与执行
android·ascend
赏金术士13 小时前
第六章:UI组件与Material3主题
android·ui·kotlin·compose