Merge "Fixes the inability to start quickscrub because hit target is none" into pi-dev
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 8fb0620..88bc6ea 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -842,10 +842,17 @@
buttonBounds.setEmpty();
return;
}
+ // Temporarily reset the translation back to origin to get the position in window
+ final float posX = view.getTranslationX();
+ final float posY = view.getTranslationY();
+ view.setTranslationX(0);
+ view.setTranslationY(0);
view.getLocationInWindow(mTmpPosition);
buttonBounds.set(mTmpPosition[0], mTmpPosition[1],
mTmpPosition[0] + view.getMeasuredWidth(),
mTmpPosition[1] + view.getMeasuredHeight());
+ view.setTranslationX(posX);
+ view.setTranslationY(posY);
}
private void updateRotatedViews() {