Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e82f3c97 authored by Gus Prevas's avatar Gus Prevas
Browse files

Allows starting window to be shown for swipe-dismiss windows.

This change removes the hack in WindowManagerService which
prevented a starting window from being created for a window with
the swipe-to-dismiss flag set.  Per the comment in the file, a
starting window is not created for translucent windows (which a
swipe-to-dismiss window implicitly is) because the translucency
of the window interacts poorly with the default entry transition;
this does not apply to swipe-to-dismiss windows as they use a
different entry transition.

Removing this allows us to start the transition before the app
has finished drawing its UI (showing the app's theme's
default background drawable as suggested in
https://spec.googleplex.com/quantum/patterns/launch-screens.html)
which makes app launching on Wear much more responsive.

Bug: 23066614
Change-Id: I99b85aeb9a9fcce277239b6f430691c3abf86177
parent e3d006b1
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -4441,13 +4441,8 @@ public class WindowManagerService extends IWindowManager.Stub
                        + " ShowWallpaper="
                        + ent.array.getBoolean(
                                com.android.internal.R.styleable.Window_windowShowWallpaper, false));
                final boolean windowIsTranslucentDefined = ent.array.hasValue(
                        com.android.internal.R.styleable.Window_windowIsTranslucent);
                final boolean windowIsTranslucent = ent.array.getBoolean(
                        com.android.internal.R.styleable.Window_windowIsTranslucent, false);
                final boolean windowSwipeToDismiss = ent.array.getBoolean(
                        com.android.internal.R.styleable.Window_windowSwipeToDismiss, false);
                if (windowIsTranslucent || (!windowIsTranslucentDefined && windowSwipeToDismiss)) {
                if (ent.array.getBoolean(
                        com.android.internal.R.styleable.Window_windowIsTranslucent, false)) {
                    return;
                }
                if (ent.array.getBoolean(