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
55f25d32
Commit
55f25d32
authored
Oct 19, 2014
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable NAT mode on lollipop for now
parent
93273cbc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
build.sbt
build.sbt
+1
-1
src/main/AndroidManifest.xml
src/main/AndroidManifest.xml
+1
-1
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+3
-4
No files found.
build.sbt
View file @
55f25d32
...
@@ -4,7 +4,7 @@ import android.Dependencies.{apklib,aar}
...
@@ -4,7 +4,7 @@ import android.Dependencies.{apklib,aar}
android
.
Plugin
.
androidBuild
android
.
Plugin
.
androidBuild
platformTarget
in
Android
:=
"android-
19
"
platformTarget
in
Android
:=
"android-
21
"
name
:=
"shadowsocks"
name
:=
"shadowsocks"
...
...
src/main/AndroidManifest.xml
View file @
55f25d32
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<uses-sdk
<uses-sdk
android:minSdkVersion=
"16"
android:minSdkVersion=
"16"
android:targetSdkVersion=
"
19
"
/>
android:targetSdkVersion=
"
21
"
/>
<application
<application
android:allowBackup=
"true"
android:allowBackup=
"true"
...
...
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
55f25d32
...
@@ -755,7 +755,6 @@ class Shadowsocks
...
@@ -755,7 +755,6 @@ class Shadowsocks
}
}
private
def
setPreferenceEnabled
(
enabled
:
Boolean
)
{
private
def
setPreferenceEnabled
(
enabled
:
Boolean
)
{
val
isRoot
=
status
.
getBoolean
(
Key
.
isRoot
,
false
)
for
(
name
<-
Shadowsocks
.
PROXY_PREFS
)
{
for
(
name
<-
Shadowsocks
.
PROXY_PREFS
)
{
val
pref
=
findPreference
(
name
)
val
pref
=
findPreference
(
name
)
if
(
pref
!=
null
)
{
if
(
pref
!=
null
)
{
...
@@ -767,7 +766,7 @@ class Shadowsocks
...
@@ -767,7 +766,7 @@ class Shadowsocks
if
(
pref
!=
null
)
{
if
(
pref
!=
null
)
{
if
(
Seq
(
Key
.
isGlobalProxy
,
Key
.
isTrafficStat
,
Key
.
proxyedApps
)
if
(
Seq
(
Key
.
isGlobalProxy
,
Key
.
isTrafficStat
,
Key
.
proxyedApps
)
.
contains
(
name
))
{
.
contains
(
name
))
{
pref
.
setEnabled
(
enabled
&&
isRoot
)
pref
.
setEnabled
(
enabled
&&
!
isVpnEnabled
)
}
else
{
}
else
{
pref
.
setEnabled
(
enabled
)
pref
.
setEnabled
(
enabled
)
}
}
...
@@ -875,8 +874,8 @@ class Shadowsocks
...
@@ -875,8 +874,8 @@ class Shadowsocks
def
isVpnEnabled
:
Boolean
=
{
def
isVpnEnabled
:
Boolean
=
{
if
(
vpnEnabled
<
0
)
{
if
(
vpnEnabled
<
0
)
{
vpnEnabled
=
if
(
Build
.
VERSION
.
SDK_INT
vpnEnabled
=
if
(
Build
.
VERSION
.
SDK_INT
==
Build
.
VERSION_CODES
.
LOLLIPOP
>=
Build
.
VERSION_CODES
.
ICE_CREAM_SANDWICH
&&
!
status
.
getBoolean
(
Key
.
isRoot
,
false
))
{
||
!
status
.
getBoolean
(
Key
.
isRoot
,
false
))
{
1
1
}
else
{
}
else
{
0
0
...
...
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