add logging to debug panel touches.
Turn on gesture recorder. Add events to the Event Log. Bug:7686690 Change-Id: I53b7d43f5bdc002360e305182597765f3c430b11
This commit is contained in:
@ -4,7 +4,8 @@ include $(CLEAR_VARS)
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
|
||||
../../../ex/carousel/java/com/android/ex/carousel/carousel.rs
|
||||
../../../ex/carousel/java/com/android/ex/carousel/carousel.rs \
|
||||
src/com/android/systemui/EventLogTags.logtags
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services telephony-common
|
||||
|
||||
|
@ -0,0 +1,33 @@
|
||||
# See system/core/logcat/event.logtags for a description of the format of this file.
|
||||
|
||||
option java_package com.android.systemui;
|
||||
|
||||
# ---------------------------
|
||||
# PhoneStatusBar.java
|
||||
# ---------------------------
|
||||
36000 sysui_statusbar_touch (type|1),(x|1),(y|1),(enabled|1)
|
||||
|
||||
# ---------------------------
|
||||
# PhoneStatusBarView.java
|
||||
# ---------------------------
|
||||
36010 sysui_panelbar_touch (type|1),(x|1),(y|1),(enabled|1)
|
||||
|
||||
# ---------------------------
|
||||
# NotificationPanelView.java
|
||||
# ---------------------------
|
||||
36020 sysui_notificationpanel_touch (type|1),(x|1),(y|1)
|
||||
|
||||
# ---------------------------
|
||||
# SettingsPanelView.java
|
||||
# ---------------------------
|
||||
36030 sysui_quickpanel_touch (type|1),(x|1),(y|1)
|
||||
|
||||
# ---------------------------
|
||||
# PanelHolder.java
|
||||
# ---------------------------
|
||||
36040 sysui_panelholder_touch (type|1),(x|1),(y|1)
|
||||
|
||||
# ---------------------------
|
||||
# SearchPanelView.java
|
||||
# ---------------------------
|
||||
36050 sysui_searchpanel_touch (type|1),(x|1),(y|1)
|
@ -31,6 +31,7 @@ import android.os.UserHandle;
|
||||
import android.os.Vibrator;
|
||||
import android.provider.Settings;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.EventLog;
|
||||
import android.util.Slog;
|
||||
import android.view.IWindowManager;
|
||||
import android.view.MotionEvent;
|
||||
@ -42,6 +43,8 @@ import android.widget.FrameLayout;
|
||||
|
||||
import com.android.internal.widget.multiwaveview.GlowPadView;
|
||||
import com.android.internal.widget.multiwaveview.GlowPadView.OnTriggerListener;
|
||||
|
||||
import com.android.systemui.EventLogTags;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.recent.StatusBarTouchProxy;
|
||||
import com.android.systemui.statusbar.BaseStatusBar;
|
||||
@ -55,6 +58,7 @@ public class SearchPanelView extends FrameLayout implements
|
||||
private static final int SEARCH_PANEL_HOLD_DURATION = 0;
|
||||
static final String TAG = "SearchPanelView";
|
||||
static final boolean DEBUG = TabletStatusBar.DEBUG || PhoneStatusBar.DEBUG || false;
|
||||
public static final boolean DEBUG_GESTURES = true;
|
||||
private static final String ASSIST_ICON_METADATA_NAME =
|
||||
"com.android.systemui.action_assist_icon";
|
||||
private final Context mContext;
|
||||
@ -304,6 +308,17 @@ public class SearchPanelView extends FrameLayout implements
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (DEBUG_GESTURES) {
|
||||
if (event.getActionMasked() != MotionEvent.ACTION_MOVE) {
|
||||
EventLog.writeEvent(EventLogTags.SYSUI_SEARCHPANEL_TOUCH,
|
||||
event.getActionMasked(), (int) event.getX(), (int) event.getY());
|
||||
}
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
|
||||
private LayoutTransition createLayoutTransitioner() {
|
||||
LayoutTransition transitioner = new LayoutTransition();
|
||||
transitioner.setDuration(200);
|
||||
|
@ -21,14 +21,17 @@ import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.EventLog;
|
||||
import android.util.Slog;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.systemui.EventLogTags;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.statusbar.GestureRecorder;
|
||||
|
||||
public class NotificationPanelView extends PanelView {
|
||||
public static final boolean DEBUG_GESTURES = true;
|
||||
|
||||
Drawable mHandleBar;
|
||||
int mHandleBarHeight;
|
||||
@ -91,6 +94,12 @@ public class NotificationPanelView extends PanelView {
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (DEBUG_GESTURES) {
|
||||
if (event.getActionMasked() != MotionEvent.ACTION_MOVE) {
|
||||
EventLog.writeEvent(EventLogTags.SYSUI_NOTIFICATIONPANEL_TOUCH,
|
||||
event.getActionMasked(), (int) event.getX(), (int) event.getY());
|
||||
}
|
||||
}
|
||||
if (PhoneStatusBar.SETTINGS_DRAG_SHORTCUT && mStatusBar.mHasFlipSettings) {
|
||||
switch (event.getActionMasked()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
|
@ -18,10 +18,14 @@ package com.android.systemui.statusbar.phone;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.EventLog;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.android.systemui.EventLogTags;
|
||||
|
||||
public class PanelHolder extends FrameLayout {
|
||||
public static final boolean DEBUG_GESTURES = true;
|
||||
|
||||
private int mSelectedPanelIndex = -1;
|
||||
private PanelBar mBar;
|
||||
@ -67,6 +71,12 @@ public class PanelHolder extends FrameLayout {
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (DEBUG_GESTURES) {
|
||||
if (event.getActionMasked() != MotionEvent.ACTION_MOVE) {
|
||||
EventLog.writeEvent(EventLogTags.SYSUI_PANELHOLDER_TOUCH,
|
||||
event.getActionMasked(), (int) event.getX(), (int) event.getY());
|
||||
}
|
||||
}
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
PanelBar.LOG("PanelHolder got touch in open air, closing panels");
|
||||
|
@ -52,6 +52,7 @@ import android.provider.Settings;
|
||||
import android.service.dreams.DreamService;
|
||||
import android.service.dreams.IDreamManager;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.EventLog;
|
||||
import android.util.Log;
|
||||
import android.util.Slog;
|
||||
import android.view.Display;
|
||||
@ -76,6 +77,7 @@ import android.widget.TextView;
|
||||
|
||||
import com.android.internal.statusbar.StatusBarIcon;
|
||||
import com.android.internal.statusbar.StatusBarNotification;
|
||||
import com.android.systemui.EventLogTags;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.statusbar.BaseStatusBar;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
@ -103,7 +105,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;
|
||||
public static final boolean DEBUG_GESTURES = true;
|
||||
|
||||
public static final boolean DEBUG_CLINGS = false;
|
||||
|
||||
@ -1775,6 +1777,14 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
}
|
||||
|
||||
public boolean interceptTouchEvent(MotionEvent event) {
|
||||
if (DEBUG_GESTURES) {
|
||||
if (event.getActionMasked() != MotionEvent.ACTION_MOVE) {
|
||||
EventLog.writeEvent(EventLogTags.SYSUI_STATUSBAR_TOUCH,
|
||||
event.getActionMasked(), (int) event.getX(), (int) event.getY(), mDisabled);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (SPEW) {
|
||||
Slog.d(TAG, "Touch: rawY=" + event.getRawY() + " event=" + event + " mDisabled="
|
||||
+ mDisabled + " mTracking=" + mTracking);
|
||||
|
@ -22,15 +22,19 @@ import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.Resources.NotFoundException;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.EventLog;
|
||||
import android.util.Slog;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
|
||||
import com.android.systemui.EventLogTags;
|
||||
import com.android.systemui.R;
|
||||
|
||||
public class PhoneStatusBarView extends PanelBar {
|
||||
private static final String TAG = "PhoneStatusBarView";
|
||||
private static final boolean DEBUG = PhoneStatusBar.DEBUG;
|
||||
private static final boolean DEBUG_GESTURES = true;
|
||||
|
||||
PhoneStatusBar mBar;
|
||||
int mScrimColor;
|
||||
@ -175,7 +179,17 @@ public class PhoneStatusBarView extends PanelBar {
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
return mBar.interceptTouchEvent(event) || super.onTouchEvent(event);
|
||||
boolean barConsumedEvent = mBar.interceptTouchEvent(event);
|
||||
|
||||
if (DEBUG_GESTURES) {
|
||||
if (event.getActionMasked() != MotionEvent.ACTION_MOVE) {
|
||||
EventLog.writeEvent(EventLogTags.SYSUI_PANELBAR_TOUCH,
|
||||
event.getActionMasked(), (int) event.getX(), (int) event.getY(),
|
||||
barConsumedEvent ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
return barConsumedEvent || super.onTouchEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,10 +23,13 @@ import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.EventLog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.android.systemui.EventLogTags;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.statusbar.BaseStatusBar;
|
||||
import com.android.systemui.statusbar.GestureRecorder;
|
||||
@ -36,6 +39,7 @@ import com.android.systemui.statusbar.policy.LocationController;
|
||||
import com.android.systemui.statusbar.policy.NetworkController;
|
||||
|
||||
public class SettingsPanelView extends PanelView {
|
||||
public static final boolean DEBUG_GESTURES = true;
|
||||
|
||||
private QuickSettings mQS;
|
||||
private QuickSettingsContainerView mQSContainer;
|
||||
@ -136,4 +140,15 @@ public class SettingsPanelView extends PanelView {
|
||||
mHandleBar.draw(canvas);
|
||||
canvas.translate(0, -off);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (DEBUG_GESTURES) {
|
||||
if (event.getActionMasked() != MotionEvent.ACTION_MOVE) {
|
||||
EventLog.writeEvent(EventLogTags.SYSUI_QUICKPANEL_TOUCH,
|
||||
event.getActionMasked(), (int) event.getX(), (int) event.getY());
|
||||
}
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user