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
f121ea25
Commit
f121ea25
authored
Jan 20, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent crashing when no market is installed
parent
df1e40d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
mobile/src/main/res/xml/pref_profile.xml
mobile/src/main/res/xml/pref_profile.xml
+5
-4
mobile/src/main/scala/com/github/shadowsocks/ProfilesFragment.scala
.../main/scala/com/github/shadowsocks/ProfilesFragment.scala
+3
-1
No files found.
mobile/src/main/res/xml/pref_profile.xml
View file @
f121ea25
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res/com.github.shadowsocks"
>
xmlns:app=
"http://schemas.android.com/apk/res/com.github.shadowsocks"
>
<be.mygod.preference.EditTextPreference
android:key=
"profileName"
android:summary=
"%s"
android:title=
"@string/profile_name"
/>
<be.mygod.preference.PreferenceCategory
<be.mygod.preference.PreferenceCategory
android:title=
"@string/proxy_cat"
>
android:title=
"@string/proxy_cat"
>
<be.mygod.preference.EditTextPreference
android:key=
"profileName"
android:summary=
"%s"
android:title=
"@string/profile_name"
/>
<be.mygod.preference.EditTextPreference
<be.mygod.preference.EditTextPreference
android:key=
"proxy"
android:key=
"proxy"
android:summary=
"%s"
android:summary=
"%s"
...
...
mobile/src/main/scala/com/github/shadowsocks/ProfilesFragment.scala
View file @
f121ea25
...
@@ -358,7 +358,9 @@ final class ProfilesFragment extends ToolbarFragment with Toolbar.OnMenuItemClic
...
@@ -358,7 +358,9 @@ final class ProfilesFragment extends ToolbarFragment with Toolbar.OnMenuItemClic
REQUEST_SCAN_QR_CODE
)
catch
{
REQUEST_SCAN_QR_CODE
)
catch
{
case
_:
ActivityNotFoundException
=>
case
_:
ActivityNotFoundException
=>
Toast
.
makeText
(
getActivity
,
R
.
string
.
add_profile_scanner_not_installed
,
Toast
.
LENGTH_LONG
).
show
()
Toast
.
makeText
(
getActivity
,
R
.
string
.
add_profile_scanner_not_installed
,
Toast
.
LENGTH_LONG
).
show
()
startActivity
(
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"market://details?id=tw.com.quickmark"
)))
try
startActivity
(
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"market://details?id=tw.com.quickmark"
)))
catch
{
case
exc
:
ActivityNotFoundException
=>
exc
.
printStackTrace
()
}
}
}
true
true
case
R
.
id
.
action_import
=>
case
R
.
id
.
action_import
=>
...
...
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