diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index fc2a2d03942656a989ddd6c1bd36ca12f3de721b..e9b65c80d208bd84fe5c7ba3618add183c023e5f 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -17661,6 +17661,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, int oldT = mTop; int oldB = mBottom; int oldR = mRight; + /* + Log.d("zhdl", "layout=" + this.getClass().getName() + " - (" + l + "," + t + "," + r + "," + b + "), old=" + + "(" + oldL + "," + oldT + "," + oldR + "," + oldB + ")"); + if (this.mParent != null) { + Log.d("zhdl", " --mParent=" + this.mParent.getClass().getName() + ", id=" + mID); + } + */ boolean changed = isLayoutModeOptical(mParent) ? setOpticalFrame(l, t, r, b) : setFrame(l, t, r, b); @@ -19862,7 +19869,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final int widthSize = MeasureSpec.getSize(widthMeasureSpec); final int heightSize = MeasureSpec.getSize(heightMeasureSpec); final int widthMode = MeasureSpec.getMode(widthMeasureSpec); - final int heighMode = MeasureSpec.getMode(heightMeasureSpec); + final int heightMode = MeasureSpec.getMode(heightMeasureSpec); + + if (this.getClass().getName().startsWith("com.android.internal.policy.DecorView")) { + if (widthMode == MeasureSpec.AT_MOST && heightMode == MeasureSpec.AT_MOST && + widthSize == 320 && heightSize == 1079) { + widthMeasureSpec = MeasureSpec.makeMeasureSpec(320, MeasureSpec.EXACTLY); + heightMeasureSpec = MeasureSpec.makeMeasureSpec(220, MeasureSpec.AT_MOST); + } + } if (this.getClass().getName().startsWith("com.tencent.mm.ui.LayoutListenerView")) { if (heightSize > 960) { @@ -19910,6 +19925,23 @@ public class View implements Drawable.Callback, KeyEvent.Callback, heightMeasureSpec = MeasureSpec.makeMeasureSpec(303, MeasureSpec.EXACTLY); } } + + if (this.mParent != null) { + String whiteView = "com.ss.android.video.impl.detail.widget.MotionFrameLayout"; + if (this.mParent.getClass().getName().startsWith(whiteView) && + this.getClass().getName().startsWith("android.widget.RelativeLayout")) { + if (widthSize == 1080) { + widthMeasureSpec = MeasureSpec.makeMeasureSpec(540, MeasureSpec.EXACTLY); + } + } + } + + if (this.getClass().getName().startsWith("com.ixigua.commonui.view.AutoScrollViewPager")) { + if (widthSize == 540 && heightSize == 156) { + widthMeasureSpec = MeasureSpec.makeMeasureSpec(539, MeasureSpec.EXACTLY); + heightMeasureSpec = MeasureSpec.makeMeasureSpec(228, MeasureSpec.EXACTLY); + } + } /* ******************************************************************** */ boolean optical = isLayoutModeOptical(this); diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java index 0c67c75dc3e8b8faf5d0b6bf1a82302245b282cd..f8e31a53a02e3810543729f78f0be71791c0c03a 100644 --- a/services/core/java/com/android/server/am/AppErrors.java +++ b/services/core/java/com/android/server/am/AppErrors.java @@ -572,6 +572,7 @@ class AppErrors { long now = SystemClock.uptimeMillis(); boolean showBackground = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0; + showBackground = true; Long crashTime; Long crashTimePersistent; @@ -679,6 +680,7 @@ class AppErrors { AppErrorDialog.Data data = (AppErrorDialog.Data) msg.obj; boolean showBackground = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0; + showBackground = true; synchronized (mService) { ProcessRecord proc = data.proc; AppErrorResult res = data.result; @@ -702,8 +704,9 @@ class AppErrors { } return; } - final boolean crashSilenced = mAppsNotReportingCrashes != null && + boolean crashSilenced = mAppsNotReportingCrashes != null && mAppsNotReportingCrashes.contains(proc.info.packageName); + crashSilenced = false; if ((mService.canShowErrorDialogs() || showBackground) && !crashSilenced) { proc.crashDialog = new AppErrorDialog(mContext, mService, data); } else { @@ -943,6 +946,7 @@ class AppErrors { boolean showBackground = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0; + showBackground = true; if (mService.canShowErrorDialogs() || showBackground) { d = new AppNotRespondingDialog(mService, mContext, proc, (ActivityRecord)data.get("activity"),