diff options
author | Shalika Pathirathna <shalika.x.pathirathna@sony.com> | 2018-05-09 14:21:59 +0900 |
---|---|---|
committer | takeshi tanigawa <takeshi.tanigawa@sony.com> | 2018-05-28 12:25:31 +0000 |
commit | c45aa72e4db7065b848ae919d8cc7b6e90dbba37 (patch) | |
tree | 0abad555dcaae6503495c3a675f0c4f0f959face /java | |
parent | 4efd0ebf003e985e7cbe40d8ffd9f7ff227a9611 (diff) |
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
Diffstat (limited to 'java')
-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 11b80ceb9..901facb01 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()); } } |