Loading packages/SystemUI/src/com/android/systemui/screenrecord/notification/NotificationInteractor.kt +0 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,6 @@ import com.android.systemui.screenrecord.ScreenRecordingAudioSource /** Notifies user about different stages of screen recording flow. */ interface NotificationInteractor { fun createChannel() fun notifyRecording(notificationId: Int, audioSource: ScreenRecordingAudioSource) fun notifyProcessing(notificationId: Int, audioSource: ScreenRecordingAudioSource) Loading packages/SystemUI/src/com/android/systemui/screenrecord/notification/ScreenRecordingServiceNotificationInteractor.kt +0 −15 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.screenrecord.notification import android.app.Notification import android.app.NotificationChannel import android.app.NotificationManager import android.app.PendingIntent import android.app.Service Loading Loading @@ -55,20 +54,6 @@ class ScreenRecordingServiceNotificationInteractor( private val serviceClass: Class<out Service>, ) : NotificationInteractor { override fun createChannel() { notificationManager.createNotificationChannel( NotificationChannel( channelId, context.getString(R.string.screenrecord_title), NotificationManager.IMPORTANCE_DEFAULT, ) .apply { description = context.getString(R.string.screenrecord_channel_description) enableVibration(true) } ) } override fun notifyProcessing(notificationId: Int, audioSource: ScreenRecordingAudioSource) { val notificationTitle: String = if (audioSource == ScreenRecordingAudioSource.NONE) { Loading packages/SystemUI/src/com/android/systemui/screenrecord/service/ScreenRecordingService.kt +2 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.withContext private const val TAG = "ScreenRecordingService" private const val CHANNEL_ID = "screen_record" open class ScreenRecordingService protected constructor( Loading Loading @@ -242,6 +241,8 @@ protected constructor( companion object { const val CHANNEL_ID = "screen_record" const val ACTION_STOP = "com.android.systemui.screenrecord.ScreenRecordingService.ACTION_STOP" const val ACTION_SHARE = Loading packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java +14 −0 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import android.provider.Settings; import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.CoreStartable; import com.android.systemui.Flags; import com.android.systemui.res.R; import com.android.systemui.screenrecord.service.ScreenRecordingService; import com.android.wm.shell.pip.tv.TvPipNotificationController; import java.util.Arrays; Loading Loading @@ -115,6 +117,18 @@ public class NotificationChannels implements CoreStartable { context.getString(com.android.wm.shell.R.string.notification_channel_tv_pip), NotificationManager.IMPORTANCE_MAX)); } if (Flags.thinScreenRecordingService()) { NotificationChannel notificationChannel = new NotificationChannel( ScreenRecordingService.CHANNEL_ID, context.getString(R.string.screenrecord_title), NotificationManager.IMPORTANCE_DEFAULT ); notificationChannel.setDescription( context.getString(R.string.screenrecord_channel_description)); notificationChannel.enableVibration(true); nm.createNotificationChannel(notificationChannel); } } /** Loading Loading
packages/SystemUI/src/com/android/systemui/screenrecord/notification/NotificationInteractor.kt +0 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,6 @@ import com.android.systemui.screenrecord.ScreenRecordingAudioSource /** Notifies user about different stages of screen recording flow. */ interface NotificationInteractor { fun createChannel() fun notifyRecording(notificationId: Int, audioSource: ScreenRecordingAudioSource) fun notifyProcessing(notificationId: Int, audioSource: ScreenRecordingAudioSource) Loading
packages/SystemUI/src/com/android/systemui/screenrecord/notification/ScreenRecordingServiceNotificationInteractor.kt +0 −15 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.screenrecord.notification import android.app.Notification import android.app.NotificationChannel import android.app.NotificationManager import android.app.PendingIntent import android.app.Service Loading Loading @@ -55,20 +54,6 @@ class ScreenRecordingServiceNotificationInteractor( private val serviceClass: Class<out Service>, ) : NotificationInteractor { override fun createChannel() { notificationManager.createNotificationChannel( NotificationChannel( channelId, context.getString(R.string.screenrecord_title), NotificationManager.IMPORTANCE_DEFAULT, ) .apply { description = context.getString(R.string.screenrecord_channel_description) enableVibration(true) } ) } override fun notifyProcessing(notificationId: Int, audioSource: ScreenRecordingAudioSource) { val notificationTitle: String = if (audioSource == ScreenRecordingAudioSource.NONE) { Loading
packages/SystemUI/src/com/android/systemui/screenrecord/service/ScreenRecordingService.kt +2 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.withContext private const val TAG = "ScreenRecordingService" private const val CHANNEL_ID = "screen_record" open class ScreenRecordingService protected constructor( Loading Loading @@ -242,6 +241,8 @@ protected constructor( companion object { const val CHANNEL_ID = "screen_record" const val ACTION_STOP = "com.android.systemui.screenrecord.ScreenRecordingService.ACTION_STOP" const val ACTION_SHARE = Loading
packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java +14 −0 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import android.provider.Settings; import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.CoreStartable; import com.android.systemui.Flags; import com.android.systemui.res.R; import com.android.systemui.screenrecord.service.ScreenRecordingService; import com.android.wm.shell.pip.tv.TvPipNotificationController; import java.util.Arrays; Loading Loading @@ -115,6 +117,18 @@ public class NotificationChannels implements CoreStartable { context.getString(com.android.wm.shell.R.string.notification_channel_tv_pip), NotificationManager.IMPORTANCE_MAX)); } if (Flags.thinScreenRecordingService()) { NotificationChannel notificationChannel = new NotificationChannel( ScreenRecordingService.CHANNEL_ID, context.getString(R.string.screenrecord_title), NotificationManager.IMPORTANCE_DEFAULT ); notificationChannel.setDescription( context.getString(R.string.screenrecord_channel_description)); notificationChannel.enableVibration(true); nm.createNotificationChannel(notificationChannel); } } /** Loading