Commit e6f11d66 authored by Mygod's avatar Mygod

Update dependencies

parent d3fd0945
...@@ -4,18 +4,18 @@ apply plugin: 'com.github.ben-manes.versions' ...@@ -4,18 +4,18 @@ apply plugin: 'com.github.ben-manes.versions'
buildscript { buildscript {
ext { ext {
kotlinVersion = '1.2.71' kotlinVersion = '1.3.0'
minSdkVersion = 21 minSdkVersion = 21
sdkVersion = 28 sdkVersion = 28
compileSdkVersion = 28 compileSdkVersion = 28
buildToolsVersion = '28.0.3' buildToolsVersion = '28.0.3'
androidxVersion = '1.0.0' androidxVersion = '1.0.0'
roomVersion = '2.0.0' roomVersion = '2.0.0'
workVersion = '1.0.0-alpha09' workVersion = '1.0.0-alpha10'
preferencexVersion = '1.0.0' preferencexVersion = '1.0.0'
junitVersion = '4.12' junitVersion = '4.12'
androidTestVersion = '1.1.0-alpha4' androidTestVersion = '1.1.0'
androidEspressoVersion = '3.1.0-alpha4' androidEspressoVersion = '3.1.0'
} }
repositories { repositories {
...@@ -27,9 +27,9 @@ buildscript { ...@@ -27,9 +27,9 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.2.0' classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0' classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath 'com.google.gms:google-services:4.1.0' classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.26.1' classpath 'io.fabric.tools:gradle:1.26.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
} }
......
...@@ -20,12 +20,13 @@ ...@@ -20,12 +20,13 @@
package com.github.shadowsocks.acl package com.github.shadowsocks.acl
import android.content.Context
import androidx.work.* import androidx.work.*
import java.io.IOException import java.io.IOException
import java.net.URL import java.net.URL
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
class AclSyncer : Worker() { class AclSyncer(context: Context, workerParams: WorkerParameters) : Worker(context, workerParams) {
companion object { companion object {
private const val KEY_ROUTE = "route" private const val KEY_ROUTE = "route"
......
...@@ -50,7 +50,7 @@ class ServiceNotification(private val service: BaseService.Interface, profileNam ...@@ -50,7 +50,7 @@ class ServiceNotification(private val service: BaseService.Interface, profileNam
channel: String, private val visible: Boolean = false) { channel: String, private val visible: Boolean = false) {
private val keyGuard = (service as Context).getSystemService<KeyguardManager>()!! private val keyGuard = (service as Context).getSystemService<KeyguardManager>()!!
private val nm by lazy { (service as Context).getSystemService<NotificationManager>()!! } private val nm by lazy { (service as Context).getSystemService<NotificationManager>()!! }
private val callback by lazy { private val callback: IShadowsocksServiceCallback by lazy {
object : IShadowsocksServiceCallback.Stub() { object : IShadowsocksServiceCallback.Stub() {
override fun stateChanged(state: Int, profileName: String?, msg: String?) { } // ignore override fun stateChanged(state: Int, profileName: String?, msg: String?) { } // ignore
override fun trafficUpdated(profileId: Long, txRate: Long, rxRate: Long, txTotal: Long, rxTotal: Long) { override fun trafficUpdated(profileId: Long, txRate: Long, rxRate: Long, txTotal: Long, rxTotal: Long) {
......
...@@ -230,7 +230,7 @@ class AppManager : AppCompatActivity() { ...@@ -230,7 +230,7 @@ class AppManager : AppCompatActivity() {
R.id.action_import_clipboard -> { R.id.action_import_clipboard -> {
val proxiedAppString = clipboard.primaryClip?.getItemAt(0)?.text?.toString() val proxiedAppString = clipboard.primaryClip?.getItemAt(0)?.text?.toString()
if (!proxiedAppString.isNullOrEmpty()) { if (!proxiedAppString.isNullOrEmpty()) {
val i = proxiedAppString!!.indexOf('\n') val i = proxiedAppString.indexOf('\n')
try { try {
val (enabled, apps) = if (i < 0) Pair(proxiedAppString, "") else val (enabled, apps) = if (i < 0) Pair(proxiedAppString, "") else
Pair(proxiedAppString.substring(0, i), proxiedAppString.substring(i + 1)) Pair(proxiedAppString.substring(0, i), proxiedAppString.substring(i + 1))
......
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