RK356xAndroid11定制系统源码修改@
⽬录
修改默认时区语⾔
⽂件路径
device/rockchip/rk356x/device.mk
在PRODUCT_PROPERTY_OVERRIDES下增加以下内容
persist.sys.language=zh \
untry=CN \
persist.sys.localevar= "" \
persist.sys.timezone=Asia/Shanghai \
ro.product.locale.language=zh \
ro.ion=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/l
修改status_bar_height_portrait的值为0dp
<dimen name="status_bar_height_portrait">0dp</dimen>
修改安装应⽤的权限
参考
⽂件路径
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.Name())
|| 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.
android11适配机型allowedSig = grantSignaturePermission(perm, pkg, ps, bp, origPermissions); if (allowedSig) {
grant = GRANT_INSTALL;
}
grant = GRANT_INSTALL;
}
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论