Lift default notification priority for VPN service

Priority has been lifted from IMPORTANCE_MIN to IMPORTANCE_LOW. This change only impacts Android 8.0 and higher.

Fixes #1431. Also fixes https://github.com/shadowsocks/shadowsocks-android/issues/1037#issuecomment-338367917.
This commit is contained in:
Mygod
2017-11-14 23:50:06 -08:00
committed by GitHub
parent 265ecc0406
commit c6bb913ba2
@@ -168,7 +168,7 @@ class ShadowsocksApplication extends Application {
if (Build.VERSION.SDK_INT >= 26) {
val nm = getSystemService(classOf[NotificationManager])
nm.createNotificationChannels(List(
new NotificationChannel("service-vpn", getText(R.string.service_vpn), NotificationManager.IMPORTANCE_MIN),
new NotificationChannel("service-vpn", getText(R.string.service_vpn), NotificationManager.IMPORTANCE_LOW),
new NotificationChannel("service-proxy", getText(R.string.service_proxy), NotificationManager.IMPORTANCE_LOW),
new NotificationChannel("service-transproxy", getText(R.string.service_transproxy),
NotificationManager.IMPORTANCE_LOW)