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
df09d391
Commit
df09d391
authored
Jul 03, 2016
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add apply-all action
parent
1fe0ab99
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
3 deletions
+35
-3
project/plugins.sbt
project/plugins.sbt
+1
-1
src/main/res/drawable/ic_done_all.xml
src/main/res/drawable/ic_done_all.xml
+9
-0
src/main/res/menu/app_manager_menu.xml
src/main/res/menu/app_manager_menu.xml
+8
-2
src/main/res/values-ru/strings.xml
src/main/res/values-ru/strings.xml
+2
-0
src/main/res/values-zh-rCN/strings.xml
src/main/res/values-zh-rCN/strings.xml
+1
-0
src/main/res/values-zh/strings.xml
src/main/res/values-zh/strings.xml
+1
-0
src/main/res/values/strings.xml
src/main/res/values/strings.xml
+1
-0
src/main/scala/com/github/shadowsocks/AppManager.scala
src/main/scala/com/github/shadowsocks/AppManager.scala
+12
-0
No files found.
project/plugins.sbt
View file @
df09d391
addSbtPlugin
(
"org.scala-android"
%
"sbt-android"
%
"1.6.
5
"
)
addSbtPlugin
(
"org.scala-android"
%
"sbt-android"
%
"1.6.
6
"
)
addSbtPlugin
(
"com.timushev.sbt"
%
"sbt-updates"
%
"0.1.10"
)
addSbtPlugin
(
"com.timushev.sbt"
%
"sbt-updates"
%
"0.1.10"
)
...
...
src/main/res/drawable/ic_done_all.xml
0 → 100644
View file @
df09d391
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FFFFFFFF"
android:pathData=
"M18,7l-1.41,-1.41 -6.34,6.34 1.41,1.41L18,7zM22.24,5.59L11.66,16.17 7.48,12l-1.41,1.41L11.66,19l12,-12 -1.42,-1.41zM0.41,13.41L6,19l1.41,-1.41L1.83,12 0.41,13.41z"
/>
</vector>
src/main/res/menu/app_manager_menu.xml
View file @
df09d391
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/action_apply_all"
android:title=
"@string/action_apply_all"
android:icon=
"@drawable/ic_done_all"
android:alphabeticShortcut=
"a"
android:numericShortcut=
"1"
app:showAsAction=
"always"
/>
<item
android:id=
"@+id/action_export"
<item
android:id=
"@+id/action_export"
android:title=
"@string/action_export"
android:title=
"@string/action_export"
android:icon=
"@drawable/ic_content_copy"
android:icon=
"@drawable/ic_content_copy"
app:showAsAction=
"ifRoom"
app:showAsAction=
"ifRoom"
android:alphabeticShortcut=
"e"
android:alphabeticShortcut=
"e"
android:numericShortcut=
"
1
"
/>
android:numericShortcut=
"
2
"
/>
<item
android:id=
"@+id/action_import"
<item
android:id=
"@+id/action_import"
android:title=
"@string/action_import"
android:title=
"@string/action_import"
android:icon=
"@drawable/ic_content_paste"
android:icon=
"@drawable/ic_content_paste"
app:showAsAction=
"ifRoom"
app:showAsAction=
"ifRoom"
android:alphabeticShortcut=
"i"
android:alphabeticShortcut=
"i"
android:numericShortcut=
"
2
"
/>
android:numericShortcut=
"
3
"
/>
</menu>
</menu>
src/main/res/values-ru/strings.xml
View file @
df09d391
...
@@ -100,6 +100,8 @@
...
@@ -100,6 +100,8 @@
<string
name=
"flush_dnscache_no_root"
>
Очистка кэша DNS не работает без налиичя ROOT прав
</string>
<string
name=
"flush_dnscache_no_root"
>
Очистка кэша DNS не работает без налиичя ROOT прав
</string>
<string
name=
"flushing"
>
Очистка
</string>
<string
name=
"flushing"
>
Очистка
</string>
<string
name=
"add_profile"
>
Добавить Профиль
</string>
<string
name=
"add_profile"
>
Добавить Профиль
</string>
<string
name=
"action_apply_all"
>
Применить настройки для всех профилей
</string>
<string
name=
"action_export"
>
Экспортировать в буфер обмена
</string>
<string
name=
"action_export"
>
Экспортировать в буфер обмена
</string>
<string
name=
"action_import"
>
Импортировать из буфера обмена
</string>
<string
name=
"action_import"
>
Импортировать из буфера обмена
</string>
<string
name=
"action_export_msg"
>
Успешный экспорт!
</string>
<string
name=
"action_export_msg"
>
Успешный экспорт!
</string>
...
...
src/main/res/values-zh-rCN/strings.xml
View file @
df09d391
...
@@ -113,6 +113,7 @@
...
@@ -113,6 +113,7 @@
<item>
绕过局域网及中国大陆地址
</item>
<item>
绕过局域网及中国大陆地址
</item>
</string-array>
</string-array>
<string
name=
"action_apply_all"
>
应用设置到所有配置文件
</string>
<string
name=
"action_export"
>
导出至剪贴板
</string>
<string
name=
"action_export"
>
导出至剪贴板
</string>
<string
name=
"action_import"
>
从剪贴板导入
</string>
<string
name=
"action_import"
>
从剪贴板导入
</string>
<string
name=
"action_export_msg"
>
导出至剪贴板成功
</string>
<string
name=
"action_export_msg"
>
导出至剪贴板成功
</string>
...
...
src/main/res/values-zh/strings.xml
View file @
df09d391
...
@@ -115,6 +115,7 @@
...
@@ -115,6 +115,7 @@
<item>
略過區域網路及中國大陸位址
</item>
<item>
略過區域網路及中國大陸位址
</item>
</string-array>
</string-array>
<string
name=
"action_apply_all"
>
應用設置到所有配置文件
</string>
<string
name=
"action_export"
>
匯出至剪貼簿
</string>
<string
name=
"action_export"
>
匯出至剪貼簿
</string>
<string
name=
"action_import"
>
從剪貼簿匯入
</string>
<string
name=
"action_import"
>
從剪貼簿匯入
</string>
<string
name=
"action_export_msg"
>
匯出至剪貼簿成功
</string>
<string
name=
"action_export_msg"
>
匯出至剪貼簿成功
</string>
...
...
src/main/res/values/strings.xml
View file @
df09d391
...
@@ -102,6 +102,7 @@
...
@@ -102,6 +102,7 @@
<string
name=
"flush_dnscache_no_root"
>
Flush DNS cache cannot proceed without ROOT permission
</string>
<string
name=
"flush_dnscache_no_root"
>
Flush DNS cache cannot proceed without ROOT permission
</string>
<string
name=
"flushing"
>
Flushing
</string>
<string
name=
"flushing"
>
Flushing
</string>
<string
name=
"add_profile"
>
Add Profile
</string>
<string
name=
"add_profile"
>
Add Profile
</string>
<string
name=
"action_apply_all"
>
Apply Settings to All Profiles
</string>
<string
name=
"action_export"
>
Export to Clipboard
</string>
<string
name=
"action_export"
>
Export to Clipboard
</string>
<string
name=
"action_import"
>
Import from Clipboard
</string>
<string
name=
"action_import"
>
Import from Clipboard
</string>
<string
name=
"action_export_msg"
>
Successfully export!
</string>
<string
name=
"action_export_msg"
>
Successfully export!
</string>
...
...
src/main/scala/com/github/shadowsocks/AppManager.scala
View file @
df09d391
...
@@ -157,6 +157,18 @@ class AppManager extends AppCompatActivity with OnMenuItemClickListener {
...
@@ -157,6 +157,18 @@ class AppManager extends AppCompatActivity with OnMenuItemClickListener {
val
clipboard
=
getSystemService
(
Context
.
CLIPBOARD_SERVICE
).
asInstanceOf
[
ClipboardManager
]
val
clipboard
=
getSystemService
(
Context
.
CLIPBOARD_SERVICE
).
asInstanceOf
[
ClipboardManager
]
val
prefs
=
PreferenceManager
.
getDefaultSharedPreferences
(
getBaseContext
)
val
prefs
=
PreferenceManager
.
getDefaultSharedPreferences
(
getBaseContext
)
item
.
getItemId
match
{
item
.
getItemId
match
{
case
R
.
id
.
action_apply_all
=>
app
.
profileManager
.
getAllProfiles
match
{
case
Some
(
profiles
)
=>
val
proxiedAppString
=
prefs
.
getString
(
Key
.
proxied
,
""
)
profiles
.
foreach
(
profile
=>
profile
.
individual
=
proxiedAppString
app
.
profileManager
.
updateProfile
(
profile
)
)
Toast
.
makeText
(
this
,
R
.
string
.
action_apply_all
,
Toast
.
LENGTH_SHORT
).
show
case
_
=>
Toast
.
makeText
(
this
,
R
.
string
.
action_export_err
,
Toast
.
LENGTH_SHORT
).
show
}
return
true
case
R
.
id
.
action_export
=>
case
R
.
id
.
action_export
=>
val
bypass
=
prefs
.
getBoolean
(
Key
.
isBypassApps
,
false
)
val
bypass
=
prefs
.
getBoolean
(
Key
.
isBypassApps
,
false
)
val
proxiedAppString
=
prefs
.
getString
(
Key
.
proxied
,
""
)
val
proxiedAppString
=
prefs
.
getString
(
Key
.
proxied
,
""
)
...
...
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