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

Commit cd91b42e authored by Nigel Wang's avatar Nigel Wang
Browse files

Add windowSwipeToDismiss attribute in themes_material.xml

We stopped setting the `windowSwipeToDismiss` on main branch. However, if the APP didn't set this attribute explicitly and it's using the AndroidX helper class, the default value will be `false`.
Because the `getIndexCount()` method will return 0. See the code link below.

https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:wear/wear/src/main/java/androidx/wear/utils/WearableNavigationHelper.java;drc=f59de72b8aea152732fc9aa4bb12a61c85d38f01;l=60

This patch set the `windowSwipeToDismiss` attribute to `@empty` so that `getIndexCount()` will not return 0 and the`isSwipeToDismissEnabled()` can correctly override `windowSwipeToDismiss` attribute.



Bug:303796155
Change-Id: Ia0d522e58d686b42a3433f55baaa0ca5fa45081c
Test: manual
parent aec048d6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -181,6 +181,7 @@ please see themes_device_defaults.xml.
        <item name="windowSharedElementExitTransition">@transition/move</item>
        <item name="windowContentTransitions">false</item>
        <item name="windowActivityTransitions">true</item>
        <item name="windowSwipeToDismiss">@empty</item>

        <!-- Dialog attributes -->
        <item name="dialogTheme">@style/ThemeOverlay.Material.Dialog</item>
@@ -554,6 +555,7 @@ please see themes_device_defaults.xml.
        <item name="windowSharedElementExitTransition">@transition/move</item>
        <item name="windowContentTransitions">false</item>
        <item name="windowActivityTransitions">true</item>
        <item name="windowSwipeToDismiss">@empty</item>

        <!-- Dialog attributes -->
        <item name="dialogTheme">@style/ThemeOverlay.Material.Dialog</item>