[DO NOT MERGE] Catch a missed case when adding a toast am: 5c90c5e32e
am: a9aa78b1fd
Change-Id: Iba49fa7331a183fe14cd87583a8614552f33aadd
This commit is contained in:
@@ -28,15 +28,11 @@ import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
|
||||
import static com.android.server.wm.WindowState.RESIZE_HANDLE_WIDTH_IN_DP;
|
||||
|
||||
import android.app.ActivityManager.StackId;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.Region;
|
||||
import android.graphics.Region.Op;
|
||||
import android.os.Build;
|
||||
import android.os.UserHandle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Slog;
|
||||
import android.view.Display;
|
||||
@@ -728,8 +724,7 @@ class DisplayContent {
|
||||
for (int i = 0; i < windowCount; i++) {
|
||||
WindowState window = windows.get(i);
|
||||
if (window.mAttrs.type == TYPE_TOAST && window.mOwnerUid == uid
|
||||
&& !window.mPermanentlyHidden && !window.mAnimatingExit
|
||||
&& !window.mRemoveOnExit) {
|
||||
&& !window.isRemovedOrHidden()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2961,4 +2961,10 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
public boolean isRtl() {
|
||||
return mMergedConfiguration.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
|
||||
}
|
||||
|
||||
public boolean isRemovedOrHidden() {
|
||||
return mPermanentlyHidden || mAnimatingExit
|
||||
|| mRemoveOnExit || mWindowRemovalAllowed
|
||||
|| mViewVisibility == View.GONE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user