QS: Update layout to show gear all the time
Because evidently, when you've gotta change something, you've really
gotta change something.
Bug: 28673919
Change-Id: I085a0424c134a7f80316397b04a6b120440d32c8
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 0e8d76a..1211354 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -103,8 +103,6 @@
mTileLayout = (QSTileLayout) LayoutInflater.from(mContext).inflate(
R.layout.qs_paged_tile_layout, this, false);
addView((View) mTileLayout);
- findViewById(android.R.id.edit).setOnClickListener(view ->
- mHost.startRunnableDismissingKeyguard(() -> showEdit(view)));
}
public boolean isShowingCustomize() {
@@ -354,7 +352,7 @@
}
- private void showEdit(final View v) {
+ public void showEdit(final View v) {
v.post(new Runnable() {
@Override
public void run() {
@@ -362,8 +360,8 @@
if (!mCustomizePanel.isCustomizing()) {
int[] loc = new int[2];
v.getLocationInWindow(loc);
- int x = loc[0];
- int y = loc[1];
+ int x = loc[0] + v.getWidth() / 2;
+ int y = loc[1] + v.getHeight() / 2;
mCustomizePanel.show(x, y);
}
}