Merge "Fix wrong padding on global actions dialog" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-04-15 11:56:25 +00:00
committed by Android (Google) Code Review

View File

@@ -43,7 +43,6 @@ import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.graphics.Color;
import android.graphics.Insets;
import android.graphics.drawable.Drawable;
import android.media.AudioManager;
import android.net.ConnectivityManager;
@@ -2178,8 +2177,10 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
ViewGroup root = (ViewGroup) mGlobalActionsLayout.getRootView();
root.setOnApplyWindowInsetsListener((v, windowInsets) -> {
if (mControlsUiController != null) {
Insets insets = windowInsets.getInsets(WindowInsets.Type.all());
root.setPadding(insets.left, insets.top, insets.right, insets.bottom);
root.setPadding(windowInsets.getStableInsetLeft(),
windowInsets.getStableInsetTop(),
windowInsets.getStableInsetRight(),
windowInsets.getStableInsetBottom());
}
return WindowInsets.CONSUMED;
});