|
81 | 81 | import android.view.ViewGroup;
|
82 | 82 | import android.view.ViewPropertyAnimator;
|
83 | 83 | import android.view.ViewStub;
|
84 |
| -import android.view.ViewTreeObserver; |
85 |
| -import android.view.ViewTreeObserver.InternalInsetsInfo; |
86 |
| -import android.view.ViewTreeObserver.OnComputeInternalInsetsListener; |
87 | 84 | import android.view.Window;
|
88 | 85 | import android.view.WindowManager;
|
89 | 86 | import android.view.accessibility.AccessibilityEvent;
|
@@ -348,22 +345,6 @@ private void initDialog() {
|
348 | 345 | mMusicHidden = false;
|
349 | 346 | }
|
350 | 347 |
|
351 |
| - private final OnComputeInternalInsetsListener mInsetsListener = internalInsetsInfo -> { |
352 |
| - internalInsetsInfo.touchableRegion.setEmpty(); |
353 |
| - internalInsetsInfo.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_REGION); |
354 |
| - View main = mDialog.findViewById(R.id.main); |
355 |
| - int[] mainLocation = new int[2]; |
356 |
| - main.getLocationOnScreen(mainLocation); |
357 |
| - int[] dialogLocation = new int[2]; |
358 |
| - mDialogView.getLocationOnScreen(dialogLocation); |
359 |
| - internalInsetsInfo.touchableRegion.set(new Region( |
360 |
| - mainLocation[0], |
361 |
| - dialogLocation[1], |
362 |
| - mainLocation[0] + main.getWidth(), |
363 |
| - dialogLocation[1] + mDialogView.getHeight() |
364 |
| - )); |
365 |
| - }; |
366 |
| - |
367 | 348 | // Helper to set layout gravity.
|
368 | 349 | // Particular useful when the ViewGroup in question
|
369 | 350 | // is different for portait vs landscape.
|
@@ -835,7 +816,6 @@ private void showH(int reason) {
|
835 | 816 |
|
836 | 817 | initSettingsH();
|
837 | 818 | mIsAnimatingDismiss = false;
|
838 |
| - mDialog.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsListener); |
839 | 819 |
|
840 | 820 | if (!mShowing && !mDialog.isShown()) {
|
841 | 821 | if (!isLandscape()) {
|
|
0 commit comments