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
230d75b2
Commit
230d75b2
authored
Dec 09, 2019
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine code style
parent
fdf45fbb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
core/src/main/java/com/github/shadowsocks/net/Subnet.kt
core/src/main/java/com/github/shadowsocks/net/Subnet.kt
+2
-2
mobile/src/main/java/com/github/shadowsocks/GlobalSettingsPreferenceFragment.kt
...om/github/shadowsocks/GlobalSettingsPreferenceFragment.kt
+1
-1
mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt
...main/java/com/github/shadowsocks/ProfileConfigFragment.kt
+2
-2
tv/src/main/java/com/github/shadowsocks/tv/ProfilesDialogFragment.kt
.../java/com/github/shadowsocks/tv/ProfilesDialogFragment.kt
+2
-2
No files found.
core/src/main/java/com/github/shadowsocks/net/Subnet.kt
View file @
230d75b2
...
...
@@ -56,8 +56,8 @@ class Subnet(val address: InetAddress, val prefixSize: Int) : Comparable<Subnet>
++
i
}
if
(
i
*
8
==
prefixSize
)
return
true
val
mask
=
256
-
(
1
shl
(
i
*
8
+
8
-
prefixSize
)
)
return
(
a
[
i
].
toInt
()
and
mask
)
==
(
b
[
i
].
toInt
()
and
mask
)
val
mask
=
256
-
(
1
shl
i
*
8
+
8
-
prefixSize
)
return
a
[
i
].
toInt
()
and
mask
==
b
[
i
].
toInt
()
and
mask
}
override
fun
toString
():
String
=
...
...
mobile/src/main/java/com/github/shadowsocks/GlobalSettingsPreferenceFragment.kt
View file @
230d75b2
...
...
@@ -126,7 +126,7 @@ class GlobalSettingsPreferenceFragment : PreferenceFragmentCompat() {
if
(
preference
==
hosts
)
BrowsableEditTextPreferenceDialogFragment
().
apply
{
setKey
(
hosts
.
key
)
setTargetFragment
(
this
@GlobalSettingsPreferenceFragment
,
REQUEST_BROWSE
)
}.
show
(
fragmentManager
?:
return
,
hosts
.
key
)
else
super
.
onDisplayPreferenceDialog
(
preference
)
}.
show
(
parentFragmentManager
,
hosts
.
key
)
else
super
.
onDisplayPreferenceDialog
(
preference
)
}
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
?)
{
...
...
mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt
View file @
230d75b2
...
...
@@ -136,7 +136,7 @@ class ProfileConfigFragment : PreferenceFragmentCompat(),
PluginConfigurationDialogFragment
().
apply
{
setArg
(
Key
.
pluginConfigure
,
pluginConfiguration
.
selected
)
setTargetFragment
(
this
@ProfileConfigFragment
,
0
)
}.
show
(
fragmentManager
?:
return
,
Key
.
pluginConfigure
)
}.
show
(
parentFragmentManager
,
Key
.
pluginConfigure
)
}
private
fun
saveAndExit
()
{
...
...
@@ -178,7 +178,7 @@ class ProfileConfigFragment : PreferenceFragmentCompat(),
Key
.
plugin
->
BottomSheetPreferenceDialogFragment
().
apply
{
setArg
(
Key
.
plugin
)
setTargetFragment
(
this
@ProfileConfigFragment
,
0
)
}.
show
(
fragmentManager
?:
return
,
Key
.
plugin
)
}.
show
(
parentFragmentManager
,
Key
.
plugin
)
Key
.
pluginConfigure
->
{
val
intent
=
PluginManager
.
buildIntent
(
pluginConfiguration
.
selected
,
PluginContract
.
ACTION_CONFIGURE
)
if
(
intent
.
resolveActivity
(
requireContext
().
packageManager
)
==
null
)
showPluginEditor
()
else
{
...
...
tv/src/main/java/com/github/shadowsocks/tv/ProfilesDialogFragment.kt
View file @
230d75b2
...
...
@@ -77,8 +77,8 @@ class ProfilesDialogFragment : LeanbackListPreferenceDialogFragmentCompat() {
private
val
adapter
=
ProfilesAdapter
()
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
{
return
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
)
!!
.
a
lso
{
val
list
=
it
.
findViewById
<
RecyclerView
>(
android
.
R
.
id
.
list
)
return
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
)
!!
.
a
pply
{
val
list
=
findViewById
<
RecyclerView
>(
android
.
R
.
id
.
list
)
list
.
adapter
=
adapter
list
.
layoutManager
!!
.
scrollToPosition
(
adapter
.
profiles
.
indexOfFirst
{
it
.
id
==
DataStore
.
profileId
})
}
...
...
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