summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Wu <stwu@google.com> 2019-02-15 17:12:51 -0500
committer Steven Wu <stwu@google.com> 2019-02-15 17:20:50 -0500
commita62cb6a337d0dc428b3e8ae76add71a7a034eb04 (patch)
tree010d4f84df00d1a751be5ba111a2aac161642100
parent3661808cb75bfa1c6cb429994fbe91755f191e6f (diff)
Add bubble logging for permission dialog shown.
Bug: 123543171 Test: manual Change-Id: I561939930e9d54579579b818bc25d06597b2d48c
-rw-r--r--cmds/statsd/src/atoms.proto2
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java5
3 files changed, 7 insertions, 2 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 2632294d9232..15d83970c758 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -5389,7 +5389,7 @@ message BubbleUIChanged {
HEADER_GO_TO_SETTINGS = 9;
PERMISSION_OPT_IN = 10;
PERMISSION_OPT_OUT = 11;
- PERMISSION_IGNORED = 12;
+ PERMISSION_DIALOG_SHOWN = 12;
SWIPE_LEFT = 13;
SWIPE_RIGHT = 14;
STACK_EXPANDED = 15;
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
index 492eadd240ed..38456eb4a096 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
@@ -304,6 +304,8 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList
mPermissionView.setVisibility(VISIBLE);
((ImageView) mPermissionView.findViewById(R.id.pkgicon)).setImageDrawable(mAppIcon);
((TextView) mPermissionView.findViewById(R.id.pkgname)).setText(mAppName);
+ logBubbleClickEvent(mEntry.notification,
+ StatsLog.BUBBLE_UICHANGED__ACTION__PERMISSION_DIALOG_SHOWN);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
index ed9b38b85156..0ab884ecbac8 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
@@ -762,7 +762,10 @@ public class BubbleStackView extends FrameLayout {
* @return the index of the bubble view within the bubble stack. The range of the position
* is between 0 and the bubble count minus 1.
*/
- int getBubbleIndex(Bubble bubble) {
+ int getBubbleIndex(@Nullable Bubble bubble) {
+ if (bubble == null) {
+ return 0;
+ }
return mBubbleContainer.indexOfChild(bubble.iconView);
}