diff options
| author | HrX03 <dn.bianco03@gmail.com> | 2020-12-17 15:13:30 +0000 |
|---|---|---|
| committer | Kshitij Gupta <kshitijgm@gmail.com> | 2020-12-21 09:22:36 +0000 |
| commit | a0ef7a76bdc1ed8a1ec806c2dfcb95343dd6e0bb (patch) | |
| tree | 22e802ad57337a774a9e66d3c0c610e13584bee6 /CompactPanel/src/co | |
| parent | 16af8ef1adfe2ae98aa1df6d9bbf350d755dd0a4 (diff) | |
[ @HrX03 - POSP ]
No idea what changed but it works so idc
Change-Id: Iaf9b76f8c4e95c3484c7672c169d76d540e46c14
Diffstat (limited to 'CompactPanel/src/co')
| -rw-r--r-- | CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java b/CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java index f474b9d..76fbcbe 100644 --- a/CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java +++ b/CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java @@ -374,15 +374,15 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { internalInsetsInfo.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_REGION); View main = mDialog.findViewById(R.id.main); int[] mainLocation = new int[2]; - main.getLocationOnScreen(mainLocation); - internalInsetsInfo.touchableRegion.set(new Region( + main.getLocationInWindow(mainLocation); + internalInsetsInfo.touchableRegion.set( mainLocation[0], mainLocation[1], mainLocation[0] + main.getWidth(), mPanelMode == PanelMode.MINI ? mainLocation[1] + main.getHeight() : mainLocation[1] + mDialogView.getHeight() - )); + ); }; protected ViewGroup getDialogView() { @@ -906,7 +906,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { } initSettingsH(); - mDialog.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsListener); + mDialog.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsListener); if(!mShowing && !mDialog.isShown()) { mDialogView.setTranslationX(0); @@ -1006,6 +1006,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { if (!isLandscape() && mPanelMode != PanelMode.MINI) animator.translationX((mDialogView.getWidth() / 2.0f)*(isAudioPanelOnLeftSide() ? -1 : 1)); animator.start(); + mDialog.getViewTreeObserver().removeOnComputeInternalInsetsListener(mInsetsListener); checkODICaptionsTooltip(true); mController.notifyVisible(false); synchronized (mSafetyWarningLock) { |
