@[toc]
修改默認(rèn)時(shí)區(qū)語(yǔ)言
文件路徑
device/rockchip/rk356x/device.mk
在 PRODUCT_PROPERTY_OVERRIDES下增加以下內(nèi)容
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
修改導(dǎo)航欄他爸、狀態(tài)欄
導(dǎo)航欄路徑
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
修改函數(shù)為 prepareNavigationBarView,在函數(shù)最后加上
volumeAddButton.setVisibility(View.GONE);
volumeSubButton.setVisibility(View.GONE);
screenshotButton.setVisibility(View.GONE);
poweroffButton.setVisibility(View.GONE);
rotationButton.setVisibility(View.GONE);
hideBarButton.setVisibility(View.GONE);
狀態(tài)欄路徑
frameworks/base/core/res/res/values/dimens.xml
修改status_bar_height_portrait的值為0dp
<dimen name="status_bar_height_portrait">0dp</dimen>
修改安裝應(yīng)用的權(quán)限
文件路徑
frameworks/base/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
函數(shù)
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;
}