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);
}
相关推荐
大炮筒2 小时前
COCOS2DX4.0CPPWIN移植安卓踩坑总结
android
qq_422828624 小时前
android图形学之SurfaceControl和Surface的关系 五
android·开发语言·python
tongyiixiaohuang5 小时前
轻易云平台助力快麦数据入库MySQL
android·数据库·mysql
JohnnyDeng948 小时前
Android 包体积优化:R8/ProGuard 深度配置
android
qq_452396239 小时前
第六篇:《JMeter逻辑控制器:循环、条件和交替执行》
android·java·jmeter
cwzqf10 小时前
Jectpack Compose项目组件代码分享(1):分页加载组件
android
@北海怪兽11 小时前
SQL常见函数整理 _ STRING_AGG()
android·数据库·sql
鹏晨互联12 小时前
【Compose vs XML:边框内外间距的实现对比】
android·xml
Android系统攻城狮12 小时前
Android tinyalsa深度解析之pcm_plugin_write调用流程与实战(一百七十九)
android·pcm·tinyalsa·android16·音频进阶·android音频进阶
ID_1800790547312 小时前
除了JSON,淘宝店铺商品API接口还支持哪些数据格式?
android·数据库