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
5217b1d1
Commit
5217b1d1
authored
Dec 24, 2016
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant Typefaces
parent
015fefe3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
24 deletions
+1
-24
src/main/scala/com/github/shadowsocks/MainActivity.scala
src/main/scala/com/github/shadowsocks/MainActivity.scala
+1
-24
No files found.
src/main/scala/com/github/shadowsocks/MainActivity.scala
View file @
5217b1d1
...
@@ -22,13 +22,12 @@ package com.github.shadowsocks
...
@@ -22,13 +22,12 @@ package com.github.shadowsocks
import
java.lang.System.currentTimeMillis
import
java.lang.System.currentTimeMillis
import
java.net.
{
HttpURLConnection
,
URL
}
import
java.net.
{
HttpURLConnection
,
URL
}
import
java.util.
{
Locale
,
Hashtable
}
import
java.util.
Locale
import
android.app.Activity
import
android.app.Activity
import
android.app.backup.BackupManager
import
android.app.backup.BackupManager
import
android.content.SharedPreferences.OnSharedPreferenceChangeListener
import
android.content.SharedPreferences.OnSharedPreferenceChangeListener
import
android.content._
import
android.content._
import
android.graphics.Typeface
import
android.net.
{
Uri
,
VpnService
}
import
android.net.
{
Uri
,
VpnService
}
import
android.nfc.
{
NdefMessage
,
NfcAdapter
}
import
android.nfc.
{
NdefMessage
,
NfcAdapter
}
import
android.os.
{
Build
,
Bundle
,
Handler
}
import
android.os.
{
Build
,
Bundle
,
Handler
}
...
@@ -41,7 +40,6 @@ import android.util.Log
...
@@ -41,7 +40,6 @@ import android.util.Log
import
android.view.View
import
android.view.View
import
android.webkit.
{
WebView
,
WebViewClient
}
import
android.webkit.
{
WebView
,
WebViewClient
}
import
android.widget.
{
TextView
,
Toast
}
import
android.widget.
{
TextView
,
Toast
}
import
com.github.jorgecastilloprz.FABProgressCircle
import
com.github.jorgecastilloprz.FABProgressCircle
import
com.github.shadowsocks.ShadowsocksApplication.app
import
com.github.shadowsocks.ShadowsocksApplication.app
import
com.github.shadowsocks.aidl.IShadowsocksServiceCallback
import
com.github.shadowsocks.aidl.IShadowsocksServiceCallback
...
@@ -53,27 +51,6 @@ import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem
...
@@ -53,27 +51,6 @@ import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem
import
com.mikepenz.materialdrawer.model.
{
PrimaryDrawerItem
,
SecondaryDrawerItem
}
import
com.mikepenz.materialdrawer.model.
{
PrimaryDrawerItem
,
SecondaryDrawerItem
}
import
com.mikepenz.materialdrawer.
{
Drawer
,
DrawerBuilder
}
import
com.mikepenz.materialdrawer.
{
Drawer
,
DrawerBuilder
}
object
Typefaces
{
def
get
(
c
:
Context
,
assetPath
:
String
)
:
Typeface
=
{
cache
synchronized
{
if
(!
cache
.
containsKey
(
assetPath
))
{
try
{
cache
.
put
(
assetPath
,
Typeface
.
createFromAsset
(
c
.
getAssets
,
assetPath
))
}
catch
{
case
e
:
Exception
=>
Log
.
e
(
TAG
,
"Could not get typeface '"
+
assetPath
+
"' because "
+
e
.
getMessage
)
app
.
track
(
e
)
return
null
}
}
return
cache
.
get
(
assetPath
)
}
}
private
final
val
TAG
=
"Typefaces"
private
final
val
cache
=
new
Hashtable
[
String
,
Typeface
]
}
object
MainActivity
{
object
MainActivity
{
private
final
val
TAG
=
"ShadowsocksMainActivity"
private
final
val
TAG
=
"ShadowsocksMainActivity"
private
final
val
REQUEST_CONNECT
=
1
private
final
val
REQUEST_CONNECT
=
1
...
...
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