Skip to content

Commit

Permalink
Merge branch 'release/1.1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken committed May 21, 2015
2 parents 7e4f58a + 5d751a1 commit 5703f3d
Show file tree
Hide file tree
Showing 24 changed files with 48 additions and 48 deletions.
5 changes: 3 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "jni/xsocks"]
path = jni/xsocks
url = https://github.com/lparam/xsocks.git
path = jni/xsocks
url = https://github.com/lparam/xsocks.git
ignore = dirty
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v1.1.5 (2015-5-20)
v1.1.7 (2015-5-22)
-----------
* Change: Remove snackbar action
* Change: Remove redundant code and icon


v1.1.6 (2015-5-20)
-----------
* The first public version.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ all: app/src/main/jniLibs/armeabi/libsystem.so
.PHONY: clean

clean:
$(ANDROID_NDK_HOME)/ndk-build clean
rm -rf libs
rm -rf app/src/main/jniLibs
rm -rf jni/xsocks/xsocks-android-i686
rm -rf jni/xsocks/xsocks-android-armv7-a

app/src/main/jniLibs/armeabi/libsystem.so: jni/system.cpp jni/Android.mk
Expand All @@ -21,7 +23,7 @@ app/src/main/jniLibs/armeabi/libsystem.so: jni/system.cpp jni/Android.mk
fi ;\
popd ;\
pushd jni ;\
$(ANDROID_NDK_HOME)/ndk-build NDK_LOG=1 V=1 || exit 1 ;\
$(ANDROID_NDK_HOME)/ndk-build NDK_LOG=1 V=0 || exit 1 ;\
popd ;\
rm -rf app/src/main/assets/x86 ;\
rm -rf app/src/main/assets/armeabi-v7a ;\
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'me.tatarka.retrolambda'
if(file('../sign.gradle').exists()) {
apply from: '../sign.gradle'
} else {
ogger.error('no such file: ../sign.gradle')
logger.error('no such file: ../sign.gradle')
}

android {
Expand All @@ -14,8 +14,8 @@ android {
applicationId "io.github.xsocks"
minSdkVersion 18
targetSdkVersion 22
versionCode 116
versionName '1.1.6'
versionCode 117
versionName '1.1.7'
}
lintOptions {
abortOnError true
Expand Down
9 changes: 0 additions & 9 deletions app/src/main/java/io/github/xsocks/ui/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,7 @@ protected void onCreate(Bundle savedInstanceState) {
upArrow.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);
}
ab.setHomeAsUpIndicator(upArrow);

String title = getString(R.string.about);

ab.setDisplayHomeAsUpEnabled(true);
if (TextUtils.isEmpty(title)) {
ab.setDisplayShowTitleEnabled(false);
} else {
ab.setDisplayShowTitleEnabled(true);
ab.setTitle(title);
}
}

TextView aboutVersion = (TextView) findViewById(R.id.aboutVersion);
Expand Down
18 changes: 7 additions & 11 deletions app/src/main/java/io/github/xsocks/ui/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected void onCreate(Bundle savedInstanceState) {
}

Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setLogo(R.drawable.ic_stat_xsocks);
toolbar.setLogo(R.drawable.ic_logo);

switchButton = (Switch) toolbar.findViewById(R.id.switchButton);
switchButton.setOnCheckedChangeListener(this);
Expand Down Expand Up @@ -225,7 +225,6 @@ protected void onCreate(Bundle savedInstanceState) {
.build();

result.getListView().setVerticalScrollBarEnabled(false);
toolbar.setNavigationIcon(R.drawable.ic_drawer_light);

prefsFragment = new PrefsFragment();
getFragmentManager().beginTransaction().replace(R.id.content, prefsFragment).commit();
Expand Down Expand Up @@ -339,7 +338,7 @@ private void onStateChanged(int s, String m) {
Snackbar.with(MainActivity.this)
.text(String.format(getString(R.string.vpn_error), m))
.duration(Snackbar.SnackbarDuration.LENGTH_LONG)
.actionLabel(R.string.error));
.swipeToDismiss(false));
}
prefsFragment.setPreferenceEnabled(true);
break;
Expand Down Expand Up @@ -474,9 +473,9 @@ private void showAbout() {
SnackbarManager.show(
Snackbar.with(this)
.text("There are no email applications installed.")
.textColor(Color.RED)
.duration(Snackbar.SnackbarDuration.LENGTH_LONG)
.actionLabel(R.string.error)
.actionColor(Color.RED));
.swipeToDismiss(false));
}
}

Expand Down Expand Up @@ -640,8 +639,7 @@ private boolean isTextEmpty(String s, String msg) {
Snackbar.with(this)
.text(msg)
.duration(Snackbar.SnackbarDuration.LENGTH_LONG)
.actionLabel(R.string.error)
.actionColor(Color.RED));
.swipeToDismiss(false));
return true;
}
return false;
Expand All @@ -667,17 +665,15 @@ private boolean checkNumber(String key, Boolean low) {
Snackbar.with(this)
.text(getString(R.string.port_alert))
.duration(Snackbar.SnackbarDuration.LENGTH_LONG)
.actionLabel(R.string.error)
.swipeToDismiss(false)
.actionColor(Color.RED));
.swipeToDismiss(false));
return false;
}
} catch (Exception ex) {
SnackbarManager.show(
Snackbar.with(this)
.text(getString(R.string.port_alert))
.duration(Snackbar.SnackbarDuration.LENGTH_LONG)
.actionLabel(R.string.error));
.swipeToDismiss(false));
return false;
}
return true;
Expand Down
Binary file added app/src/main/res/drawable-hdpi/ic_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/drawable-hdpi/ic_stat_xsocks.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_drawer_dark.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_drawer_light.png
Binary file not shown.
Binary file added app/src/main/res/drawable-xhdpi/ic_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/drawable-xhdpi/ic_stat_xsocks.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/ic_drawer_dark.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/ic_drawer_light.png
Binary file not shown.
9 changes: 4 additions & 5 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:textStyle="bold"
android:title="@string/about"
android:elevation="4dp"/>
android:title="@string/about"/>

<FrameLayout
android:layout_below="@id/toolbar"
Expand Down Expand Up @@ -43,15 +42,15 @@
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:gravity="center"
android:textColor="@color/about_libraries_text_openSource"
android:textColor="@color/about_text"
tools:text="About version"/>

<View
android:id="@+id/aboutDivider"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="4dp"
android:background="@color/about_libraries_dividerDark_openSource"
android:background="@color/about_dividerDark"
/>

<TextView
Expand All @@ -62,7 +61,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:textColor="@color/about"
android:textColor="@color/about_description"
tools:text="About description"/>
</LinearLayout>
</FrameLayout>
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
android:id="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:titleTextAppearance="@android:style/TextAppearance.Small.Inverse">
android:background="?attr/colorPrimary">

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
Expand Down
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions app/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources>

<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<style name="AppTheme.DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">false</item>
<item name="color">@android:color/white</item>
</style>
Expand All @@ -17,9 +17,11 @@
<item name="colorPrimaryDark">@color/primaryColorDark</item>
<item name="colorAccent">@color/accentColor</item>

<item name="material_drawer_background">@color/drawer_background_light</item>
<!-- MaterialDrawer specific values -->
<item name="background">@color/background_light</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<item name="material_drawer_background">@color/drawer_background_light</item>

<item name="drawerArrowStyle">@style/AppTheme.DrawerArrowStyle</item>

</style>

Expand Down
15 changes: 6 additions & 9 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="title">#EEE</color>
<color name="tool_title">@android:color/white</color>
<color name="about">#727272</color>
<color name="about_libraries_dividerDark_openSource">#AAA</color>
<color name="about_libraries_dividerLight_openSource">#DADADA</color>
<color name="about_libraries_text_openSource">#727272</color>

<color name="about_description">#727272</color>
<color name="about_dividerDark">#AAA</color>
<color name="about_dividerLight">#DADADA</color>
<color name="about_text">#727272</color>

<color name="sk_material_green500">#4caf50</color>
<color name="sk_material_green700">#388e3c</color>
Expand All @@ -20,12 +20,9 @@
<color name="primaryColor">@color/sk_material_green500</color>
<color name="primaryColorDark">@color/sk_material_green700</color>

<color name="drawer_background_light">#ffeeeeee</color>
<color name="background_light">#ffe2e2e2</color>

<color name="drawer_background_light">#ffeeeeee</color>
<color name="material_drawer_icons">#ff6a6a6a</color>

<color name="button_click_background">#4dffffff</color>


</resources>
8 changes: 8 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<resources>

<style name="AppTheme.DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/white</item>
</style>

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primaryColor</item>
<item name="colorPrimaryDark">@color/primaryColorDark</item>
Expand All @@ -9,6 +14,9 @@
<item name="background">@color/background_light</item>
<item name="material_drawer_background">@color/drawer_background_light</item>
<item name="material_drawer_primary_icon">@color/material_drawer_icons</item>

<item name="drawerArrowStyle">@style/AppTheme.DrawerArrowStyle</item>

</style>

</resources>
2 changes: 1 addition & 1 deletion jni/xsocks

0 comments on commit 5703f3d

Please sign in to comment.