Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
ea7ede03
Commit
ea7ede03
authored
Dec 13, 2017
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #1497
parent
956443ef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
mobile/src/main/java/com/github/shadowsocks/VpnRequestActivity.kt
...rc/main/java/com/github/shadowsocks/VpnRequestActivity.kt
+4
-4
mobile/src/main/java/com/github/shadowsocks/tasker/Settings.kt
...e/src/main/java/com/github/shadowsocks/tasker/Settings.kt
+3
-3
No files found.
mobile/src/main/java/com/github/shadowsocks/VpnRequestActivity.kt
View file @
ea7ede03
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
package
com.github.shadowsocks
package
com.github.shadowsocks
import
android.app.Activity
import
android.app.KeyguardManager
import
android.app.KeyguardManager
import
android.content.BroadcastReceiver
import
android.content.BroadcastReceiver
import
android.content.Context
import
android.content.Context
...
@@ -28,14 +29,13 @@ import android.content.IntentFilter
...
@@ -28,14 +29,13 @@ import android.content.IntentFilter
import
android.net.VpnService
import
android.net.VpnService
import
android.os.Bundle
import
android.os.Bundle
import
android.os.PersistableBundle
import
android.os.PersistableBundle
import
android.support.v7.app.AppCompatActivity
import
android.util.Log
import
android.util.Log
import
com.github.shadowsocks.App.Companion.app
import
com.github.shadowsocks.App.Companion.app
import
com.github.shadowsocks.aidl.IShadowsocksService
import
com.github.shadowsocks.aidl.IShadowsocksService
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.utils.broadcastReceiver
import
com.github.shadowsocks.utils.broadcastReceiver
class
VpnRequestActivity
:
A
ppCompatA
ctivity
(),
ShadowsocksConnection
.
Interface
{
class
VpnRequestActivity
:
Activity
(),
ShadowsocksConnection
.
Interface
{
companion
object
{
companion
object
{
private
const
val
TAG
=
"VpnRequestActivity"
private
const
val
TAG
=
"VpnRequestActivity"
private
const
val
REQUEST_CONNECT
=
1
private
const
val
REQUEST_CONNECT
=
1
...
@@ -43,8 +43,8 @@ class VpnRequestActivity : AppCompatActivity(), ShadowsocksConnection.Interface
...
@@ -43,8 +43,8 @@ class VpnRequestActivity : AppCompatActivity(), ShadowsocksConnection.Interface
private
var
receiver
:
BroadcastReceiver
?
=
null
private
var
receiver
:
BroadcastReceiver
?
=
null
override
fun
onCreate
(
savedInstanceState
:
Bundle
?
,
persistentState
:
PersistableBundle
?
)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
,
persistentState
)
super
.
onCreate
(
savedInstanceState
)
if
(!
BaseService
.
usingVpnMode
)
{
if
(!
BaseService
.
usingVpnMode
)
{
finish
()
finish
()
return
return
...
...
mobile/src/main/java/com/github/shadowsocks/tasker/Settings.kt
View file @
ea7ede03
...
@@ -27,7 +27,7 @@ import com.github.shadowsocks.R
...
@@ -27,7 +27,7 @@ import com.github.shadowsocks.R
import
com.github.shadowsocks.database.ProfileManager
import
com.github.shadowsocks.database.ProfileManager
import
com.twofortyfouram.locale.api.Intent
as
ApiIntent
import
com.twofortyfouram.locale.api.Intent
as
ApiIntent
class
Settings
(
bundle
:
Bundle
)
{
class
Settings
(
bundle
:
Bundle
?
)
{
companion
object
{
companion
object
{
private
val
KEY_SWITCH_ON
=
"switch_on"
private
val
KEY_SWITCH_ON
=
"switch_on"
private
val
KEY_PROFILE_ID
=
"profile_id"
private
val
KEY_PROFILE_ID
=
"profile_id"
...
@@ -35,8 +35,8 @@ class Settings(bundle: Bundle) {
...
@@ -35,8 +35,8 @@ class Settings(bundle: Bundle) {
fun
fromIntent
(
intent
:
Intent
)
=
Settings
(
intent
.
getBundleExtra
(
ApiIntent
.
EXTRA_BUNDLE
))
fun
fromIntent
(
intent
:
Intent
)
=
Settings
(
intent
.
getBundleExtra
(
ApiIntent
.
EXTRA_BUNDLE
))
}
}
var
switchOn
:
Boolean
=
bundle
.
getBoolean
(
KEY_SWITCH_ON
,
true
)
var
switchOn
:
Boolean
=
bundle
?.
getBoolean
(
KEY_SWITCH_ON
,
true
)
?:
false
var
profileId
:
Int
=
bundle
.
getInt
(
KEY_PROFILE_ID
,
-
1
)
var
profileId
:
Int
=
bundle
?.
getInt
(
KEY_PROFILE_ID
,
-
1
)
?:
-
1
fun
toIntent
(
context
:
Context
):
Intent
{
fun
toIntent
(
context
:
Context
):
Intent
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment