diff options
author | Shalika Pathirathna <shalika.x.pathirathna@sony.com> | 2018-05-09 14:21:59 +0900 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-05-24 20:09:49 +0300 |
commit | 452c34d53f1f6718cab87fec9144d7a21b09b5f4 (patch) | |
tree | 3bbad7dd7d60eb86514d82cff03b7b490b42aa43 | |
parent | 64c1fc6f1580839cfadce62c17733439c8bfa556 (diff) | |
download | android_packages_apps_Dialer-452c34d53f1f6718cab87fec9144d7a21b09b5f4.tar.gz android_packages_apps_Dialer-452c34d53f1f6718cab87fec9144d7a21b09b5f4.tar.bz2 android_packages_apps_Dialer-452c34d53f1f6718cab87fec9144d7a21b09b5f4.zip |
Fix preview image overlaps a call button during video call
If a device supports hiding the navigation bar and it is enabled,
preview image overlaps a call button during video call. Because the
preview layout doesn't care about the visibility of the navigation bar.
To fix the problem, use APIs of WindowInsets that care about the
visibility of the navigation bar.
Bug: 80376182
Test: manual - Checked the preview image doesn't overlap a call button
when the navigation bar is not visible.
Change-Id: I72c9d504f0485c24a6be09a50869a8248745623f
-rw-r--r-- | java/com/android/incallui/video/impl/VideoCallFragment.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/java/com/android/incallui/video/impl/VideoCallFragment.java b/java/com/android/incallui/video/impl/VideoCallFragment.java index 634af2b81..8203c6a2d 100644 --- a/java/com/android/incallui/video/impl/VideoCallFragment.java +++ b/java/com/android/incallui/video/impl/VideoCallFragment.java @@ -541,13 +541,13 @@ public class VideoCallFragment extends Fragment return new Point(); } if (isLandscape()) { - int stableInsetEnd = + int systemWindowInsetEnd = getView().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL - ? getView().getRootWindowInsets().getStableInsetLeft() - : -getView().getRootWindowInsets().getStableInsetRight(); - return new Point(stableInsetEnd, 0); + ? getView().getRootWindowInsets().getSystemWindowInsetLeft() + : -getView().getRootWindowInsets().getSystemWindowInsetRight(); + return new Point(systemWindowInsetEnd, 0); } else { - return new Point(0, -getView().getRootWindowInsets().getStableInsetBottom()); + return new Point(0, -getView().getRootWindowInsets().getSystemWindowInsetBottom()); } } |