Commit 136a1535 authored by Mygod's avatar Mygod

Add notification color

parent 8b967a6d
...@@ -50,6 +50,7 @@ import android.content.pm.{PackageInfo, PackageManager} ...@@ -50,6 +50,7 @@ import android.content.pm.{PackageInfo, PackageManager}
import android.net.{Network, ConnectivityManager} import android.net.{Network, ConnectivityManager}
import android.os._ import android.os._
import android.support.v4.app.NotificationCompat import android.support.v4.app.NotificationCompat
import android.support.v4.content.ContextCompat
import android.util.{SparseArray, Log} import android.util.{SparseArray, Log}
import android.widget.Toast import android.widget.Toast
import com.github.shadowsocks.aidl.Config import com.github.shadowsocks.aidl.Config
...@@ -319,6 +320,7 @@ class ShadowsocksNatService extends Service with BaseService { ...@@ -319,6 +320,7 @@ class ShadowsocksNatService extends Service with BaseService {
builder builder
.setWhen(0) .setWhen(0)
.setColor(ContextCompat.getColor(this, R.color.material_accent_500))
.setTicker(title) .setTicker(title)
.setContentTitle(getString(R.string.app_name)) .setContentTitle(getString(R.string.app_name))
.setContentText(info) .setContentText(info)
......
...@@ -48,6 +48,7 @@ import android.content.pm.{PackageInfo, PackageManager} ...@@ -48,6 +48,7 @@ import android.content.pm.{PackageInfo, PackageManager}
import android.net.VpnService import android.net.VpnService
import android.os._ import android.os._
import android.support.v4.app.NotificationCompat import android.support.v4.app.NotificationCompat
import android.support.v4.content.ContextCompat
import android.util.Log import android.util.Log
import android.widget.Toast import android.widget.Toast
import com.github.shadowsocks.aidl.Config import com.github.shadowsocks.aidl.Config
...@@ -113,6 +114,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { ...@@ -113,6 +114,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
builder builder
.setWhen(0) .setWhen(0)
.setColor(ContextCompat.getColor(this, R.color.material_accent_500))
.setTicker(title) .setTicker(title)
.setContentTitle(getString(R.string.app_name)) .setContentTitle(getString(R.string.app_name))
.setContentText(info) .setContentText(info)
......
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