summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/service/selectiontoolbar/FloatingToolbarRoot.java4
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