rk3399 android 9.0 Launcher3 修改
功能:rk3399 android 9.0 进入系统桌面,默认在底部会有跳动修改,去掉该功能。设备带有gsensor,修改默认随着sensor更改方向1.去除底部跳动效果packages/apps/Launcher3/src/com/android/launcher3/allapps/DiscoveryBounce.javaprivate static void showForHomeIfNeed
功能:
rk3399 android 9.0 进入系统桌面,默认在底部会有跳动修改,去掉该功能。
设备带有gsensor,修改默认随着sensor更改方向
1.去除底部跳动效果
packages/apps/Launcher3/src/com/android/launcher3/allapps/DiscoveryBounce.java
private static void showForHomeIfNeeded(Launcher launcher, boolean withDelay) {
if (!launcher.isInState(NORMAL)) {
return;
}
String platformName = Utilities.getSystemProperty("ro.board.platform", "");
boolean defaultValue = "rk3126c".equals(platformName)
|| "rk3326".equals(platformName);
if (launcher.getSharedPrefs().getBoolean(HOME_BOUNCE_SEEN, /*defaultValue*/true)
|| AbstractFloatingView.getTopOpenView(launcher) != null
|| UserManagerCompat.getInstance(launcher).isDemoUser()
|| ActivityManager.isRunningInTestHarness()) {
return;
}
if (withDelay) {
new Handler().postDelayed(() -> showForHomeIfNeeded(launcher, false), DELAY_MS);
return;
}
//跳动效果展示
new DiscoveryBounce(launcher, 0).show(HOTSEAT);
}
2.修改Launher3跟随sensor方向
在AndroidManifest.xml的activity中修改
android:screenOrientation = “sensor"
在res/values/config.xml中修改
<bool name="allow_rotation">true</bool>
更多推荐
所有评论(0)