When dozing, re-enable falsing threshold and log events.

- Reactivate our configured keyguard falsing swipe threshold
  for secure keyguards, but only when dozing.
- Add DozeLog helper to capture/maintain interesting events
  about the doze + unlock process, enabled by default, but
  only on devices that start dozing at least once.
- Dump summary counts + logged events to dumpsys output.
- Pass notification pulse "instance" as an extra to the scheduled
  intent, so we can log accordingly.

Bug:17496795
Change-Id: I7e88f93bfc967bdc06550cf1fe5e74d535edd774
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 873d528..67c7723 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -33,6 +33,7 @@
 import android.widget.FrameLayout;
 
 import com.android.systemui.R;
+import com.android.systemui.doze.DozeLog;
 import com.android.systemui.statusbar.FlingAnimationUtils;
 import com.android.systemui.statusbar.StatusBarState;
 
@@ -347,6 +348,8 @@
                     if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
                         Log.i(TAG, "Flinging: expand=" + expand);
                     }
+                    DozeLog.traceFling(expand, mTouchAboveFalsingThreshold,
+                            mStatusBar.isFalsingThresholdNeeded());
                     fling(vel, expand);
                     mUpdateFlingOnLayout = expand && mPanelClosedOnDown && !mHasLayoutedSinceDown;
                     if (mUpdateFlingOnLayout) {