Merge "Dump warning logs to prevent app crash while no top-resumed changes" into rvc-qpr-dev am: b6d433cdbd am: 2b5dae1c57

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13896651

Change-Id: I4719a6ff203dafa59fd688f405efe44f19c1577b
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 7298d87..e596e7c 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4803,6 +4803,10 @@
         }
 
         if (r.isTopResumedActivity == onTop) {
+            if (!Build.IS_DEBUGGABLE) {
+                Slog.w(TAG, "Activity top position already set to onTop=" + onTop);
+                return;
+            }
             throw new IllegalStateException("Activity top position already set to onTop=" + onTop);
         }