From 3d998a326cfcd7461e56b93fb47d7f73e8282b4b Mon Sep 17 00:00:00 2001 From: CzBiX Date: Mon, 30 Nov 2015 16:23:25 +0800 Subject: [PATCH] Automation app integration --- build.sbt | 3 +- src/main/AndroidManifest.xml | 13 +++ src/main/res/layout/layout_tasker.xml | 30 ++++++ src/main/res/values-zh/strings.xml | 2 + src/main/res/values/strings.xml | 6 ++ .../shadowsocks/ShadowsocksReceiver.scala | 14 +-- .../github/shadowsocks/TaskerActivity.scala | 97 +++++++++++++++++++ .../github/shadowsocks/TaskerReceiver.scala | 58 +++++++++++ .../shadowsocks/helper/TaskerSettings.scala | 77 +++++++++++++++ .../com/github/shadowsocks/utils/Utils.scala | 21 +++- 10 files changed, 307 insertions(+), 14 deletions(-) create mode 100644 src/main/res/layout/layout_tasker.xml create mode 100644 src/main/scala/com/github/shadowsocks/TaskerActivity.scala create mode 100644 src/main/scala/com/github/shadowsocks/TaskerReceiver.scala create mode 100644 src/main/scala/com/github/shadowsocks/helper/TaskerSettings.scala diff --git a/build.sbt b/build.sbt index 1edc6161..a7652e58 100644 --- a/build.sbt +++ b/build.sbt @@ -39,7 +39,8 @@ libraryDependencies ++= Seq( "com.android.support" % "design" % "23.1.1", "com.github.jorgecastilloprz" % "fabprogresscircle" % "1.01", "com.j256.ormlite" % "ormlite-core" % "4.48", - "com.j256.ormlite" % "ormlite-android" % "4.48" + "com.j256.ormlite" % "ormlite-android" % "4.48", + "com.twofortyfouram" % "android-plugin-api-for-locale" % "1.0.2" ) proguardOptions in Android ++= Seq("-keep class com.github.shadowsocks.** { (...); }", diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index ee900853..b2562202 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -80,6 +80,14 @@ android:parentActivityName=".Shadowsocks" android:launchMode="singleTask"/> + + + + + + @@ -109,6 +117,11 @@ + + + + + diff --git a/src/main/res/layout/layout_tasker.xml b/src/main/res/layout/layout_tasker.xml new file mode 100644 index 00000000..b534a537 --- /dev/null +++ b/src/main/res/layout/layout_tasker.xml @@ -0,0 +1,30 @@ + + + + + + +