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
81a27c1b
Commit
81a27c1b
authored
Jun 07, 2014
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix gen-idea
parent
c3cd705f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
30 deletions
+37
-30
.travis.yml
.travis.yml
+3
-3
build.sbt
build.sbt
+8
-4
local.sbt.example
local.sbt.example
+0
-5
project/build.properties
project/build.properties
+1
-1
project/plugins.sbt
project/plugins.sbt
+1
-3
src/main/res/xml/shadowsocks_headers.xml
src/main/res/xml/shadowsocks_headers.xml
+0
-1
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+23
-12
src/main/scala/com/github/shadowsocks/ShadowsocksApplication.scala
...scala/com/github/shadowsocks/ShadowsocksApplication.scala
+1
-1
No files found.
.travis.yml
View file @
81a27c1b
...
...
@@ -15,14 +15,14 @@ before_install:
-
sudo apt-get install ccache
-
export NDK_CCACHE=ccache
-
export ARCH=`uname -m`
-
wget http://dl.google.com/android/android-sdk_r22.6.
2
-linux.tgz
-
tar xf android-sdk_r22.6.
2
-linux.tgz
-
wget http://dl.google.com/android/android-sdk_r22.6.
4
-linux.tgz
-
tar xf android-sdk_r22.6.
4
-linux.tgz
-
wget http://dl.google.com/android/ndk/android-ndk-r9d-linux-${ARCH}.tar.bz2
-
tar xf android-ndk-r9d-linux-${ARCH}.tar.bz2
-
export ANDROID_NDK_HOME=`pwd`/android-ndk-r9d
-
export ANDROID_HOME=`pwd`/android-sdk-linux
-
export PATH=${PATH}:${ANDROID_NDK_HOME}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
-
echo "y" | android update sdk --filter tools,platform-tools,build-tools-19.0.3,android-1
6
--no-ui --no-https -a
-
echo "y" | android update sdk --filter tools,platform-tools,build-tools-19.0.3,android-1
9,extra-google-m2repository,extra-android-m2repository
--no-ui --no-https -a
install
:
-
gem install --version 0.8.9 faraday
-
gem install travis-artifacts
...
...
build.sbt
View file @
81a27c1b
...
...
@@ -10,6 +10,8 @@ name := "shadowsocks"
compileOrder
in
Compile
:=
CompileOrder
.
JavaThenScala
resolvers
+=
"JRAF"
at
"http://JRAF.org/static/maven/2"
libraryDependencies
++=
Seq
(
"com.google.android"
%
"analytics"
%
"3.01"
,
"dnsjava"
%
"dnsjava"
%
"2.1.5"
,
...
...
@@ -19,9 +21,9 @@ libraryDependencies ++= Seq(
)
libraryDependencies
++=
Seq
(
a
pklib
(
"org.jraf"
%
"android-switch-backport"
%
"1.0
"
),
apklib
(
"net.simonvt.menudrawer"
%
"menudrawer"
%
"3.0.4"
)
,
apklib
(
"com.actionbarsherlock"
%
"actionbarsherlock"
%
"4.4.0"
),
a
ar
(
"com.actionbarsherlock"
%
"actionbarsherlock"
%
"4.4.0"
)
exclude
(
"com.google.android"
,
"support-v4
"
),
"net.simonvt.menudrawer"
%
"menudrawer"
%
"3.0.6"
,
"org.jraf"
%
"android-switch-backport"
%
"1.3.1"
,
"com.google.android.gms"
%
"play-services"
%
"4.4.52"
,
"com.android.support"
%
"support-v4"
%
"19.1.0"
)
...
...
@@ -40,4 +42,6 @@ proguardOptions in Android ++= Seq("-keep class android.support.v4.app.** { *; }
"-keep class org.jraf.android.backport.** { *; }"
,
"-keep class com.github.shadowsocks.** { *; }"
,
"-keep class * extends com.j256.ormlite.** { *; }"
,
"-keepattributes *Annotation*"
)
"-keepattributes *Annotation*"
,
"-dontwarn org.xbill.**"
,
"-dontwarn com.actionbarsherlock.**"
)
local.sbt.example
deleted
100644 → 0
View file @
c3cd705f
import sbtandroid.AndroidPlugin._
keyalias := "travis"
containerId := "GTM-XXXX"
project/build.properties
View file @
81a27c1b
sbt.version
=
0.12.
4
sbt.version
=
0.12.
3
project/plugins.sbt
View file @
81a27c1b
// resolvers += Resolver.url("scalasbt releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)
resolvers
+=
Resolver
.
url
(
"scalasbt releases"
,
new
URL
(
"http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots"
))(
Resolver
.
ivyStylePatterns
)
resolvers
+=
Resolver
.
url
(
"madeye private releases"
,
new
URL
(
"http://madeye-maven-repository.googlecode.com/git/ivy"
))(
Resolver
.
ivyStylePatterns
)
addSbtPlugin
(
"com.hanhuy.sbt"
%
"android-sdk-plugin"
%
"1.2.16"
)
addSbtPlugin
(
"com.github.mpeltonen"
%
"sbt-idea"
%
"1.
5.1
"
)
addSbtPlugin
(
"com.github.mpeltonen"
%
"sbt-idea"
%
"1.
6.0
"
)
src/main/res/xml/shadowsocks_headers.xml
View file @
81a27c1b
<?xml version="1.0" encoding="utf-8"?>
<preference-headers
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<header
...
...
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
81a27c1b
...
...
@@ -44,7 +44,7 @@ import android.content.res.AssetManager
import
android.graphics.
{
Color
,
Bitmap
,
Typeface
}
import
android.os._
import
android.preference._
import
android.util.
Log
import
android.util.
{
Log
,
DisplayMetrics
}
import
android.view._
import
android.widget._
import
com.google.analytics.tracking.android.
{
MapBuilder
,
EasyTracker
}
...
...
@@ -297,6 +297,7 @@ class Shadowsocks
val
MSG_CRASH_RECOVER
:
Int
=
1
val
STATE_MENUDRAWER
=
"com.github.shadowsocks.menuDrawer"
val
STATE_ACTIVE_VIEW_ID
=
"com.github.shadowsocks.activeViewId"
var
singlePane
:
Int
=
-
1
// Variables
var
switchButton
:
Switch
=
null
...
...
@@ -357,6 +358,20 @@ class Shadowsocks
val
handler
=
new
Handler
()
def
isSinglePane
:
Boolean
=
{
if
(
singlePane
==
-
1
)
{
val
metrics
=
new
DisplayMetrics
()
getWindowManager
().
getDefaultDisplay
().
getMetrics
(
metrics
)
val
widthPixels
=
metrics
.
widthPixels
val
scaleFactor
=
metrics
.
density
val
widthDp
=
widthPixels
/
scaleFactor
singlePane
=
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
HONEYCOMB
||
widthPixels
<=
720
)
1
else
0
}
singlePane
==
1
}
private
def
changeSwitch
(
checked
:
Boolean
)
{
switchButton
.
setOnCheckedChangeListener
(
null
)
switchButton
.
setChecked
(
checked
)
...
...
@@ -530,15 +545,15 @@ class Shadowsocks
}
}
if
(
layoutView
!=
null
)
{
val
adView
=
{
if
(
isSinglePane
)
{
new
AdView
(
this
,
AdSize
.
SMART_BANNER
,
"a151becb8068b09"
)
}
else
{
new
AdView
(
this
,
AdSize
.
BANNER
,
"a151becb8068b09"
)
}
val
adView
=
new
AdView
(
this
)
adView
.
setAdUnitId
(
"ca-app-pub-9097031975646651/7760346322"
)
if
(
isSinglePane
)
{
adView
.
setAdSize
(
AdSize
.
SMART_BANNER
)
}
else
{
adView
.
setAdSize
(
AdSize
.
BANNER
)
}
layoutView
.
asInstanceOf
[
ViewGroup
].
addView
(
adView
,
0
)
adView
.
loadAd
(
new
AdRequest
)
adView
.
loadAd
(
new
AdRequest
.
Builder
().
build
()
)
}
}
}
...
...
@@ -553,10 +568,6 @@ class Shadowsocks
loadHeadersFromResource
(
R
.
xml
.
shadowsocks_headers
,
target
);
}
def
isSinglePane
:
Boolean
=
{
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
HONEYCOMB
}
override
def
onCreate
(
savedInstanceState
:
Bundle
)
{
super
.
onCreate
(
savedInstanceState
)
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksApplication.scala
View file @
81a27c1b
...
...
@@ -54,7 +54,7 @@ class ShadowsocksApplication extends Application {
override
def
onCreate
()
{
val
tm
=
TagManager
.
getInstance
(
this
)
ContainerOpener
.
openContainer
(
tm
,
BuildConfig
.
CONTAINER_ID
,
OpenType
.
PREFER_NON_DEFAULT
,
null
,
new
Notifier
{
ContainerOpener
.
openContainer
(
tm
,
"GTM-NT8WS8"
,
OpenType
.
PREFER_NON_DEFAULT
,
null
,
new
Notifier
{
override
def
containerAvailable
(
container
:
Container
)
{
tagContainer
=
container
container
.
registerFunctionCallMacroHandler
(
SIG_FUNC
,
new
FunctionCallMacroHandler
{
...
...
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