修改方法1:
在开发者模式中,有动画速度的相关属性:窗口动画缩放 过度动画缩放 Animator时长缩放
此例中修改Animator时长缩放,达到优化apk热启动提速都效果
frameworks/base / core/java/android/view/WindowManagerGlobal.java
@UnsupportedAppUsage
public static IWindowManager getWindowManagerService() {
......
try {
if (sWindowManagerService != null) {
ValueAnimator.setDurationScale(
sWindowManagerService.getCurrentAnimatorScale()*0.7f); //修改为期望值
}
sUseBLASTAdapter = sWindowManagerService.useBLAST();
}
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return sWindowManagerService;
}
}
public static IWindowSession getWindowSession() {
synchronized (WindowManagerGlobal.class) {
if (sWindowSession == null) {