diff options
| author | 2022-02-23 12:06:32 +0000 | |
|---|---|---|
| committer | 2022-02-23 12:06:32 +0000 | |
| commit | 6bc26a037445e92b14d277f281f9783457305e8c (patch) | |
| tree | 8d841d67ac68569414b5758d1ce1ecb274991fe2 | |
| parent | 7f7b20e086fc821aece66996f6a0007d50657585 (diff) | |
| parent | 04b037e07d8930796e76c97096041aef6d7e0ec3 (diff) | |
Merge "Fix NPE when calling dispatchTouchEvent in FloatingToolbarRoot" into tm-dev
| -rw-r--r-- | core/java/android/service/selectiontoolbar/FloatingToolbarRoot.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/service/selectiontoolbar/FloatingToolbarRoot.java b/core/java/android/service/selectiontoolbar/FloatingToolbarRoot.java index 8fe6f71b598d..adc9251d89be 100644 --- a/core/java/android/service/selectiontoolbar/FloatingToolbarRoot.java +++ b/core/java/android/service/selectiontoolbar/FloatingToolbarRoot.java @@ -40,7 +40,7 @@ public class FloatingToolbarRoot extends LinearLayout { private final IBinder mTargetInputToken; private final SelectionToolbarRenderService.TransferTouchListener mTransferTouchListener; - private Rect mContentRect; + private final Rect mContentRect = new Rect(); private int mLastDownX = -1; private int mLastDownY = -1; @@ -57,7 +57,7 @@ public class FloatingToolbarRoot extends LinearLayout { * Sets the Rect that shows the selection toolbar content. */ public void setContentRect(Rect contentRect) { - mContentRect = contentRect; + mContentRect.set(contentRect); } @Override |