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

Commit 0281cd9d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix touchable region calculation in NavigationBarController" into...

Merge "Fix touchable region calculation in NavigationBarController" into tm-dev am: 67bb5cec am: 60e005df

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17592189



Change-Id: I6fd8e602e977ab223a3a5a028a31ff2473b16ff4
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 3d265c27 60e005df
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -259,23 +259,22 @@ final class NavigationBarController {
                switch (originalInsets.touchableInsets) {
                    case ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_FRAME:
                        if (inputFrame.getVisibility() == View.VISIBLE) {
                            touchableRegion = new Region(inputFrame.getLeft(),
                                    inputFrame.getTop(), inputFrame.getRight(),
                                    inputFrame.getBottom());
                            inputFrame.getBoundsOnScreen(mTempRect);
                            touchableRegion = new Region(mTempRect);
                        }
                        break;
                    case ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_CONTENT:
                        if (inputFrame.getVisibility() == View.VISIBLE) {
                            touchableRegion = new Region(inputFrame.getLeft(),
                                    originalInsets.contentTopInsets, inputFrame.getRight(),
                                    inputFrame.getBottom());
                            inputFrame.getBoundsOnScreen(mTempRect);
                            mTempRect.top = originalInsets.contentTopInsets;
                            touchableRegion = new Region(mTempRect);
                        }
                        break;
                    case ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_VISIBLE:
                        if (inputFrame.getVisibility() == View.VISIBLE) {
                            touchableRegion = new Region(inputFrame.getLeft(),
                                    originalInsets.visibleTopInsets, inputFrame.getRight(),
                                    inputFrame.getBottom());
                            inputFrame.getBoundsOnScreen(mTempRect);
                            mTempRect.top = originalInsets.visibleTopInsets;
                            touchableRegion = new Region(mTempRect);
                        }
                        break;
                    case ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_REGION:
@@ -283,6 +282,7 @@ final class NavigationBarController {
                        touchableRegion.set(originalInsets.touchableRegion);
                        break;
                }
                // Hereafter "mTempRect" means a navigation bar rect.
                mTempRect.set(decor.getLeft(), decor.getBottom() - systemInsets.bottom,
                        decor.getRight(), decor.getBottom());
                if (touchableRegion == null) {