Loading services/core/java/com/android/server/wm/WindowState.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -2256,9 +2256,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return false; return false; } } if (PixelFormat.formatHasAlpha(mAttrs.format)) { if (PixelFormat.formatHasAlpha(mAttrs.format) && mAttrs.alpha == 0) { // Support legacy use cases where transparent windows can still be ime target with // Support legacy use cases where completely transparent windows can still be ime target // FLAG_NOT_FOCUSABLE and ALT_FOCUSABLE_IM set. // with FLAG_NOT_FOCUSABLE and ALT_FOCUSABLE_IM set. // Certain apps listen for IME insets using transparent windows and ADJUST_NOTHING to // Certain apps listen for IME insets using transparent windows and ADJUST_NOTHING to // manually synchronize app content to IME animation b/144619551. // manually synchronize app content to IME animation b/144619551. // TODO(b/145812508): remove this once new focus management is complete b/141738570 // TODO(b/145812508): remove this once new focus management is complete b/141738570 Loading services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -251,9 +251,11 @@ public class WindowStateTests extends WindowTestsBase { // b/145812508: special legacy use-case for transparent/translucent windows. // b/145812508: special legacy use-case for transparent/translucent windows. appWindow.mAttrs.format = PixelFormat.TRANSPARENT; appWindow.mAttrs.format = PixelFormat.TRANSPARENT; appWindow.mAttrs.alpha = 0; assertTrue(appWindow.canBeImeTarget()); assertTrue(appWindow.canBeImeTarget()); appWindow.mAttrs.format = PixelFormat.OPAQUE; appWindow.mAttrs.format = PixelFormat.OPAQUE; appWindow.mAttrs.alpha = 1; appWindow.mAttrs.flags &= ~FLAG_ALT_FOCUSABLE_IM; appWindow.mAttrs.flags &= ~FLAG_ALT_FOCUSABLE_IM; assertFalse(appWindow.canBeImeTarget()); assertFalse(appWindow.canBeImeTarget()); appWindow.mAttrs.flags &= ~FLAG_NOT_FOCUSABLE; appWindow.mAttrs.flags &= ~FLAG_NOT_FOCUSABLE; Loading Loading
services/core/java/com/android/server/wm/WindowState.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -2256,9 +2256,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return false; return false; } } if (PixelFormat.formatHasAlpha(mAttrs.format)) { if (PixelFormat.formatHasAlpha(mAttrs.format) && mAttrs.alpha == 0) { // Support legacy use cases where transparent windows can still be ime target with // Support legacy use cases where completely transparent windows can still be ime target // FLAG_NOT_FOCUSABLE and ALT_FOCUSABLE_IM set. // with FLAG_NOT_FOCUSABLE and ALT_FOCUSABLE_IM set. // Certain apps listen for IME insets using transparent windows and ADJUST_NOTHING to // Certain apps listen for IME insets using transparent windows and ADJUST_NOTHING to // manually synchronize app content to IME animation b/144619551. // manually synchronize app content to IME animation b/144619551. // TODO(b/145812508): remove this once new focus management is complete b/141738570 // TODO(b/145812508): remove this once new focus management is complete b/141738570 Loading
services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -251,9 +251,11 @@ public class WindowStateTests extends WindowTestsBase { // b/145812508: special legacy use-case for transparent/translucent windows. // b/145812508: special legacy use-case for transparent/translucent windows. appWindow.mAttrs.format = PixelFormat.TRANSPARENT; appWindow.mAttrs.format = PixelFormat.TRANSPARENT; appWindow.mAttrs.alpha = 0; assertTrue(appWindow.canBeImeTarget()); assertTrue(appWindow.canBeImeTarget()); appWindow.mAttrs.format = PixelFormat.OPAQUE; appWindow.mAttrs.format = PixelFormat.OPAQUE; appWindow.mAttrs.alpha = 1; appWindow.mAttrs.flags &= ~FLAG_ALT_FOCUSABLE_IM; appWindow.mAttrs.flags &= ~FLAG_ALT_FOCUSABLE_IM; assertFalse(appWindow.canBeImeTarget()); assertFalse(appWindow.canBeImeTarget()); appWindow.mAttrs.flags &= ~FLAG_NOT_FOCUSABLE; appWindow.mAttrs.flags &= ~FLAG_NOT_FOCUSABLE; Loading