修改默认语言(系统本土化)
asop/build/target/product/core_base.mk
PRODUCT_PROPERTY_OVERRIDES := \
ro.config.notification_sound=OnTheHunt.ogg \
ro.config.alarm_alert=Alarm_Classic.ogg \
persist.sys.language=zh \
persist.sys.country=CN
不休眠
frameworks/base/packages/SettingsProvider/res/values/defaults.xml
里面60000改成-1,就是不进入休眠。
<integer name="def_screen_off_timeout">-1</integer>
还要修改以下:
修改 /frameworks/base/services/java/com/android/server/power/PowerManagerService.java
文件
getScreenOffTimeoutLocked()
函数:
if (mUserActivityTimeoutOverrideFromWindowManager >= 0) {
timeout = (int)Math.min(timeout, mUserActivityTimeoutOverrideFromWindowManager);
}
+ if(mScreenOffTimeoutSetting < 0)
+ return mMaximumScreenOffTimeoutFromDeviceAdmin;
return Math.max(timeout, MINIMUM_SCREEN_OFF_TIMEOUT);
去掉导航栏和状态栏
/frameworks/base/packages/SystemUI/src/com/android/systemui/SystemUIService.java
private final Class<?>[] SERVICES = new Class[] {
com.android.systemui.recent.Recents.class,
// com.android.systemui.statusbar.SystemBars.class,
com.android.systemui.usb.StorageNotification.class,
com.android.systemui.power.PowerUI.class,
com.android.systemui.media.RingtonePlayer.class,
com.android.systemui.settings.SettingsUI.class,
};
usb主机permision确认对话框
/frameworks/base/services/java/com/android/server/usb/UsbSettingsManager.java
默认返回true
public boolean hasPermission(UsbDevice device) {
synchronized (mLock) {
// int uid = Binder.getCallingUid();
// if (uid == Process.SYSTEM_UID) {
// return true;
// }
// SparseBooleanArray uidList = mDevicePermissionMap.get(device.getDeviceName());
// if (uidList == null) {
// return false;
// }
// return uidList.get(uid);
return true;
}
}
public boolean hasPermission(UsbAccessory accessory) {
synchronized (mLock) {
// int uid = Binder.getCallingUid();
// if (uid == Process.SYSTEM_UID) {
// return true;
// }
// SparseBooleanArray uidList = mAccessoryPermissionMap.get(accessory);
// if (uidList == null) {
// return false;
// }
// return uidList.get(uid);
return true;
}
}