@ -19,7 +19,6 @@ import androidx.core.app.NotificationManagerCompat
import androidx.core.content.getSystemService
import mozilla.components.concept.sync.DeviceEvent
import mozilla.components.concept.sync.TabData
import mozilla.components.support.base.ids.notify
import mozilla.components.support.base.log.logger.Logger
import org.mozilla.fenix.R
@ -30,8 +29,6 @@ class NotificationManager(private val context: Context) {
companion object {
const val RECEIVE _TABS _TAG = " ReceivedTabs "
const val RECEIVE _TABS _CHANNEL _ID = " ReceivedTabsChannel "
const val DEFAULT _CHANNEL _TAG = " Default "
const val DEFAULT _CHANEL _ID = " DefaultChannel "
}
init {
@ -47,13 +44,6 @@ class NotificationManager(private val context: Context) {
context . getString ( R . string . fxa _received _tab _channel _name ) ,
context . getString ( R . string . fxa _received _tab _channel _description )
)
createNotificationChannel (
DEFAULT _CHANEL _ID ,
NotificationManager . IMPORTANCE _DEFAULT ,
context . getString ( R . string . app _name ) ,
" "
)
}
}
@ -98,21 +88,6 @@ class NotificationManager(private val context: Context) {
}
}
fun showMessage ( message : String ) {
val builder = NotificationCompat . Builder ( context , DEFAULT _CHANEL _ID )
. setSmallIcon ( R . drawable . ic _status _logo )
. setContentTitle ( context . getString ( R . string . app _name ) )
. setContentText ( message )
. setWhen ( System . currentTimeMillis ( ) )
. setPriority ( NotificationCompat . PRIORITY _HIGH )
. setDefaults ( Notification . DEFAULT _VIBRATE or Notification . DEFAULT _SOUND )
val notification = builder . build ( )
with ( NotificationManagerCompat . from ( context ) ) {
notify ( context , DEFAULT _CHANNEL _TAG , notification )
}
}
@TargetApi ( Build . VERSION_CODES . O )
private fun createNotificationChannel (
channelId : String ,