* commit 'f1cc651bf5013e63ad05af38be0c0c4888ea7d80': remove double count of panel open report notification load on panel reveal
This commit is contained in:
@@ -44,7 +44,7 @@ interface IStatusBarService
|
|||||||
// You need the STATUS_BAR_SERVICE permission
|
// You need the STATUS_BAR_SERVICE permission
|
||||||
void registerStatusBar(IStatusBar callbacks, out StatusBarIconList iconList,
|
void registerStatusBar(IStatusBar callbacks, out StatusBarIconList iconList,
|
||||||
out int[] switches, out List<IBinder> binders);
|
out int[] switches, out List<IBinder> binders);
|
||||||
void onPanelRevealed(boolean clearNotificationEffects);
|
void onPanelRevealed(boolean clearNotificationEffects, int numItems);
|
||||||
void onPanelHidden();
|
void onPanelHidden();
|
||||||
// Mark current notifications as "seen" and stop ringing, vibrating, blinking.
|
// Mark current notifications as "seen" and stop ringing, vibrating, blinking.
|
||||||
void clearNotificationEffects();
|
void clearNotificationEffects();
|
||||||
|
|||||||
@@ -1623,7 +1623,13 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
boolean clearNotificationEffects = !isPanelFullyCollapsed() &&
|
boolean clearNotificationEffects = !isPanelFullyCollapsed() &&
|
||||||
(mShowLockscreenNotifications ||
|
(mShowLockscreenNotifications ||
|
||||||
(mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED));
|
(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 {
|
} else {
|
||||||
mBarService.onPanelHidden();
|
mBarService.onPanelHidden();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -721,7 +721,6 @@ public class NotificationPanelView extends PanelView implements
|
|||||||
if (mListenForHeadsUp && !mHeadsUpTouchHelper.isTrackingHeadsUp()
|
if (mListenForHeadsUp && !mHeadsUpTouchHelper.isTrackingHeadsUp()
|
||||||
&& mHeadsUpTouchHelper.onInterceptTouchEvent(event)) {
|
&& mHeadsUpTouchHelper.onInterceptTouchEvent(event)) {
|
||||||
mIsExpansionFromHeadsUp = true;
|
mIsExpansionFromHeadsUp = true;
|
||||||
MetricsLogger.count(mContext, COUNTER_PANEL_OPEN, 1);
|
|
||||||
MetricsLogger.count(mContext, COUNTER_PANEL_OPEN_PEEK, 1);
|
MetricsLogger.count(mContext, COUNTER_PANEL_OPEN_PEEK, 1);
|
||||||
}
|
}
|
||||||
if ((!mIsExpanding || mHintAnimationRunning)
|
if ((!mIsExpanding || mHintAnimationRunning)
|
||||||
|
|||||||
@@ -1180,6 +1180,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
notification.getKey());
|
notification.getKey());
|
||||||
notification.getNotification().fullScreenIntent.send();
|
notification.getNotification().fullScreenIntent.send();
|
||||||
shadeEntry.notifyFullScreenIntentLaunched();
|
shadeEntry.notifyFullScreenIntentLaunched();
|
||||||
|
MetricsLogger.count(mContext, "note_fullscreen", 1);
|
||||||
} catch (PendingIntent.CanceledException e) {
|
} catch (PendingIntent.CanceledException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import android.view.View;
|
|||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.view.accessibility.AccessibilityEvent;
|
import android.view.accessibility.AccessibilityEvent;
|
||||||
|
|
||||||
|
import com.android.internal.logging.MetricsLogger;
|
||||||
import com.android.systemui.R;
|
import com.android.systemui.R;
|
||||||
import com.android.systemui.statusbar.ExpandableNotificationRow;
|
import com.android.systemui.statusbar.ExpandableNotificationRow;
|
||||||
import com.android.systemui.statusbar.NotificationData;
|
import com.android.systemui.statusbar.NotificationData;
|
||||||
@@ -82,6 +83,7 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
|
|||||||
private final View mStatusBarWindowView;
|
private final View mStatusBarWindowView;
|
||||||
private final int mStatusBarHeight;
|
private final int mStatusBarHeight;
|
||||||
private final int mNotificationsTopPadding;
|
private final int mNotificationsTopPadding;
|
||||||
|
private final Context mContext;
|
||||||
private PhoneStatusBar mBar;
|
private PhoneStatusBar mBar;
|
||||||
private int mSnoozeLengthMs;
|
private int mSnoozeLengthMs;
|
||||||
private ContentObserver mSettingsObserver;
|
private ContentObserver mSettingsObserver;
|
||||||
@@ -101,7 +103,8 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
|
|||||||
private boolean mIsObserving;
|
private boolean mIsObserving;
|
||||||
|
|
||||||
public HeadsUpManager(final Context context, View statusBarWindowView) {
|
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);
|
mTouchAcceptanceDelay = resources.getInteger(R.integer.touch_acceptance_delay);
|
||||||
mSnoozedPackages = new ArrayMap<>();
|
mSnoozedPackages = new ArrayMap<>();
|
||||||
mDefaultSnoozeLengthMs = resources.getInteger(R.integer.heads_up_default_snooze_length_ms);
|
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) {
|
public void showNotification(NotificationData.Entry headsUp) {
|
||||||
if (DEBUG) Log.v(TAG, "showNotification");
|
if (DEBUG) Log.v(TAG, "showNotification");
|
||||||
|
MetricsLogger.count(mContext, "note_peek", 1);
|
||||||
addHeadsUpEntry(headsUp);
|
addHeadsUpEntry(headsUp);
|
||||||
updateNotification(headsUp, true);
|
updateNotification(headsUp, true);
|
||||||
headsUp.setInterruption();
|
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
|
* This represents a notification and how long it is in a heads up mode. It also manages its
|
||||||
* lifecycle automatically when created.
|
* lifecycle automatically when created.
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ option java_package com.android.server
|
|||||||
2752 notification_cancel_all (uid|1|5),(pid|1|5),(pkg|3),(userid|1|5),(required_flags|1),(forbidden_flags|1),(reason|1|5),(listener|3)
|
2752 notification_cancel_all (uid|1|5),(pid|1|5),(pkg|3),(userid|1|5),(required_flags|1),(forbidden_flags|1),(reason|1|5),(listener|3)
|
||||||
# when the notification panel is shown
|
# when the notification panel is shown
|
||||||
# Note: New tag range starts here since 2753+ have been used below.
|
# Note: New tag range starts here since 2753+ have been used below.
|
||||||
27500 notification_panel_revealed
|
27500 notification_panel_revealed (items|1)
|
||||||
# when the notification panel is hidden
|
# when the notification panel is hidden
|
||||||
27501 notification_panel_hidden
|
27501 notification_panel_hidden
|
||||||
# when notifications are newly displayed on screen, or disappear from screen
|
# when notifications are newly displayed on screen, or disappear from screen
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public interface NotificationDelegate {
|
|||||||
void onNotificationError(int callingUid, int callingPid,
|
void onNotificationError(int callingUid, int callingPid,
|
||||||
String pkg, String tag, int id,
|
String pkg, String tag, int id,
|
||||||
int uid, int initialPid, String message, int userId);
|
int uid, int initialPid, String message, int userId);
|
||||||
void onPanelRevealed(boolean clearEffects);
|
void onPanelRevealed(boolean clearEffects, int numItems);
|
||||||
void onPanelHidden();
|
void onPanelHidden();
|
||||||
void clearEffects();
|
void clearEffects();
|
||||||
void onNotificationVisibilityChanged(
|
void onNotificationVisibilityChanged(
|
||||||
|
|||||||
@@ -567,8 +567,8 @@ public class NotificationManagerService extends SystemService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPanelRevealed(boolean clearEffects) {
|
public void onPanelRevealed(boolean clearEffects, int items) {
|
||||||
EventLogTags.writeNotificationPanelRevealed();
|
EventLogTags.writeNotificationPanelRevealed(items);
|
||||||
if (clearEffects) {
|
if (clearEffects) {
|
||||||
clearEffects();
|
clearEffects();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -571,11 +571,11 @@ public class StatusBarManagerService extends IStatusBarService.Stub {
|
|||||||
* LED, vibration, and ringing
|
* LED, vibration, and ringing
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onPanelRevealed(boolean clearNotificationEffects) {
|
public void onPanelRevealed(boolean clearNotificationEffects, int numItems) {
|
||||||
enforceStatusBarService();
|
enforceStatusBarService();
|
||||||
long identity = Binder.clearCallingIdentity();
|
long identity = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
mNotificationDelegate.onPanelRevealed(clearNotificationEffects);
|
mNotificationDelegate.onPanelRevealed(clearNotificationEffects, numItems);
|
||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(identity);
|
Binder.restoreCallingIdentity(identity);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user