Extract notification logic

This commit is contained in:
Mygod
2015-11-24 18:11:14 +08:00
parent 19c4910794
commit 99a6c4ff3e
4 changed files with 76 additions and 105 deletions
@@ -41,14 +41,13 @@ package com.github.shadowsocks
import java.util.{Timer, TimerTask}
import android.app.Notification
import android.app.Service
import android.content.Context
import android.os.{Handler, RemoteCallbackList}
import android.util.Log
import com.github.shadowsocks.aidl.{Config, IShadowsocksService, IShadowsocksServiceCallback}
import com.github.shadowsocks.utils.{State, TrafficMonitor, TrafficMonitorThread}
trait BaseService {
trait BaseService extends Service {
@volatile private var state = State.INIT
@volatile private var callbackCount = 0
@@ -197,8 +196,4 @@ trait BaseService {
state = s
})
}
def initSoundVibrateLights(notification: Notification) {
notification.sound = null
}
}