RK356x Android 11 定制系统 源码修改

修改默认时区语言

文件路径

device/rockchip/rk356x/device.mk

PRODUCT_PROPERTY_OVERRIDES下增加以下内容

                persist.sys.language=zh \
                persist.sys.country=CN \
                persist.sys.localevar= "" \
                persist.sys.timezone=Asia/Shanghai \
                ro.product.locale.language=zh \
                ro.product.locale.region=CN 

修改导航栏、状态栏

导航栏路径

frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java

修改函数为 prepareNavigationBarView,在函数最后加上

        volumeAddButton.setVisibility(View.GONE);
        volumeSubButton.setVisibility(View.GONE);
        screenshotButton.setVisibility(View.GONE);
        poweroffButton.setVisibility(View.GONE);
        rotationButton.setVisibility(View.GONE);
        hideBarButton.setVisibility(View.GONE);

状态栏路径

frameworks/base/core/res/res/values/dimens.xml

修改status_bar_height_portrait的值为0dp

<dimen name="status_bar_height_portrait">0dp</dimen>

修改安装应用的权限

参考(89条消息) Android 10 默认授权app运行时权限(去掉运行时权限授权弹窗)_wq892373445的博客-CSDN博客_android权限弹窗

文件路径

frameworks/base/services/core/java/com/android/server/pm/permission/PermissionManagerService.java

函数

private void restorePermissionState(@NonNull AndroidPackage pkg, boolean replace,
            @Nullable String packageOfInterest, @Nullable PermissionCallback callback) 

部分代码修改为:

if (bp.isNormal()) {
                    // For all apps normal permissions are install time ones.
                    grant = GRANT_INSTALL;
                } else if (bp.isRuntime()) {
                    if (origPermissions.hasInstallPermission(bp.getName())
                            || upgradedActivityRecognitionPermission != null) {
                        // Before Q we represented some runtime permissions as install permissions,
                        // in Q we cannot do this anymore. Hence upgrade them all.
                        grant = GRANT_UPGRADE;
                    } else {
                        // For modern apps keep runtime permissions unchanged.
                        // grant = GRANT_RUNTIME;
                        grant = GRANT_INSTALL;
                    }
                } else if (bp.isSignature()) {
                    // For all apps signature permissions are install time ones.
                    allowedSig = grantSignaturePermission(perm, pkg, ps, bp, origPermissions);
                    if (allowedSig) {
                        grant = GRANT_INSTALL;
                    }
                    grant = GRANT_INSTALL;
                }

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值