diff --git a/.gitmodules b/.gitmodules index 2311923ab5..ee7d79a121 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,7 +8,7 @@ branch = shadowsocks-android [submodule "src/main/jni/libevent"] path = src/main/jni/libevent - url = https://github.com/shadowsocks/libevent.git + url = https://github.com/shadowsocksrr/libevent.git branch = shadowsocks-android [submodule "src/main/jni/redsocks"] path = src/main/jni/redsocks diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 670b043923..fb9469410f 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="324" + android:versionName="3.5.3"> diff --git a/src/main/jni/shadowsocks-libev b/src/main/jni/shadowsocks-libev index 146fd025db..d63ff86380 160000 --- a/src/main/jni/shadowsocks-libev +++ b/src/main/jni/shadowsocks-libev @@ -1 +1 @@ -Subproject commit 146fd025db23c8973bc11efde888fd8c50d75f2d +Subproject commit d63ff863800a5645aca4309d5dd5962bd1e95543 diff --git a/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala b/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala index 6f3b37087a..c166dd40ff 100644 --- a/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala +++ b/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala @@ -470,6 +470,8 @@ final class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClic is_sort = true } + getWindow.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE) + getWindow.addFlags(WindowManager.LayoutParams.FLAG_SECURE) setContentView(R.layout.layout_profiles) val toolbar = findViewById(R.id.toolbar).asInstanceOf[Toolbar] diff --git a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala index 468380bf46..037d792493 100644 --- a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala +++ b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala @@ -54,7 +54,7 @@ import android.support.v4.content.ContextCompat import android.support.v7.app.AppCompatActivity import android.support.v7.widget.Toolbar import android.util.Log -import android.view.{View, ViewGroup} +import android.view.{View, ViewGroup, WindowManager} import android.widget._ import com.github.jorgecastilloprz.FABProgressCircle import com.github.shadowsocks.aidl.IShadowsocksServiceCallback @@ -62,7 +62,6 @@ import com.github.shadowsocks.database._ import com.github.shadowsocks.utils.CloseUtils._ import com.github.shadowsocks.utils._ import com.github.shadowsocks.job.SSRSubUpdateJob - import com.github.shadowsocks.ShadowsocksApplication.app import scala.util.Random @@ -250,8 +249,9 @@ class Shadowsocks extends AppCompatActivity with ServiceBoundContext { } override def onCreate(savedInstanceState: Bundle) { - super.onCreate(savedInstanceState) + getWindow.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE) + getWindow.addFlags(WindowManager.LayoutParams.FLAG_SECURE) setContentView(R.layout.layout_main) // Initialize Toolbar val toolbar = findViewById(R.id.toolbar).asInstanceOf[Toolbar] diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala index 13e730856d..71624406d3 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala @@ -359,7 +359,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { }) } - var black_list = profile.route match { + val black_list = profile.route match { case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST=> { getBlackList } @@ -380,7 +380,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { black_list, reject) } - var conf = profile.route match { + val conf = profile.route match { case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => { ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, protect, getApplicationInfo.dataDir, "0.0.0.0", profile.localPort + 53, china_dns_settings, profile.localPort + 63, reject)