我在奥雷奥上的Nexus 5x,当我从睡眠中唤醒时,最近一直在发出通知声音。但是,没有明显的通知。我试图看看Logcat,看看是否有任何与通知声音一致的日志,但它太吵了。我确实注意到了以下内容,但我不确定他们是罪魁祸首。
11-07 17:01:49.997 3460 17021 I WifiService: getConnectionInfo uid=10124 11-07 17:01:49.998 3460 17021 D WifiPermissionsUtil: Denied: no location permission 11-07 17:01:49.998 3460 17021 D WifiPermissionsUtil: Denied: The current config is not for an open network. 11-07 17:01:50.003 3460 4950 I WifiService: getConnectionInfo uid=10124 11-07 17:01:50.004 3460 4950 D WifiPermissionsUtil: Denied: no location permission 11-07 17:01:50.004 3460 4950 D WifiPermissionsUtil: Denied: The current config is not for an open network. 11-07 17:01:50.009 7249 7249 W Notification: Use of stream types is deprecated for operations other than volume control 11-07 17:01:50.009 7249 7249 W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case 11-07 17:01:50.039 31569 31627 D Avrcp : AudioManager Player: ID:23 -- type:android.media.SoundPool -- u/pid:10035/3869 -- state:idle -- attr:AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null 11-07 17:01:50.039 31569 31627 D Avrcp : AudioManager Player: ID:3639 -- type:android.media.MediaPlayer -- u/pid:10035/3869 -- state:idle -- attr:AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null 11-07 17:01:50.039 31569 31627 D Avrcp : AudioManager Player: ID:15 -- type:android.media.SoundPool -- u/pid:1000/3460 -- state:idle -- attr:AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null 11-07 17:01:50.039 31569 31627 D Avrcp : AudioManager Player: ID:31 -- type:android.media.SoundPool -- u/pid:1027/6162 -- state:idle -- attr:AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null 11-07 17:01:50.039 31569 31627 D Avrcp : AudioManager Player: ID:3631 -- type:android.media.MediaPlayer -- u/pid:10035/3869 -- state:started -- attr:AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null 11-07 17:01:50.039 31569 31627 D Avrcp : AudioManager isPlaying: true 11-07 17:01:50.062 3114 3114 D NuPlayerDriver: NuPlayerDriver(0xf1414200) created, clientPid(3869) 11-07 17:01:50.082 3114 13299 D GenericSource: FileSource remote 11-07 17:01:50.094 3460 17021 I WifiService: getConnectionInfo uid=10124 11-07 17:01:50.094 3460 17021 D WifiPermissionsUtil: Denied: no location permission 11-07 17:01:50.094 3460 17021 D WifiPermissionsUtil: Denied: The current config is not for an open network. 11-07 17:01:50.097 3114 13298 D NuPlayerDriver: notifyListener_l(0xf1414200), (1, 0, 0, -1), loop setting(0, 0) 11-07 17:01:50.099 7249 13274 W Notification: Use of stream types is deprecated for operations other than volume control 11-07 17:01:50.099 7249 13274 W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case 11-07 17:01:50.113 3460 3510 I ActivityManager: Start proc 13301:android.process.acore/u0a1 for content provider com.android.providers.contacts/.ContactsProvider2 11-07 17:01:50.116 3460 3460 E NotificationService: Muting recently noisy 0|info.kfsoft.android.TrafficIndicator|2131623986|null|10124 11-07 17:01:50.314 13301 13301 I ContactsPerf: VoicemailContentProvider.onCreate start 11-07 17:01:50.348 13301 13301 I ContactsPerf: VoicemailContentProvider.onCreate finish 11-07 17:01:50.401 3114 13289 I NuPlayerDecoder: [audio] saw output EOS 11-07 17:01:50.483 13301 13316 D ContactsDatabaseHelper: WAL enabled for contacts2.db: true 11-07 17:01:50.608 31569 31627 D Avrcp : AudioManager Player: ID:23 -- type:android.media.SoundPool -- u/pid:10035/3869 -- state:idle -- attr:AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null 11-07 17:01:50.608 31569 31627 D Avrcp : AudioManager Player: ID:3639 -- type:android.media.MediaPlayer -- u/pid:10035/3869 -- state:started -- attr:AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null 11-07 17:01:50.608 31569 31627 D Avrcp : AudioManager isPlaying: true
pid = 3460用于system_server,位置设置(高精度),所以我不确定为什么它抱怨权限问题。
在听到声音时尝试了DiveSys音频,并基于时间戳,这里是相关的输出:
Audio event log: focus commands as seen by MediaFocusControl 11-09 08:50:29:151 requestAudioFocus() from uid/pid 10035/3869 clientId=android.media.AudioManager@8aef0d8 callingPack=com.android.systemui req=3 flags=0x0 sdk=27 11-09 08:50:32:129 abandonAudioFocus() from uid/pid 10035/3869 clientId=android.media.AudioManager@8aef0d8 Audio event log: playback activity as reported through PlayerBase 11-09 08:50:29:120 new player piid:9887 uid/pid:10035/3869 type:android.media.MediaPlayer attr:AudioAttributes: usage=USAGE_UNKNOWN content=CONTENT_TYPE_UNKNOWN flags=0x0 tags= bundle=null 11-09 08:50:29:120 player piid:9887 new AudioAttributes:AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null 11-09 08:50:29:121 player piid:9887 has OP_PLAY_AUDIO:true in uid:10035 11-09 08:50:29:652 player piid:9887 state:started 11-09 08:50:29:654 releasing player piid:9879 11-09 08:50:30:156 new player piid:9895 uid/pid:10035/3869 type:android.media.MediaPlayer attr:AudioAttributes: usage=USAGE_UNKNOWN content=CONTENT_TYPE_UNKNOWN flags=0x0 tags= bundle=null 11-09 08:50:30:157 player piid:9895 new AudioAttributes:AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null 11-09 08:50:30:157 player piid:9895 has OP_PLAY_AUDIO:true in uid:10035 11-09 08:50:30:686 player piid:9895 state:started 11-09 08:50:30:688 releasing player piid:9887 11-09 08:50:32:129 player piid:9895 state:stopped Audio event log: force use (logged before setForceUse() is executed) 11-09 08:50:32:130 setForceUse(FOR_MEDIA, FORCE_NO_BT_A2DP) due to setBluetoothA2dpOn(false) from u/pid:1000/3460
任何想法?