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
f5b22007
Commit
f5b22007
authored
Aug 10, 2013
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update UI
parent
ebc5c3f4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
19 deletions
+55
-19
src/main/AndroidManifest.xml
src/main/AndroidManifest.xml
+2
-2
src/main/res/layout/layout_apps.xml
src/main/res/layout/layout_apps.xml
+34
-5
src/main/res/values/strings.xml
src/main/res/values/strings.xml
+1
-1
src/main/res/values/styles.xml
src/main/res/values/styles.xml
+5
-1
src/main/res/xml/pref_feature.xml
src/main/res/xml/pref_feature.xml
+0
-7
src/main/scala/com/github/shadowsocks/AppManager.scala
src/main/scala/com/github/shadowsocks/AppManager.scala
+10
-0
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+3
-3
No files found.
src/main/AndroidManifest.xml
View file @
f5b22007
...
...
@@ -33,7 +33,7 @@
<activity
android:name=
".Shadowsocks"
android:label=
"@string/app_name"
android:theme=
"@style/Theme.
GAEProxy
"
android:theme=
"@style/Theme.
Shadowsocks
"
android:launchMode=
"singleTask"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
@@ -49,7 +49,7 @@
<activity
android:name=
".AppManager"
android:theme=
"@style/Theme.
GAEProxy
"
android:theme=
"@style/Theme.
AppManager
"
android:label=
"@string/app_name"
>
<intent-filter>
<action
android:name=
"com.github.shadowsocks.AppManager"
/>
...
...
src/main/res/layout/layout_apps.xml
View file @
f5b22007
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:duplicateParentState=
"false"
>
<ListView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/applistview"
/>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:orientation=
"vertical"
android:duplicateParentState=
"false"
>
<RelativeLayout
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
>
<TextView
android:id=
"@+id/bypassLabel"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:layout_marginLeft=
"16dp"
android:textSize=
"22sp"
android:text=
"@string/bypass_apps"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
/>
<org.jraf.android.backport.switchwidget.Switch
android:id=
"@+id/bypassSwitch"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"16dp"
/>
</RelativeLayout>
<ListView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/applistview"
/>
</LinearLayout>
\ No newline at end of file
src/main/res/values/strings.xml
View file @
f5b22007
...
...
@@ -35,7 +35,7 @@
<string
name=
"proxied_apps"
>
Individual Proxy
</string>
<string
name=
"proxied_apps_summary"
>
Set individual proxy for apps
</string>
<string
name=
"proxied_help"
>
Select Apps
</string>
<string
name=
"proxied_help"
>
Individual Proxy
</string>
<string
name=
"bypass_apps"
>
Bypass Mode
</string>
<string
name=
"bypass_apps_summary"
>
Enable this option to bypass selected apps
</string>
<string
name=
"auto_connect"
>
Auto Connect
</string>
...
...
src/main/res/values/styles.xml
View file @
f5b22007
...
...
@@ -21,9 +21,13 @@
</style>
<!-- Variation on the Light theme that turns off the title -->
<style
name=
"Theme.
GAEProxy
"
parent=
"@style/Theme.Shadow"
>
<style
name=
"Theme.
Shadowsocks
"
parent=
"@style/Theme.Shadow"
>
<item
name=
"switchStyle"
>
@style/Widget.Shadow.Switch
</item>
</style>
<style
name=
"Theme.AppManager"
parent=
"@style/Theme.Shadow"
>
<item
name=
"switchStyle"
>
@style/Widget.Holo.Light.CompoundButton.Switch
</item>
</style>
</resources>
\ No newline at end of file
src/main/res/xml/pref_feature.xml
View file @
f5b22007
...
...
@@ -14,13 +14,6 @@
android:summary=
"@string/auto_set_proxy_summary"
android:title=
"@string/auto_set_proxy"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"false"
android:dependency=
"isGlobalProxy"
android:key=
"isBypassApps"
android:summary=
"@string/bypass_apps_summary"
android:title=
"@string/bypass_apps"
>
</CheckBoxPreference>
<Preference
android:key=
"proxyedApps"
android:dependency=
"isGlobalProxy"
...
...
src/main/scala/com/github/shadowsocks/AppManager.scala
View file @
f5b22007
...
...
@@ -69,6 +69,7 @@ import java.io.{ByteArrayOutputStream, ByteArrayInputStream, InputStream}
import
com.nostra13.universalimageloader.core.
{
DisplayImageOptions
,
ImageLoader
,
ImageLoaderConfiguration
}
import
com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer
import
com.google.analytics.tracking.android.EasyTracker
import
org.jraf.android.backport.switchwidget.Switch
case
class
ProxiedApp
(
uid
:
Int
,
name
:
String
,
var
proxied
:
Boolean
)
...
...
@@ -231,6 +232,15 @@ class AppManager extends SherlockActivity with OnCheckedChangeListener with OnCl
.
imageDownloader
(
new
AppIconDownloader
(
this
))
.
build
()
ImageLoader
.
getInstance
().
init
(
config
)
val
bypassSwitch
:
Switch
=
findViewById
(
R
.
id
.
bypassSwitch
).
asInstanceOf
[
Switch
]
val
prefs
:
SharedPreferences
=
PreferenceManager
.
getDefaultSharedPreferences
(
getBaseContext
)
bypassSwitch
.
setOnCheckedChangeListener
(
new
OnCheckedChangeListener
{
def
onCheckedChanged
(
button
:
CompoundButton
,
checked
:
Boolean
)
{
prefs
.
edit
().
putBoolean
(
Key
.
isBypassApps
,
checked
).
commit
()
}
})
bypassSwitch
.
setChecked
(
prefs
.
getBoolean
(
Key
.
isBypassApps
,
false
))
}
protected
override
def
onResume
()
{
...
...
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
f5b22007
...
...
@@ -72,7 +72,7 @@ object Shadowsocks {
val
PREFS_NAME
=
"Shadowsocks"
val
PROXY_PREFS
=
Array
(
Key
.
proxy
,
Key
.
remotePort
,
Key
.
localPort
,
Key
.
sitekey
,
Key
.
encMethod
)
val
FEATRUE_PREFS
=
Array
(
Key
.
isGFWList
,
Key
.
isGlobalProxy
,
Key
.
isBypassApps
,
Key
.
proxyedApps
,
val
FEATRUE_PREFS
=
Array
(
Key
.
isGFWList
,
Key
.
isGlobalProxy
,
Key
.
proxyedApps
,
Key
.
isTrafficStat
,
Key
.
isAutoConnect
)
val
TAG
=
"Shadowsocks"
val
REQUEST_CONNECT
=
1
...
...
@@ -138,7 +138,7 @@ object Shadowsocks {
val
status
=
getActivity
.
getSharedPreferences
(
Key
.
status
,
Context
.
MODE_PRIVATE
)
val
isRoot
=
status
.
getBoolean
(
Key
.
isRoot
,
false
)
if
(
Seq
(
Key
.
isAutoConnect
,
Key
.
isGlobalProxy
,
Key
.
isTrafficStat
,
Key
.
isBypassApps
,
Key
.
proxyedApps
).
contains
(
name
))
{
Key
.
proxyedApps
).
contains
(
name
))
{
pref
.
setEnabled
(
enabled
&&
isRoot
)
}
else
{
pref
.
setEnabled
(
enabled
)
...
...
@@ -517,7 +517,7 @@ class Shadowsocks
val
pref
=
findPreference
(
name
)
if
(
pref
!=
null
)
{
if
(
Seq
(
Key
.
isAutoConnect
,
Key
.
isGlobalProxy
,
Key
.
isTrafficStat
,
Key
.
isBypassApps
,
Key
.
proxyedApps
).
contains
(
name
))
{
Key
.
proxyedApps
).
contains
(
name
))
{
pref
.
setEnabled
(
enabled
&&
isRoot
)
}
else
{
pref
.
setEnabled
(
enabled
)
...
...
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