测试平台
Platform: RK3588
OS: Android12
需求:
做了一个后台服务apk预置在系统中,这个服务是获取串口数据然后将数据转发给系统更新数据,客户反馈放置老化一段时间系统数据不会自动更新了,实际上是后台服务被系统冻结了。
打印信息如下:
ActivityManager: freezing 1527 xxx
解决方法:
代码路径:frameworks/base/services/core/java/com/android/server/am/CachedAppOptimizer.java
--- a/services/core/java/com/android/server/am/CachedAppOptimizer.java
+++ b/services/core/java/com/android/server/am/CachedAppOptimizer.java
@@ -1357,7 +1357,10 @@ public final class CachedAppOptimizer {
final long unfrozenDuration;
final boolean frozen;
final ProcessCachedOptimizerRecord opt = proc.mOptRecord;
-
+