Merge "Avoid Rect instantiation in NavigationBarController.Impl" into tm-dev am: ad0a9c26f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17621594 Change-Id: Ifa3ff654dda195bc15b2e2bacfe7f7df29df37b5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -151,6 +151,8 @@ final class NavigationBarController {
|
|||||||
|
|
||||||
private boolean mDrawLegacyNavigationBarBackground;
|
private boolean mDrawLegacyNavigationBarBackground;
|
||||||
|
|
||||||
|
private final Rect mTempRect = new Rect();
|
||||||
|
|
||||||
Impl(@NonNull InputMethodService inputMethodService) {
|
Impl(@NonNull InputMethodService inputMethodService) {
|
||||||
mService = inputMethodService;
|
mService = inputMethodService;
|
||||||
}
|
}
|
||||||
@@ -281,13 +283,12 @@ final class NavigationBarController {
|
|||||||
touchableRegion.set(originalInsets.touchableRegion);
|
touchableRegion.set(originalInsets.touchableRegion);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
final Rect navBarRect = new Rect(decor.getLeft(),
|
mTempRect.set(decor.getLeft(), decor.getBottom() - systemInsets.bottom,
|
||||||
decor.getBottom() - systemInsets.bottom,
|
|
||||||
decor.getRight(), decor.getBottom());
|
decor.getRight(), decor.getBottom());
|
||||||
if (touchableRegion == null) {
|
if (touchableRegion == null) {
|
||||||
touchableRegion = new Region(navBarRect);
|
touchableRegion = new Region(mTempRect);
|
||||||
} else {
|
} else {
|
||||||
touchableRegion.union(navBarRect);
|
touchableRegion.union(mTempRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
dest.touchableRegion.set(touchableRegion);
|
dest.touchableRegion.set(touchableRegion);
|
||||||
|
|||||||
Reference in New Issue
Block a user