diff options
author | Daniel Sandler <dsandler@android.com> | 2012-10-02 22:33:08 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@android.com> | 2012-10-03 11:50:02 -0400 |
commit | 151f00d8f06e207038125f227b42f06a25d5e0a0 (patch) | |
tree | a25439e98900ff1d47e78824b389e5779cae16ac /packages | |
parent | c2a28163165fdd8e2a3173a577ba07cc88ec61fd (diff) | |
download | frameworks_base-151f00d8f06e207038125f227b42f06a25d5e0a0.zip frameworks_base-151f00d8f06e207038125f227b42f06a25d5e0a0.tar.gz frameworks_base-151f00d8f06e207038125f227b42f06a25d5e0a0.tar.bz2 |
Disable statusbar pulldown gesture tracking.
Bug: 7164602
Change-Id: Ie6569a7a8a9f462e844ef3088098c3256653f630
Diffstat (limited to 'packages')
3 files changed, 29 insertions, 12 deletions
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 c9ec481..32b7c68 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -24,6 +24,7 @@ import android.util.AttributeSet; import android.view.View; import com.android.systemui.R; +import com.android.systemui.statusbar.GestureRecorder; public class NotificationPanelView extends PanelView { @@ -47,9 +48,12 @@ public class NotificationPanelView extends PanelView { @Override public void fling(float vel, boolean always) { - ((PhoneStatusBarView) mBar).mBar.getGestureRecorder().tag( - "fling " + ((vel > 0) ? "open" : "closed"), - "notifications,v=" + vel); + GestureRecorder gr = ((PhoneStatusBarView) mBar).mBar.getGestureRecorder(); + if (gr != null) { + gr.tag( + "fling " + ((vel > 0) ? "open" : "closed"), + "notifications,v=" + vel); + } super.fling(vel, always); } 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 493a92a..a12af8d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -99,6 +99,7 @@ public class PhoneStatusBar extends BaseStatusBar { public static final boolean DEBUG = BaseStatusBar.DEBUG; public static final boolean SPEW = DEBUG; public static final boolean DUMPTRUCK = true; // extra dumpsys info + public static final boolean DEBUG_GESTURES = false; // additional instrumentation for testing purposes; intended to be left on during development public static final boolean CHATTY = DEBUG; @@ -247,7 +248,9 @@ public class PhoneStatusBar extends BaseStatusBar { DisplayMetrics mDisplayMetrics = new DisplayMetrics(); // XXX: gesture research - private GestureRecorder mGestureRec = new GestureRecorder("/sdcard/statusbar_gestures.dat"); + private final GestureRecorder mGestureRec = DEBUG_GESTURES + ? new GestureRecorder("/sdcard/statusbar_gestures.dat") + : null; private int mNavigationIconHints = 0; private final Animator.AnimatorListener mMakeIconsInvisible = new AnimatorListenerAdapter() { @@ -1350,7 +1353,9 @@ public class PhoneStatusBar extends BaseStatusBar { } } - mGestureRec.add(event); + if (DEBUG_GESTURES) { + mGestureRec.add(event); + } return false; } @@ -1630,8 +1635,10 @@ public class PhoneStatusBar extends BaseStatusBar { } } - pw.print(" status bar gestures: "); - mGestureRec.dump(fd, pw, args); + if (DEBUG_GESTURES) { + pw.print(" status bar gestures: "); + mGestureRec.dump(fd, pw, args); + } mNetworkController.dump(fd, pw, args); } @@ -1713,8 +1720,10 @@ public class PhoneStatusBar extends BaseStatusBar { // called by makeStatusbar and also by PhoneStatusBarView void updateDisplaySize() { mDisplay.getMetrics(mDisplayMetrics); - mGestureRec.tag("display", - String.format("%dx%d", mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels)); + if (DEBUG_GESTURES) { + mGestureRec.tag("display", + String.format("%dx%d", mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels)); + } } private View.OnClickListener mClearButtonListener = new View.OnClickListener() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java index f9d9dac0..e555277 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java @@ -29,6 +29,7 @@ import android.view.ViewGroup; import com.android.systemui.R; import com.android.systemui.statusbar.BaseStatusBar; +import com.android.systemui.statusbar.GestureRecorder; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.BluetoothController; import com.android.systemui.statusbar.policy.LocationController; @@ -95,9 +96,12 @@ public class SettingsPanelView extends PanelView { @Override public void fling(float vel, boolean always) { - ((PhoneStatusBarView) mBar).mBar.getGestureRecorder().tag( - "fling " + ((vel > 0) ? "open" : "closed"), - "settings,v=" + vel); + GestureRecorder gr = ((PhoneStatusBarView) mBar).mBar.getGestureRecorder(); + if (gr != null) { + gr.tag( + "fling " + ((vel > 0) ? "open" : "closed"), + "settings,v=" + vel); + } super.fling(vel, always); } |