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
044fb23d
Commit
044fb23d
authored
Jun 22, 2019
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dependencies
parent
e6b511f2
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
23 deletions
+55
-23
core/build.gradle
core/build.gradle
+1
-1
core/src/main/java/com/github/shadowsocks/plugin/PluginConfiguration.kt
...java/com/github/shadowsocks/plugin/PluginConfiguration.kt
+1
-1
core/src/main/java/com/github/shadowsocks/plugin/PluginManager.kt
.../main/java/com/github/shadowsocks/plugin/PluginManager.kt
+1
-1
core/src/main/java/com/github/shadowsocks/utils/ArrayIterator.kt
...c/main/java/com/github/shadowsocks/utils/ArrayIterator.kt
+0
-7
mobile/google-services.json
mobile/google-services.json
+45
-9
mobile/src/main/java/com/github/shadowsocks/widget/StatsBar.kt
...e/src/main/java/com/github/shadowsocks/widget/StatsBar.kt
+3
-2
plugin/src/main/res/color/mtrl_text_btn_text_color_selector.xml
.../src/main/res/color/mtrl_text_btn_text_color_selector.xml
+4
-2
No files found.
core/build.gradle
View file @
044fb23d
...
...
@@ -56,7 +56,7 @@ dependencies {
api
"androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
api
'androidx.preference:preference:1.1.0-beta01'
api
"androidx.room:room-runtime:$roomVersion"
api
'androidx.work:work-runtime-ktx:2.1.0-beta0
1
'
api
'androidx.work:work-runtime-ktx:2.1.0-beta0
2
'
api
'com.crashlytics.sdk.android:crashlytics:2.10.1'
api
'com.google.code.gson:gson:2.8.5'
api
'com.google.firebase:firebase-config:18.0.0'
...
...
core/src/main/java/com/github/shadowsocks/plugin/PluginConfiguration.kt
View file @
044fb23d
...
...
@@ -27,7 +27,7 @@ import java.util.*
class
PluginConfiguration
(
val
pluginsOptions
:
Map
<
String
,
PluginOptions
>,
val
selected
:
String
)
{
private
constructor
(
plugins
:
List
<
PluginOptions
>)
:
this
(
plugins
.
filter
{
it
.
id
.
isNotEmpty
()
}.
associate
{
it
.
id
to
it
},
plugins
.
filter
{
it
.
id
.
isNotEmpty
()
}.
associate
By
{
it
.
id
},
if
(
plugins
.
isEmpty
())
""
else
plugins
[
0
].
id
)
constructor
(
plugin
:
String
)
:
this
(
plugin
.
split
(
'\n'
).
map
{
line
->
if
(
line
.
startsWith
(
"kcptun "
))
{
...
...
core/src/main/java/com/github/shadowsocks/plugin/PluginManager.kt
View file @
044fb23d
...
...
@@ -108,7 +108,7 @@ object PluginManager {
if
(
cachedPlugins
==
null
)
{
val
pm
=
app
.
packageManager
cachedPlugins
=
(
pm
.
queryIntentContentProviders
(
Intent
(
PluginContract
.
ACTION_NATIVE_PLUGIN
),
PackageManager
.
GET_META_DATA
).
map
{
NativePlugin
(
it
)
}
+
NoPlugin
).
associate
{
it
.
id
to
it
}
PackageManager
.
GET_META_DATA
).
map
{
NativePlugin
(
it
)
}
+
NoPlugin
).
associate
By
{
it
.
id
}
}
cachedPlugins
!!
}
...
...
core/src/main/java/com/github/shadowsocks/utils/ArrayIterator.kt
View file @
044fb23d
...
...
@@ -22,7 +22,6 @@ package com.github.shadowsocks.utils
import
android.content.ClipData
import
androidx.recyclerview.widget.SortedList
import
org.json.JSONArray
private
sealed
class
ArrayIterator
<
out
T
>
:
Iterator
<
T
>
{
abstract
val
size
:
Int
...
...
@@ -38,12 +37,6 @@ private class ClipDataIterator(private val data: ClipData) : ArrayIterator<ClipD
}
fun
ClipData
.
asIterable
()
=
Iterable
{
ClipDataIterator
(
this
)
}
private
class
JSONArrayIterator
(
private
val
arr
:
JSONArray
)
:
ArrayIterator
<
Any
>()
{
override
val
size
get
()
=
arr
.
length
()
override
fun
get
(
index
:
Int
)
=
arr
.
get
(
index
)
}
fun
JSONArray
.
asIterable
()
=
Iterable
{
JSONArrayIterator
(
this
)
}
private
class
SortedListIterator
<
out
T
>(
private
val
list
:
SortedList
<
T
>)
:
ArrayIterator
<
T
>()
{
override
val
size
get
()
=
list
.
size
()
override
fun
get
(
index
:
Int
)
=
list
[
index
]
...
...
mobile/google-services.json
View file @
044fb23d
...
...
@@ -14,6 +14,14 @@
}
},
"oauth_client"
:
[
{
"client_id"
:
"261400168171-pcgrp7aprh210vvfc6vut3am2n3chopq.apps.googleusercontent.com"
,
"client_type"
:
1
,
"android_info"
:
{
"package_name"
:
"com.github.shadowsocks"
,
"certificate_hash"
:
"7309a97ff2680788113c6d0ce53898b911885ff5"
}
},
{
"client_id"
:
"261400168171-sfik8o3pj7e243583olorh7s5974vab1.apps.googleusercontent.com"
,
"client_type"
:
1
,
...
...
@@ -33,15 +41,43 @@
}
],
"services"
:
{
"analytics_service"
:
{
"status"
:
1
},
"appinvite_service"
:
{
"status"
:
1
,
"other_platform_oauth_client"
:
[]
"other_platform_oauth_client"
:
[
{
"client_id"
:
"261400168171-g7aelv5bu012ojr7dod7lq09c9anjimh.apps.googleusercontent.com"
,
"client_type"
:
3
}
]
}
},
"admob_app_id"
:
"ca-app-pub-9097031975646651~3330146721"
},
{
"client_info"
:
{
"mobilesdk_app_id"
:
"1:261400168171:android:0dbac07695d93817"
,
"android_client_info"
:
{
"package_name"
:
"com.github.shadowsocks.tv"
}
},
"ads_service"
:
{
"status"
:
2
"oauth_client"
:
[
{
"client_id"
:
"261400168171-g7aelv5bu012ojr7dod7lq09c9anjimh.apps.googleusercontent.com"
,
"client_type"
:
3
}
],
"api_key"
:
[
{
"current_key"
:
"AIzaSyCee3fAad7nb3YsxeUO9mqqHFfAvsSCbVs"
}
],
"services"
:
{
"appinvite_service"
:
{
"other_platform_oauth_client"
:
[
{
"client_id"
:
"261400168171-g7aelv5bu012ojr7dod7lq09c9anjimh.apps.googleusercontent.com"
,
"client_type"
:
3
}
]
}
}
}
...
...
mobile/src/main/java/com/github/shadowsocks/widget/StatsBar.kt
View file @
044fb23d
...
...
@@ -35,6 +35,7 @@ import com.github.shadowsocks.R
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.net.HttpsTest
import
com.google.android.material.bottomappbar.BottomAppBar
import
kotlin.math.abs
class
StatsBar
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
defStyleAttr
:
Int
=
R
.
attr
.
bottomAppBarStyle
)
:
...
...
@@ -53,8 +54,8 @@ class StatsBar @JvmOverloads constructor(context: Context, attrs: AttributeSet?
dxConsumed
:
Int
,
dyConsumed
:
Int
,
dxUnconsumed
:
Int
,
dyUnconsumed
:
Int
,
type
:
Int
,
consumed
:
IntArray
)
{
val
dy
=
dyConsumed
+
dyUnconsumed
super
.
onNestedScroll
(
coordinatorLayout
,
child
,
target
,
dxConsumed
,
if
(
Math
.
abs
(
dy
)
>=
threshold
)
dy
else
0
,
dxUnconsumed
,
0
,
type
,
consumed
)
super
.
onNestedScroll
(
coordinatorLayout
,
child
,
target
,
dxConsumed
,
if
(
abs
(
dy
)
>=
threshold
)
dy
else
0
,
dxUnconsumed
,
0
,
type
,
consumed
)
}
}
return
behavior
...
...
plugin/src/main/res/color/mtrl_text_btn_text_color_selector.xml
View file @
044fb23d
<?xml version="1.0" encoding="utf-8"?>
<!--
Source: https://github.com/material-components/material-components-android/blob/
79239aab18b85cc3a6a9de98d797b97a96d59bbc
/lib/java/com/google/android/material/button/res/color/mtrl_text_btn_text_color_selector.xml
Source: https://github.com/material-components/material-components-android/blob/
2de39fafe0285aab7e6e101549c4bc93f184a7e5
/lib/java/com/google/android/material/button/res/color/mtrl_text_btn_text_color_selector.xml
Copyright 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
...
...
@@ -14,6 +14,8 @@
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:color=
"@color/color_primary_text"
android:state_enabled=
"true"
/>
<item
android:alpha=
"1.00"
android:color=
"@color/color_primary_text"
android:state_checkable=
"true"
android:state_checked=
"true"
android:state_enabled=
"true"
/>
<item
android:alpha=
"0.60"
android:color=
"?attr/colorOnSurface"
android:state_checkable=
"true"
android:state_checked=
"false"
android:state_enabled=
"true"
/>
<item
android:alpha=
"1.00"
android:color=
"@color/color_primary_text"
android:state_enabled=
"true"
/>
<item
android:alpha=
"0.38"
android:color=
"?attr/colorOnSurface"
/>
</selector>
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