diff options
| author | 2019-02-21 16:30:43 +0000 | |
|---|---|---|
| committer | 2019-02-21 16:30:43 +0000 | |
| commit | 8bfcea1ac5d44a43ced43944e51222cd10a72626 (patch) | |
| tree | 6027fab3b67db630a9f4ea926603a293bfefa984 | |
| parent | f9aa3044f2b493272fa1a0254dab7d74a1c83cdc (diff) | |
| parent | a62cb6a337d0dc428b3e8ae76add71a7a034eb04 (diff) | |
Merge "Add bubble logging for permission dialog shown."
3 files changed, 7 insertions, 2 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 62926cb85687..78e994fc5c61 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -5455,7 +5455,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 c2327ad41d3e..80b5f336ce07 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java @@ -321,6 +321,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 5546e4c50174..42e3b2812b38 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java @@ -786,7 +786,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); } |