diff options
| author | 2020-02-12 17:34:54 +0800 | |
|---|---|---|
| committer | 2020-02-12 09:55:14 +0000 | |
| commit | c47b26f0388564dc99729d57fda442b9ed057f0d (patch) | |
| tree | 081449ce8644d173e93e24c3423551fb156a143f | |
| parent | a00008934115e91bb0a41b67c16268763f35ee6e (diff) | |
Remove redundant mFocusedApp from DisplayPolicy
We don't really use mFocusedApp in DisplayPolicy, but just print it out.
It may confuse the reader because we already have one in DisplayContent.
And these mFocusedApp fields can reference to different apps, because
the one in DisplayPolicy will stop updating while the DisplayPolicy
doesn't have a focused window.
Fix: 141869496
Test: Manual and presubmit
Change-Id: Ic6edbade2af24135ee86d4bd9b6d8965e61fa664
| -rw-r--r-- | services/core/java/com/android/server/wm/DisplayPolicy.java | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index c78707a2204e..bcfc56947494 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -145,7 +145,6 @@ import android.util.PrintWriterPrinter; import android.util.Slog; import android.view.DisplayCutout; import android.view.Gravity; -import android.view.IApplicationToken; import android.view.InputChannel; import android.view.InputDevice; import android.view.InputEvent; @@ -333,8 +332,6 @@ public class DisplayPolicy { private WindowState mFocusedWindow; private WindowState mLastFocusedWindow; - IApplicationToken mFocusedApp; - // The states of decor windows from the last layout. These are used to generate another display // layout in different bounds but with the same states. private boolean mLastNavVisible; @@ -3276,7 +3273,6 @@ public class DisplayPolicy { && mLastBehavior == behavior && mLastFocusIsFullscreen == isFullscreen && mLastFocusIsImmersive == isImmersive - && mFocusedApp == win.getAppToken() && mLastNonDockedStackBounds.equals(mNonDockedStackBounds) && mLastDockedStackBounds.equals(mDockedStackBounds)) { return 0; @@ -3293,7 +3289,6 @@ public class DisplayPolicy { mLastBehavior = behavior; mLastFocusIsFullscreen = isFullscreen; mLastFocusIsImmersive = isImmersive; - mFocusedApp = win.getAppToken(); mLastNonDockedStackBounds.set(mNonDockedStackBounds); mLastDockedStackBounds.set(mDockedStackBounds); final Rect fullscreenStackBounds = new Rect(mNonDockedStackBounds); @@ -3792,9 +3787,6 @@ public class DisplayPolicy { if (mFocusedWindow != null) { pw.print(prefix); pw.print("mFocusedWindow="); pw.println(mFocusedWindow); } - if (mFocusedApp != null) { - pw.print(prefix); pw.print("mFocusedApp="); pw.println(mFocusedApp); - } if (mTopFullscreenOpaqueWindowState != null) { pw.print(prefix); pw.print("mTopFullscreenOpaqueWindowState="); pw.println(mTopFullscreenOpaqueWindowState); |