Use configuration delta to determine if still in orientation change.

We currently track this change in the WindowState with a variable
called mOrientationChanging. This value is set and cleared in a
variety of classes. It is possible for this value to be cleared
before processing an orientation changing frame. This can lead to us
prematurely unfreezing.

Since the orientation is present in the configuration, we can use the
orientation delta between the last and current frame's configuration
to determine whether we are in the middle of an orientation change.
The existing signal has been moved behind a setter/getter where the
latter is combined with the configuration state.

This reverts commit 31386ab88b48fd5475efc58155549ad4c7da7ad2. It
addresses issues raised in b/63380251 where the orientation delta was
being considered for WindowStates that were not visible.

Bug: 62846907
Test: go/wm-smoke
Change-Id: I574efb8f9a458cb295f2ef14e10dbb91e8875bf4
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 9fe7381..05f4626 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -1073,7 +1073,7 @@
             }
             if (w.mHasSurface && !rotateSeamlessly) {
                 if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Set mOrientationChanging of " + w);
-                w.mOrientationChanging = true;
+                w.setOrientationChanging(true);
                 mService.mRoot.mOrientationChangeComplete = false;
                 w.mLastFreezeDuration = 0;
             }
@@ -2679,10 +2679,10 @@
         mService.mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_TIMEOUT;
 
         forAllWindows(w -> {
-            if (!w.mOrientationChanging) {
+            if (!w.getOrientationChanging()) {
                 return;
             }
-            w.mOrientationChanging = false;
+            w.setOrientationChanging(false);
             w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime()
                     - mService.mDisplayFreezeTime);
             Slog.w(TAG_WM, "Force clearing orientation change: " + w);