Fix user switcher ripple emanation point
Bug: 18444431
Change-Id: I35b053b151ba1e6e326d3a6c2bd2c3c8e3ad8c28
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index b4ae20d..cd4f299 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -215,9 +215,19 @@
mFooter.refreshState();
}
- public void showDetailAdapter(boolean show, DetailAdapter adapter) {
+ public void showDetailAdapter(boolean show, DetailAdapter adapter, int[] locationInWindow) {
+ int xInWindow = locationInWindow[0];
+ int yInWindow = locationInWindow[1];
+ mDetail.getLocationInWindow(locationInWindow);
+
Record r = new Record();
r.detailAdapter = adapter;
+ r.x = xInWindow - locationInWindow[0];
+ r.y = yInWindow - locationInWindow[1];
+
+ locationInWindow[0] = xInWindow;
+ locationInWindow[1] = yInWindow;
+
showDetail(show, r);
}
@@ -337,7 +347,13 @@
if (r instanceof TileRecord) {
handleShowDetailTile((TileRecord) r, show);
} else {
- handleShowDetailImpl(r, show, getWidth() /* x */, 0/* y */);
+ int x = 0;
+ int y = 0;
+ if (r != null) {
+ x = r.x;
+ y = r.y;
+ }
+ handleShowDetailImpl(r, show, x, y);
}
}
@@ -558,6 +574,8 @@
private static class Record {
View detailView;
DetailAdapter detailAdapter;
+ int x;
+ int y;
}
protected static final class TileRecord extends Record {