天天看点

sprd安卓11动态修改系统分辨率

修改分辨率对系统UI的影响会比较大,导航栏状态栏锁屏等UI都会出现变形情况;

修改分辨率只适用某些特定情况.

我修改的情况是某个apk强制横屏后,UI无法显示正常,apk显示放大了很多,修改dpi等都没有效果,只能修改分辨率来缩放apk显示大小

--- a/sprd/frameworks/base/core/java/android/app/ActivityThread.java
+++ b/sprd/frameworks/base/core/java/android/app/ActivityThread.java
@@ -4856,6 +4856,23 @@ public final class ActivityThread extends ClientTransactionHandler {
     public ActivityClientRecord performResumeActivity(IBinder token, boolean finalStateRequest,
             String reason) {
         final ActivityClientRecord r = mActivities.get(token);
+               //modify by luoyalong 20210922 for adjusted zhumu apk begin
+               if("com.suirui.zhumu".equals(r.intent.getComponent().getPackageName())){
+                       Intent intentY = new Intent();
+                       intentY.putExtra("zhumu","1");
+                       intentY.setAction("neostra.intent.ac