summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/qs/tiles
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs/tiles')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java
index f0c4f52..d09ca92 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java
@@ -55,6 +55,7 @@ public class CustomQSTile extends QSTile<QSTile.State> {
private CustomTile.ExpandedStyle mExpandedStyle;
private PendingIntent mOnClick;
+ private PendingIntent mOnLongClick;
private Uri mOnClickUri;
private int mCurrentUserId;
private StatusBarPanelCustomTile mTile;
@@ -92,7 +93,16 @@ public class CustomQSTile extends QSTile<QSTile.State> {
@Override
protected void handleLongClick() {
- if (mExpandedStyle == null) {
+ if (mOnLongClick != null) {
+ if (mOnLongClick.isActivity()) {
+ getHost().collapsePanels();
+ }
+ try {
+ mOnLongClick.send();
+ } catch (Throwable e) {
+ Log.w(TAG, "Error sending long click intent", e);
+ }
+ } else if (mExpandedStyle == null) {
showDetail(true);
}
}
@@ -143,6 +153,7 @@ public class CustomQSTile extends QSTile<QSTile.State> {
state.icon = new ExternalBitmapIcon(customTile.remoteIcon);
}
mOnClick = customTile.onClick;
+ mOnLongClick = customTile.onLongClick;
mOnClickUri = customTile.onClickUri;
mExpandedStyle = customTile.expandedStyle;
mCollapsePanel = customTile.collapsePanel;