instrument volume controls
Bug: 21474639
Change-Id: I48641ae778f4e274c0f67ca6491102d978d3cd5f
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
index aa891b6..5b2eb84 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
@@ -369,7 +369,7 @@
row.icon.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- Events.writeEvent(Events.EVENT_ICON_CLICK, row.stream, row.iconState);
+ Events.writeEvent(mContext, Events.EVENT_ICON_CLICK, row.stream, row.iconState);
mController.setActiveStream(row.stream);
if (row.stream == AudioManager.STREAM_RING) {
final boolean hasVibrator = mController.hasVibrator();
@@ -417,7 +417,7 @@
if (mShowing) return;
mShowing = true;
mDialog.show();
- Events.writeEvent(Events.EVENT_SHOW_DIALOG, reason, mKeyguard.isKeyguardLocked());
+ Events.writeEvent(mContext, Events.EVENT_SHOW_DIALOG, reason, mKeyguard.isKeyguardLocked());
mController.notifyVisible(true);
}
@@ -444,7 +444,7 @@
if (!mShowing) return;
mShowing = false;
mDialog.dismiss();
- Events.writeEvent(Events.EVENT_DISMISS_DIALOG, reason);
+ Events.writeEvent(mContext, Events.EVENT_DISMISS_DIALOG, reason);
setExpandedH(false);
mController.notifyVisible(false);
synchronized (mSafetyWarningLock) {
@@ -834,7 +834,7 @@
public void onClick(View v) {
if (mExpanding) return;
final boolean newExpand = !mExpanded;
- Events.writeEvent(Events.EVENT_EXPAND, v);
+ Events.writeEvent(mContext, Events.EVENT_EXPAND, newExpand);
setExpandedH(newExpand);
}
};
@@ -845,7 +845,7 @@
mSettingsButton.postDelayed(new Runnable() {
@Override
public void run() {
- Events.writeEvent(Events.EVENT_SETTINGS_CLICK);
+ Events.writeEvent(mContext, Events.EVENT_SETTINGS_CLICK);
if (mCallback != null) {
mCallback.onSettingsClicked();
}
@@ -933,7 +933,8 @@
if (mRow.requestedLevel != userLevel) {
mController.setStreamVolume(mRow.stream, userLevel);
mRow.requestedLevel = userLevel;
- Events.writeEvent(Events.EVENT_TOUCH_LEVEL_CHANGED, mRow.stream, userLevel);
+ Events.writeEvent(mContext, Events.EVENT_TOUCH_LEVEL_CHANGED, mRow.stream,
+ userLevel);
}
}
}
@@ -951,6 +952,7 @@
mRow.tracking = false;
mRow.userAttempt = SystemClock.uptimeMillis();
int userLevel = getImpliedLevel(seekBar, seekBar.getProgress());
+ Events.writeEvent(mContext, Events.EVENT_TOUCH_LEVEL_DONE, mRow.stream, userLevel);
if (mRow.ss.level != userLevel) {
mHandler.sendMessageDelayed(mHandler.obtainMessage(H.RECHECK, mRow),
USER_ATTEMPT_GRACE_PERIOD);