Loading packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java +2 −0 Original line number Diff line number Diff line Loading @@ -515,11 +515,13 @@ public abstract class MediaOutputBaseAdapter extends mSeekBar.setOnTouchListener((v, event) -> false); updateIconAreaClickListener((v) -> { if (device.getCurrentVolume() == 0) { mController.logInteractionUnmuteDevice(device); mSeekBar.setVolume(UNMUTE_DEFAULT_VOLUME); mController.adjustVolume(device, UNMUTE_DEFAULT_VOLUME); updateUnmutedVolumeIcon(); mIconAreaLayout.setOnTouchListener(((iconV, event) -> false)); } else { mController.logInteractionMuteDevice(device); mSeekBar.resetVolume(); mController.adjustVolume(device, 0); updateMutedVolumeIcon(); Loading packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java +8 −0 Original line number Diff line number Diff line Loading @@ -843,6 +843,14 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback, mMetricLogger.logInteractionAdjustVolume(device); } void logInteractionMuteDevice(MediaDevice device) { mMetricLogger.logInteractionMute(device); } void logInteractionUnmuteDevice(MediaDevice device) { mMetricLogger.logInteractionUnmute(device); } String getPackageName() { return mPackageName; } Loading packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java +32 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,38 @@ public class MediaOutputMetricLogger { source.isSuggestedDevice()); } /** * Do the metric logging of muting device. */ public void logInteractionMute(MediaDevice source) { if (DEBUG) { Log.d(TAG, "logInteraction - Mute"); } SysUiStatsLog.write( SysUiStatsLog.MEDIAOUTPUT_OP_INTERACTION_REPORT, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__INTERACTION_TYPE__MUTE, getInteractionDeviceType(source), getLoggingPackageName(), source.isSuggestedDevice()); } /** * Do the metric logging of unmuting device. */ public void logInteractionUnmute(MediaDevice source) { if (DEBUG) { Log.d(TAG, "logInteraction - Unmute"); } SysUiStatsLog.write( SysUiStatsLog.MEDIAOUTPUT_OP_INTERACTION_REPORT, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__INTERACTION_TYPE__UNMUTE, getInteractionDeviceType(source), getLoggingPackageName(), source.isSuggestedDevice()); } /** * Do the metric logging of content switching failure. * Loading Loading
packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java +2 −0 Original line number Diff line number Diff line Loading @@ -515,11 +515,13 @@ public abstract class MediaOutputBaseAdapter extends mSeekBar.setOnTouchListener((v, event) -> false); updateIconAreaClickListener((v) -> { if (device.getCurrentVolume() == 0) { mController.logInteractionUnmuteDevice(device); mSeekBar.setVolume(UNMUTE_DEFAULT_VOLUME); mController.adjustVolume(device, UNMUTE_DEFAULT_VOLUME); updateUnmutedVolumeIcon(); mIconAreaLayout.setOnTouchListener(((iconV, event) -> false)); } else { mController.logInteractionMuteDevice(device); mSeekBar.resetVolume(); mController.adjustVolume(device, 0); updateMutedVolumeIcon(); Loading
packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java +8 −0 Original line number Diff line number Diff line Loading @@ -843,6 +843,14 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback, mMetricLogger.logInteractionAdjustVolume(device); } void logInteractionMuteDevice(MediaDevice device) { mMetricLogger.logInteractionMute(device); } void logInteractionUnmuteDevice(MediaDevice device) { mMetricLogger.logInteractionUnmute(device); } String getPackageName() { return mPackageName; } Loading
packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java +32 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,38 @@ public class MediaOutputMetricLogger { source.isSuggestedDevice()); } /** * Do the metric logging of muting device. */ public void logInteractionMute(MediaDevice source) { if (DEBUG) { Log.d(TAG, "logInteraction - Mute"); } SysUiStatsLog.write( SysUiStatsLog.MEDIAOUTPUT_OP_INTERACTION_REPORT, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__INTERACTION_TYPE__MUTE, getInteractionDeviceType(source), getLoggingPackageName(), source.isSuggestedDevice()); } /** * Do the metric logging of unmuting device. */ public void logInteractionUnmute(MediaDevice source) { if (DEBUG) { Log.d(TAG, "logInteraction - Unmute"); } SysUiStatsLog.write( SysUiStatsLog.MEDIAOUTPUT_OP_INTERACTION_REPORT, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__INTERACTION_TYPE__UNMUTE, getInteractionDeviceType(source), getLoggingPackageName(), source.isSuggestedDevice()); } /** * Do the metric logging of content switching failure. * Loading