Per the comments on this Google+ post:
those [warnings] are currently expected when using
NotificationCompat
on Android O devices (NotificationCompat
always callssetSound()
even if you never pass in custom sound).until the Support Library changes their code to use the
AudioAttributes
version ofsetSound
, you’ll always get that warning.
Therefore there’s nothing that you can do about this warning. As per the notification channels guide, Android O deprecates setting a sound on an individual notification at all, instead having you set the sound on a notification channel used by all notifications of a particular type.