Loading packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java +32 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,22 @@ public class MediaOutputMetricLogger { source.isSuggestedDevice()); } /** * Do the metric logging of stop sharing. */ public void logInteractionStopSharing() { if (DEBUG) { Log.d(TAG, "logInteraction - Stop sharing"); } SysUiStatsLog.write( SysUiStatsLog.MEDIAOUTPUT_OP_INTERACTION_REPORT, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__INTERACTION_TYPE__STOP_SHARING, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__TARGET__UNKNOWN_TYPE, getLoggingPackageName(), /*isSuggestedDevice = */false); } /** * Do the metric logging of stop casting. */ Loading Loading @@ -153,6 +169,22 @@ public class MediaOutputMetricLogger { source.isSuggestedDevice()); } /** * Do the metric logging of device contraction. */ public void logInteractionContraction(MediaDevice source) { if (DEBUG) { Log.d(TAG, "logInteraction - Contraction"); } SysUiStatsLog.write( SysUiStatsLog.MEDIAOUTPUT_OP_INTERACTION_REPORT, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__INTERACTION_TYPE__CONTRACTION, getInteractionDeviceType(source), getLoggingPackageName(), source.isSuggestedDevice()); } /** * Do the metric logging of muting device. */ Loading packages/SystemUI/src/com/android/systemui/media/dialog/MediaSwitchingController.java +7 −1 Original line number Diff line number Diff line Loading @@ -790,6 +790,7 @@ public class MediaSwitchingController } boolean removeDeviceFromPlayMedia(MediaDevice device) { mMetricLogger.logInteractionContraction(device); return mLocalMediaManager.removeDeviceFromPlayMedia(device); } Loading Loading @@ -843,7 +844,12 @@ public class MediaSwitchingController } void releaseSession() { if (Flags.enableOutputSwitcherPersonalAudioSharing() && getSessionReleaseType() == RoutingSessionInfo.RELEASE_TYPE_SHARING) { mMetricLogger.logInteractionStopSharing(); } else { mMetricLogger.logInteractionStopCasting(); } mLocalMediaManager.releaseSession(); } Loading Loading
packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java +32 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,22 @@ public class MediaOutputMetricLogger { source.isSuggestedDevice()); } /** * Do the metric logging of stop sharing. */ public void logInteractionStopSharing() { if (DEBUG) { Log.d(TAG, "logInteraction - Stop sharing"); } SysUiStatsLog.write( SysUiStatsLog.MEDIAOUTPUT_OP_INTERACTION_REPORT, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__INTERACTION_TYPE__STOP_SHARING, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__TARGET__UNKNOWN_TYPE, getLoggingPackageName(), /*isSuggestedDevice = */false); } /** * Do the metric logging of stop casting. */ Loading Loading @@ -153,6 +169,22 @@ public class MediaOutputMetricLogger { source.isSuggestedDevice()); } /** * Do the metric logging of device contraction. */ public void logInteractionContraction(MediaDevice source) { if (DEBUG) { Log.d(TAG, "logInteraction - Contraction"); } SysUiStatsLog.write( SysUiStatsLog.MEDIAOUTPUT_OP_INTERACTION_REPORT, SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__INTERACTION_TYPE__CONTRACTION, getInteractionDeviceType(source), getLoggingPackageName(), source.isSuggestedDevice()); } /** * Do the metric logging of muting device. */ Loading
packages/SystemUI/src/com/android/systemui/media/dialog/MediaSwitchingController.java +7 −1 Original line number Diff line number Diff line Loading @@ -790,6 +790,7 @@ public class MediaSwitchingController } boolean removeDeviceFromPlayMedia(MediaDevice device) { mMetricLogger.logInteractionContraction(device); return mLocalMediaManager.removeDeviceFromPlayMedia(device); } Loading Loading @@ -843,7 +844,12 @@ public class MediaSwitchingController } void releaseSession() { if (Flags.enableOutputSwitcherPersonalAudioSharing() && getSessionReleaseType() == RoutingSessionInfo.RELEASE_TYPE_SHARING) { mMetricLogger.logInteractionStopSharing(); } else { mMetricLogger.logInteractionStopCasting(); } mLocalMediaManager.releaseSession(); } Loading