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
7d44e4fc
Commit
7d44e4fc
authored
Dec 27, 2015
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch NameNotFoundException
parent
92b9c529
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
.../scala/com/github/shadowsocks/ShadowsocksVpnService.scala
+11
-4
No files found.
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
View file @
7d44e4fc
...
...
@@ -49,6 +49,8 @@ import android.net.VpnService
import
android.os._
import
android.util.Log
import
android.widget.Toast
import
android.content.pm.PackageManager.NameNotFoundException
import
com.github.shadowsocks.aidl.Config
import
com.github.shadowsocks.utils._
import
org.apache.commons.net.util.SubnetUtils
...
...
@@ -381,10 +383,15 @@ class ShadowsocksVpnService extends VpnService with BaseService {
if
(
config
.
isProxyApps
)
{
for
(
pkg
<-
config
.
proxiedAppString
.
split
(
'\n'
))
{
if
(!
config
.
isBypassApps
)
{
builder
.
addAllowedApplication
(
pkg
)
}
else
{
builder
.
addDisallowedApplication
(
pkg
)
try
{
if
(!
config
.
isBypassApps
)
{
builder
.
addAllowedApplication
(
pkg
)
}
else
{
builder
.
addDisallowedApplication
(
pkg
)
}
}
catch
{
case
ex
:
NameNotFoundException
=>
Log
.
e
(
TAG
,
"Invalid package name"
,
ex
);
}
}
}
...
...
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