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
722ca5b4
Commit
722ca5b4
authored
Nov 30, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle malformed requests in TaskerActivity
parent
01712614
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
mobile/src/main/scala/com/github/shadowsocks/TaskerActivity.scala
...rc/main/scala/com/github/shadowsocks/TaskerActivity.scala
+5
-1
mobile/src/main/scala/com/github/shadowsocks/utils/TaskerSettings.scala
...n/scala/com/github/shadowsocks/utils/TaskerSettings.scala
+1
-2
No files found.
mobile/src/main/scala/com/github/shadowsocks/TaskerActivity.scala
View file @
722ca5b4
...
...
@@ -82,6 +82,11 @@ class TaskerActivity extends AppCompatActivity {
override
def
onCreate
(
savedInstanceState
:
Bundle
)
{
super
.
onCreate
(
savedInstanceState
)
try
taskerOption
=
TaskerSettings
.
fromIntent
(
getIntent
)
catch
{
case
_:
Exception
=>
finish
()
return
}
setContentView
(
R
.
layout
.
layout_tasker
)
val
toolbar
=
findViewById
(
R
.
id
.
toolbar
).
asInstanceOf
[
Toolbar
]
...
...
@@ -89,7 +94,6 @@ class TaskerActivity extends AppCompatActivity {
toolbar
.
setNavigationIcon
(
R
.
drawable
.
ic_navigation_close
)
toolbar
.
setNavigationOnClickListener
(
_
=>
finish
())
taskerOption
=
TaskerSettings
.
fromIntent
(
getIntent
)
switch
=
findViewById
(
R
.
id
.
serviceSwitch
).
asInstanceOf
[
Switch
]
switch
.
setChecked
(
taskerOption
.
switchOn
)
val
profilesList
=
findViewById
(
R
.
id
.
list
).
asInstanceOf
[
RecyclerView
]
...
...
mobile/src/main/scala/com/github/shadowsocks/utils/TaskerSettings.scala
View file @
722ca5b4
...
...
@@ -30,8 +30,7 @@ object TaskerSettings {
private
val
KEY_SWITCH_ON
=
"switch_on"
private
val
KEY_PROFILE_ID
=
"profile_id"
def
fromIntent
(
intent
:
Intent
)
=
new
TaskerSettings
(
if
(
intent
.
hasExtra
(
ApiIntent
.
EXTRA_BUNDLE
))
intent
.
getBundleExtra
(
ApiIntent
.
EXTRA_BUNDLE
)
else
Bundle
.
EMPTY
)
def
fromIntent
(
intent
:
Intent
)
=
new
TaskerSettings
(
intent
.
getBundleExtra
(
ApiIntent
.
EXTRA_BUNDLE
))
}
class
TaskerSettings
(
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