Loading core/java/android/view/InsetsFrameProvider.java +11 −2 Original line number Diff line number Diff line Loading @@ -223,6 +223,10 @@ public class InsetsFrameProvider implements Parcelable { if (mArbitraryRectangle != null) { sb.append(", mArbitraryRectangle=").append(mArbitraryRectangle.toShortString()); } if (mMinimalInsetsSizeInDisplayCutoutSafe != null) { sb.append(", mMinimalInsetsSizeInDisplayCutoutSafe=") .append(mMinimalInsetsSizeInDisplayCutoutSafe); } sb.append("}"); return sb.toString(); } Loading @@ -248,6 +252,7 @@ public class InsetsFrameProvider implements Parcelable { mInsetsSize = in.readTypedObject(Insets.CREATOR); mInsetsSizeOverrides = in.createTypedArray(InsetsSizeOverride.CREATOR); mArbitraryRectangle = in.readTypedObject(Rect.CREATOR); mMinimalInsetsSizeInDisplayCutoutSafe = in.readTypedObject(Insets.CREATOR); } @Override Loading @@ -258,6 +263,7 @@ public class InsetsFrameProvider implements Parcelable { out.writeTypedObject(mInsetsSize, flags); out.writeTypedArray(mInsetsSizeOverrides, flags); out.writeTypedObject(mArbitraryRectangle, flags); out.writeTypedObject(mMinimalInsetsSizeInDisplayCutoutSafe, flags); } public boolean idEquals(InsetsFrameProvider o) { Loading @@ -276,13 +282,16 @@ public class InsetsFrameProvider implements Parcelable { return mId == other.mId && mSource == other.mSource && mFlags == other.mFlags && Objects.equals(mInsetsSize, other.mInsetsSize) && Arrays.equals(mInsetsSizeOverrides, other.mInsetsSizeOverrides) && Objects.equals(mArbitraryRectangle, other.mArbitraryRectangle); && Objects.equals(mArbitraryRectangle, other.mArbitraryRectangle) && Objects.equals(mMinimalInsetsSizeInDisplayCutoutSafe, other.mMinimalInsetsSizeInDisplayCutoutSafe); } @Override public int hashCode() { return Objects.hash(mId, mSource, mFlags, mInsetsSize, Arrays.hashCode(mInsetsSizeOverrides), mArbitraryRectangle); Arrays.hashCode(mInsetsSizeOverrides), mArbitraryRectangle, mMinimalInsetsSizeInDisplayCutoutSafe); } public static final @NonNull Parcelable.Creator<InsetsFrameProvider> CREATOR = Loading packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +7 −7 Original line number Diff line number Diff line Loading @@ -76,7 +76,6 @@ import android.telecom.TelecomManager; import android.text.TextUtils; import android.util.Log; import android.view.Display; import android.view.DisplayCutout; import android.view.Gravity; import android.view.HapticFeedbackConstants; import android.view.InsetsFrameProvider; Loading Loading @@ -1730,9 +1729,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements tappableElementProvider.setInsetsSize(Insets.NONE); } final DisplayCutout cutout = userContext.getDisplay().getCutout(); final int safeInsetsLeft = cutout != null ? cutout.getSafeInsetLeft() : 0; final int safeInsetsRight = cutout != null ? cutout.getSafeInsetRight() : 0; final int gestureHeight = userContext.getResources().getDimensionPixelSize( com.android.internal.R.dimen.navigation_bar_gesture_height); final boolean handlingGesture = mEdgeBackGestureHandler.isHandlingGestures(); Loading @@ -1742,19 +1738,23 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mandatoryGestureProvider.setInsetsSize(Insets.of(0, 0, 0, gestureHeight)); } final int gestureInsetsLeft = handlingGesture ? mEdgeBackGestureHandler.getEdgeWidthLeft() + safeInsetsLeft : 0; ? mEdgeBackGestureHandler.getEdgeWidthLeft() : 0; final int gestureInsetsRight = handlingGesture ? mEdgeBackGestureHandler.getEdgeWidthRight() + safeInsetsRight : 0; ? mEdgeBackGestureHandler.getEdgeWidthRight() : 0; return new InsetsFrameProvider[] { navBarProvider, tappableElementProvider, mandatoryGestureProvider, new InsetsFrameProvider(mInsetsSourceOwner, 0, WindowInsets.Type.systemGestures()) .setSource(InsetsFrameProvider.SOURCE_DISPLAY) .setInsetsSize(Insets.of(gestureInsetsLeft, 0, 0, 0)), .setInsetsSize(Insets.of(gestureInsetsLeft, 0, 0, 0)) .setMinimalInsetsSizeInDisplayCutoutSafe( Insets.of(gestureInsetsLeft, 0, 0, 0)), new InsetsFrameProvider(mInsetsSourceOwner, 1, WindowInsets.Type.systemGestures()) .setSource(InsetsFrameProvider.SOURCE_DISPLAY) .setInsetsSize(Insets.of(0, 0, gestureInsetsRight, 0)) .setMinimalInsetsSizeInDisplayCutoutSafe( Insets.of(0, 0, gestureInsetsRight, 0)) }; } Loading Loading
core/java/android/view/InsetsFrameProvider.java +11 −2 Original line number Diff line number Diff line Loading @@ -223,6 +223,10 @@ public class InsetsFrameProvider implements Parcelable { if (mArbitraryRectangle != null) { sb.append(", mArbitraryRectangle=").append(mArbitraryRectangle.toShortString()); } if (mMinimalInsetsSizeInDisplayCutoutSafe != null) { sb.append(", mMinimalInsetsSizeInDisplayCutoutSafe=") .append(mMinimalInsetsSizeInDisplayCutoutSafe); } sb.append("}"); return sb.toString(); } Loading @@ -248,6 +252,7 @@ public class InsetsFrameProvider implements Parcelable { mInsetsSize = in.readTypedObject(Insets.CREATOR); mInsetsSizeOverrides = in.createTypedArray(InsetsSizeOverride.CREATOR); mArbitraryRectangle = in.readTypedObject(Rect.CREATOR); mMinimalInsetsSizeInDisplayCutoutSafe = in.readTypedObject(Insets.CREATOR); } @Override Loading @@ -258,6 +263,7 @@ public class InsetsFrameProvider implements Parcelable { out.writeTypedObject(mInsetsSize, flags); out.writeTypedArray(mInsetsSizeOverrides, flags); out.writeTypedObject(mArbitraryRectangle, flags); out.writeTypedObject(mMinimalInsetsSizeInDisplayCutoutSafe, flags); } public boolean idEquals(InsetsFrameProvider o) { Loading @@ -276,13 +282,16 @@ public class InsetsFrameProvider implements Parcelable { return mId == other.mId && mSource == other.mSource && mFlags == other.mFlags && Objects.equals(mInsetsSize, other.mInsetsSize) && Arrays.equals(mInsetsSizeOverrides, other.mInsetsSizeOverrides) && Objects.equals(mArbitraryRectangle, other.mArbitraryRectangle); && Objects.equals(mArbitraryRectangle, other.mArbitraryRectangle) && Objects.equals(mMinimalInsetsSizeInDisplayCutoutSafe, other.mMinimalInsetsSizeInDisplayCutoutSafe); } @Override public int hashCode() { return Objects.hash(mId, mSource, mFlags, mInsetsSize, Arrays.hashCode(mInsetsSizeOverrides), mArbitraryRectangle); Arrays.hashCode(mInsetsSizeOverrides), mArbitraryRectangle, mMinimalInsetsSizeInDisplayCutoutSafe); } public static final @NonNull Parcelable.Creator<InsetsFrameProvider> CREATOR = Loading
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +7 −7 Original line number Diff line number Diff line Loading @@ -76,7 +76,6 @@ import android.telecom.TelecomManager; import android.text.TextUtils; import android.util.Log; import android.view.Display; import android.view.DisplayCutout; import android.view.Gravity; import android.view.HapticFeedbackConstants; import android.view.InsetsFrameProvider; Loading Loading @@ -1730,9 +1729,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements tappableElementProvider.setInsetsSize(Insets.NONE); } final DisplayCutout cutout = userContext.getDisplay().getCutout(); final int safeInsetsLeft = cutout != null ? cutout.getSafeInsetLeft() : 0; final int safeInsetsRight = cutout != null ? cutout.getSafeInsetRight() : 0; final int gestureHeight = userContext.getResources().getDimensionPixelSize( com.android.internal.R.dimen.navigation_bar_gesture_height); final boolean handlingGesture = mEdgeBackGestureHandler.isHandlingGestures(); Loading @@ -1742,19 +1738,23 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mandatoryGestureProvider.setInsetsSize(Insets.of(0, 0, 0, gestureHeight)); } final int gestureInsetsLeft = handlingGesture ? mEdgeBackGestureHandler.getEdgeWidthLeft() + safeInsetsLeft : 0; ? mEdgeBackGestureHandler.getEdgeWidthLeft() : 0; final int gestureInsetsRight = handlingGesture ? mEdgeBackGestureHandler.getEdgeWidthRight() + safeInsetsRight : 0; ? mEdgeBackGestureHandler.getEdgeWidthRight() : 0; return new InsetsFrameProvider[] { navBarProvider, tappableElementProvider, mandatoryGestureProvider, new InsetsFrameProvider(mInsetsSourceOwner, 0, WindowInsets.Type.systemGestures()) .setSource(InsetsFrameProvider.SOURCE_DISPLAY) .setInsetsSize(Insets.of(gestureInsetsLeft, 0, 0, 0)), .setInsetsSize(Insets.of(gestureInsetsLeft, 0, 0, 0)) .setMinimalInsetsSizeInDisplayCutoutSafe( Insets.of(gestureInsetsLeft, 0, 0, 0)), new InsetsFrameProvider(mInsetsSourceOwner, 1, WindowInsets.Type.systemGestures()) .setSource(InsetsFrameProvider.SOURCE_DISPLAY) .setInsetsSize(Insets.of(0, 0, gestureInsetsRight, 0)) .setMinimalInsetsSizeInDisplayCutoutSafe( Insets.of(0, 0, gestureInsetsRight, 0)) }; } Loading