Use the correct Edge to Edge flag

- Use the correct flag to fix the navigation bar problem.

Fixes: 330217912
Test: manual test
Change-Id: I37869d5cc713be2b03bc8e9206ff1e0dcee8512e
This commit is contained in:
Sunny Shao
2024-03-25 09:19:11 +08:00
parent 4230ad4b07
commit 8d4ba6d904

View File

@@ -1385,7 +1385,7 @@ public final class Utils extends com.android.settingslib.Utils {
* @param activity the Activity need to setup the edge to edge feature. * @param activity the Activity need to setup the edge to edge feature.
*/ */
public static void setupEdgeToEdge(@NonNull FragmentActivity activity) { public static void setupEdgeToEdge(@NonNull FragmentActivity activity) {
if (com.android.window.flags.Flags.edgeToEdgeByDefault()) { if (com.android.window.flags.Flags.enforceEdgeToEdge()) {
ViewCompat.setOnApplyWindowInsetsListener(activity.findViewById(android.R.id.content), ViewCompat.setOnApplyWindowInsetsListener(activity.findViewById(android.R.id.content),
(v, windowInsets) -> { (v, windowInsets) -> {
Insets insets = windowInsets.getInsets( Insets insets = windowInsets.getInsets(