Remove redundant Global Proxy

This commit is contained in:
Mygod
2015-11-09 20:32:22 +08:00
parent 58c16704a1
commit b05adbdd43
17 changed files with 122 additions and 124 deletions
@@ -252,7 +252,7 @@ class AppManager extends AppCompatActivity with OnCheckedChangeListener with OnC
this.setContentView(R.layout.layout_apps)
val toolbar = findViewById(R.id.toolbar).asInstanceOf[Toolbar]
toolbar.setTitle(R.string.proxied_help)
toolbar.setTitle(R.string.proxied_apps)
toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha)
toolbar.setNavigationOnClickListener((v: View) => {
val intent = getParentActivityIntent
@@ -268,6 +268,12 @@ class AppManager extends AppCompatActivity with OnCheckedChangeListener with OnC
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, PixelFormat.TRANSLUCENT))
findViewById(R.id.onSwitch).asInstanceOf[Switch]
.setOnCheckedChangeListener((button: CompoundButton, checked: Boolean) => {
ShadowsocksApplication.settings.edit().putBoolean(Key.isProxyApps, checked).apply()
finish()
})
val bypassSwitch = findViewById(R.id.bypassSwitch).asInstanceOf[Switch]
bypassSwitch.setOnCheckedChangeListener((button: CompoundButton, checked: Boolean) =>
ShadowsocksApplication.settings.edit().putBoolean(Key.isBypassApps, checked).apply())