Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0675cec authored by HrX03's avatar HrX03 Committed by Arian
Browse files

VolumeDialogImpl: Get the location in window instead of on screen



* This fixes the location on devices with display cutouts.

Signed-off-by: default avatarArian <arian.kulmer@web.de>
Change-Id: I38b84d227a36081d94d04d9985e73dc682effbda
parent 678a06b7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -376,9 +376,9 @@ public class VolumeDialogImpl implements VolumeDialog,
        internalInsetsInfo.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_REGION);
        View main = mDialog.findViewById(R.id.main);
        int[] mainLocation = new int[2];
        main.getLocationOnScreen(mainLocation);
        main.getLocationInWindow(mainLocation);
        int[] dialogLocation = new int[2];
        mDialogView.getLocationOnScreen(dialogLocation);
        mDialogView.getLocationInWindow(dialogLocation);
        internalInsetsInfo.touchableRegion.set(new Region(
                mainLocation[0],
                dialogLocation[1],