Android 12修改无源码 app 的字体大小和 dpi

客户需求默认字体大小和显示大小修改后,导致个别无源码应用显示不全。
根据包名单独修改应用字体大小和 dpi 解决显示问题

--- a/frameworks/base/core/java/android/app/Activity.java
+++ b/frameworks/base/core/java/android/app/Activity.java
@@ -168,7 +168,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.concurrent.Executor;
 import java.util.function.Consumer;
-
+import android.util.DisplayMetrics; //yim
 
 /**
  * An activity is a single, focused thing that the user can do.  Almost all
@@ -1613,6 +1613,57 @@ public class Activity extends ContextThemeWrapper
         }
         mRestoredFromBundle = savedInstanceState != null;
         mCalled = true;
+       /*METHOD yim add start*/
+
+        ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
+        List runningTasks = am.getRunningTasks(1);
+
+        if (runningTasks !&

你可能感兴趣的:(SPRD,Android,12,/,13,源码修改,android)