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
0e0e65c4
Commit
0e0e65c4
authored
Mar 12, 2016
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move profileTip to Key
parent
86da4f53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala
...scala/com/github/shadowsocks/ProfileManagerActivity.scala
+3
-9
src/main/scala/com/github/shadowsocks/utils/Constants.scala
src/main/scala/com/github/shadowsocks/utils/Constants.scala
+2
-0
No files found.
src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala
View file @
0e0e65c4
...
...
@@ -14,7 +14,7 @@ import android.view.{LayoutInflater, MenuItem, View, ViewGroup}
import
android.widget.
{
CheckedTextView
,
ImageView
,
LinearLayout
,
Toast
}
import
com.github.shadowsocks.aidl.IShadowsocksServiceCallback
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.utils.
{
Parser
,
TrafficMonitor
,
Utils
}
import
com.github.shadowsocks.utils.
{
Key
,
Parser
,
TrafficMonitor
,
Utils
}
import
com.github.shadowsocks.widget.UndoSnackbarManager
import
com.google.zxing.integration.android.IntentIntegrator
import
net.glxn.qrgen.android.QRCode
...
...
@@ -24,13 +24,7 @@ import scala.collection.mutable.ArrayBuffer
/**
* @author Mygod
*/
object
ProfileManagerActivity
{
private
final
val
profileTip
=
"profileTip"
}
class
ProfileManagerActivity
extends
AppCompatActivity
with
OnMenuItemClickListener
with
ServiceBoundContext
{
import
ProfileManagerActivity._
private
class
ProfileViewHolder
(
val
view
:
View
)
extends
RecyclerView
.
ViewHolder
(
view
)
with
View
.
OnClickListener
{
var
item
:
Profile
=
_
private
val
text
=
itemView
.
findViewById
(
android
.
R
.
id
.
text1
).
asInstanceOf
[
CheckedTextView
]
...
...
@@ -193,8 +187,8 @@ class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClickListe
if
(
selectedItem
!=
null
)
selectedItem
.
updateText
(
txTotal
,
rxTotal
)
})
if
(
ShadowsocksApplication
.
settings
.
getBoolean
(
profileTip
,
true
))
{
ShadowsocksApplication
.
settings
.
edit
.
putBoolean
(
profileTip
,
false
).
commit
if
(
ShadowsocksApplication
.
settings
.
getBoolean
(
Key
.
profileTip
,
true
))
{
ShadowsocksApplication
.
settings
.
edit
.
putBoolean
(
Key
.
profileTip
,
false
).
commit
new
AlertDialog
.
Builder
(
this
).
setTitle
(
R
.
string
.
profile_manager_dialog
)
.
setMessage
(
R
.
string
.
profile_manager_dialog_content
).
setPositiveButton
(
R
.
string
.
gotcha
,
null
).
create
.
show
}
...
...
src/main/scala/com/github/shadowsocks/utils/Constants.scala
View file @
0e0e65c4
...
...
@@ -80,6 +80,8 @@ object Key {
val
encMethod
=
"encMethod"
val
remotePort
=
"remotePortNum"
val
localPort
=
"localPortNum"
val
profileTip
=
"profileTip"
}
object
Scheme
{
...
...
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