summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2015-07-01 15:33:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-01 15:33:32 +0000
commitc58d1695307923c8074f5803a0e01cda1869d231 (patch)
tree499f568e1d0b019a67d9c348151119b34cd1f065 /packages
parente51c46b0683114d0aa9010a45ec0443505a0b389 (diff)
parentafa6185a8134c329ddb459c6b1302f6696a621fd (diff)
downloadframeworks_base-c58d1695307923c8074f5803a0e01cda1869d231.zip
frameworks_base-c58d1695307923c8074f5803a0e01cda1869d231.tar.gz
frameworks_base-c58d1695307923c8074f5803a0e01cda1869d231.tar.bz2
Merge changes from topic 'tron' into mnc-dev
* changes: remove double count of panel open report notification load on panel reveal
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java7
4 files changed, 13 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 3e66907..6ad0ef9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -1623,7 +1623,13 @@ public abstract class BaseStatusBar extends SystemUI implements
boolean clearNotificationEffects = !isPanelFullyCollapsed() &&
(mShowLockscreenNotifications ||
(mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED));
- mBarService.onPanelRevealed(clearNotificationEffects);
+ int notificationLoad = mNotificationData.getActiveNotifications().size();
+ if (mHeadsUpManager.hasPinnedHeadsUp() && isPanelFullyCollapsed()) {
+ notificationLoad = 1;
+ } else {
+ MetricsLogger.histogram(mContext, "note_load", notificationLoad);
+ }
+ mBarService.onPanelRevealed(clearNotificationEffects, notificationLoad);
} else {
mBarService.onPanelHidden();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index c89a37d..094b9b5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -721,7 +721,6 @@ public class NotificationPanelView extends PanelView implements
if (mListenForHeadsUp && !mHeadsUpTouchHelper.isTrackingHeadsUp()
&& mHeadsUpTouchHelper.onInterceptTouchEvent(event)) {
mIsExpansionFromHeadsUp = true;
- MetricsLogger.count(mContext, COUNTER_PANEL_OPEN, 1);
MetricsLogger.count(mContext, COUNTER_PANEL_OPEN_PEEK, 1);
}
if ((!mIsExpanding || mHintAnimationRunning)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 3678cf1..a637e24 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1180,6 +1180,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
notification.getKey());
notification.getNotification().fullScreenIntent.send();
shadeEntry.notifyFullScreenIntentLaunched();
+ MetricsLogger.count(mContext, "note_fullscreen", 1);
} catch (PendingIntent.CanceledException e) {
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
index 98bbe7c..63f5711 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
@@ -29,6 +29,7 @@ import android.view.View;
import android.view.ViewTreeObserver;
import android.view.accessibility.AccessibilityEvent;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.statusbar.ExpandableNotificationRow;
import com.android.systemui.statusbar.NotificationData;
@@ -82,6 +83,7 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
private final View mStatusBarWindowView;
private final int mStatusBarHeight;
private final int mNotificationsTopPadding;
+ private final Context mContext;
private PhoneStatusBar mBar;
private int mSnoozeLengthMs;
private ContentObserver mSettingsObserver;
@@ -101,7 +103,8 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
private boolean mIsObserving;
public HeadsUpManager(final Context context, View statusBarWindowView) {
- Resources resources = context.getResources();
+ mContext = context;
+ Resources resources = mContext.getResources();
mTouchAcceptanceDelay = resources.getInteger(R.integer.touch_acceptance_delay);
mSnoozedPackages = new ArrayMap<>();
mDefaultSnoozeLengthMs = resources.getInteger(R.integer.heads_up_default_snooze_length_ms);
@@ -165,6 +168,7 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
*/
public void showNotification(NotificationData.Entry headsUp) {
if (DEBUG) Log.v(TAG, "showNotification");
+ MetricsLogger.count(mContext, "note_peek", 1);
addHeadsUpEntry(headsUp);
updateNotification(headsUp, true);
headsUp.setInterruption();
@@ -522,7 +526,6 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
});
}
-
/**
* This represents a notification and how long it is in a heads up mode. It also manages its
* lifecycle automatically when created.