Unverified Commit c6bb913b authored by Mygod's avatar Mygod Committed by GitHub

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.
parent 265ecc04
...@@ -168,7 +168,7 @@ class ShadowsocksApplication extends Application { ...@@ -168,7 +168,7 @@ class ShadowsocksApplication extends Application {
if (Build.VERSION.SDK_INT >= 26) { if (Build.VERSION.SDK_INT >= 26) {
val nm = getSystemService(classOf[NotificationManager]) val nm = getSystemService(classOf[NotificationManager])
nm.createNotificationChannels(List( 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-proxy", getText(R.string.service_proxy), NotificationManager.IMPORTANCE_LOW),
new NotificationChannel("service-transproxy", getText(R.string.service_transproxy), new NotificationChannel("service-transproxy", getText(R.string.service_transproxy),
NotificationManager.IMPORTANCE_LOW) NotificationManager.IMPORTANCE_LOW)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment