Skip to content

Commit

Permalink
sdk28
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Jul 10, 2019
1 parent c0e968a commit 879e25b
Show file tree
Hide file tree
Showing 14 changed files with 88 additions and 85 deletions.
10 changes: 5 additions & 5 deletions V2rayNG/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 28
buildToolsVersion '28.0.3'

compileOptions {
targetCompatibility = "8"
Expand All @@ -16,8 +16,8 @@ android {
minSdkVersion 17
targetSdkVersion Integer.parseInt("$targetSdkVer")
multiDexEnabled true
versionCode 210
versionName "1.0.1"
versionCode 212
versionName "1.0.2"
}

signingConfigs {
Expand Down Expand Up @@ -96,7 +96,7 @@ dependencies {
implementation "org.jetbrains.anko:anko-support-v4:$ankoVersion"
implementation "org.jetbrains.anko:anko-appcompat-v7:$ankoVersion"
implementation "org.jetbrains.anko:anko-design:$ankoVersion"
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'io.reactivex:rxjava:1.3.4'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar'
Expand Down
2 changes: 1 addition & 1 deletion V2rayNG/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="com.android.vending.BILLING" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
<application
android:name=".AngApplication"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class PerAppProxyActivity : BaseActivity() {
recycler_view.addOnScrollListener(object : RecyclerView.OnScrollListener() {
var dst = 0
val threshold = resources.getDimensionPixelSize(R.dimen.bypass_list_header_height) * 3
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
dst += dy
if (dst > threshold) {
header_view.hide()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class PerAppProxyAdapter(val activity: BaseActivity, val apps: List<AppInfo>, bl

val icon = itemView.icon!!
val name = itemView.name!!
val package_name = itemView.package_name!!
val checkBox = itemView.check_box!!

fun bind(appInfo: AppInfo) {
Expand All @@ -71,10 +72,7 @@ class PerAppProxyAdapter(val activity: BaseActivity, val apps: List<AppInfo>, bl
// name.text = appInfo.appName

checkBox.isChecked = inBlacklist

// name.textColor = mActivity.resources.getColor(if (appInfo.isSystemApp)
// R.color.color_highlight_material else R.color.abc_secondary_text_material_light)

package_name.text = appInfo.packageName
if (appInfo.isSystemApp) {
name.text = String.format("** %1s", appInfo.appName)
name.textColor = Color.RED
Expand Down
10 changes: 5 additions & 5 deletions V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SettingsActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SettingsActivity : BaseActivity() {
const val PREF_DOMESTIC_DNS = "pref_domestic_dns"

// const val PREF_SOCKS_PORT = "pref_socks_port"
// const val PREF_LANCONN_PORT = "pref_lanconn_port"
// const val PREF_HTTP_PORT = "pref_http_port"

const val PREF_ROUTING_DOMAIN_STRATEGY = "pref_routing_domain_strategy"
const val PREF_ROUTING_MODE = "pref_routing_mode"
Expand Down Expand Up @@ -67,7 +67,7 @@ class SettingsActivity : BaseActivity() {
val forwardIpv6 by lazy { findPreference(PREF_FORWARD_IPV6) as CheckBoxPreference }

// val socksPort by lazy { findPreference(PREF_SOCKS_PORT) as EditTextPreference }
// val lanconnPort by lazy { findPreference(PREF_LANCONN_PORT) as EditTextPreference }
// val httpPort by lazy { findPreference(PREF_HTTP_PORT) as EditTextPreference }

val routingCustom: Preference by lazy { findPreference(PREF_ROUTING_CUSTOM) }
// val donate: Preference by lazy { findPreference(PREF_DONATE) }
Expand Down Expand Up @@ -132,8 +132,8 @@ class SettingsActivity : BaseActivity() {
// socksPort.summary = any as String
// true
// }
// lanconnPort.setOnPreferenceChangeListener { preference, any ->
// lanconnPort.summary = any as String
// httpPort.setOnPreferenceChangeListener { preference, any ->
// httpPort.summary = any as String
// true
// }

Expand All @@ -156,7 +156,7 @@ class SettingsActivity : BaseActivity() {
}

// socksPort.summary = defaultSharedPreferences.getString(PREF_SOCKS_PORT, "10808")
// lanconnPort.summary = defaultSharedPreferences.getString(PREF_LANCONN_PORT, "")
// lanconnPort.summary = defaultSharedPreferences.getString(PREF_HTTP_PORT, "")

defaultSharedPreferences.registerOnSharedPreferenceChangeListener(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ object V2rayConfigUtil {
try {
v2rayConfig.inbounds[0].port = 10808
// val socksPort = Utils.parseInt(app.defaultDPreference.getPrefString(SettingsActivity.PREF_SOCKS_PORT, "10808"))
// val lanconnPort = Utils.parseInt(app.defaultDPreference.getPrefString(SettingsActivity.PREF_LANCONN_PORT, ""))
// val lanconnPort = Utils.parseInt(app.defaultDPreference.getPrefString(SettingsActivity.PREF_HTTP_PORT, ""))

// if (socksPort > 0) {
// v2rayConfig.inbounds[0].port = socksPort
Expand Down
4 changes: 2 additions & 2 deletions V2rayNG/app/src/main/res/layout/activity_bypass_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
android:layout_toLeftOf="@id/switch_per_app_proxy"
android:layout_toStartOf="@id/switch_per_app_proxy"
android:text="@string/title_pref_per_app_proxy"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
android:textAppearance="@style/TextAppearance.AppCompat.Small" />

</RelativeLayout>

Expand All @@ -81,7 +81,7 @@
android:layout_toLeftOf="@id/switch_bypass_apps"
android:layout_toStartOf="@id/switch_bypass_apps"
android:text="@string/switch_bypass_apps_mode"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
android:textAppearance="@style/TextAppearance.AppCompat.Small" />

</RelativeLayout>

Expand Down
36 changes: 26 additions & 10 deletions V2rayNG/app/src/main/res/layout/item_recycler_bypass_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,41 @@
android:id="@+id/icon"
android:layout_width="46dp"
android:layout_height="46dp"
android:paddingEnd="10dp"
android:paddingStart="14dp"
android:paddingLeft="14dp"
android:paddingRight="10dp"
android:paddingStart="14dp" />
android:paddingEnd="10dp"
android:paddingRight="10dp" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/name"
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0" />
android:layout_height="46dp"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical"
android:paddingStart="@dimen/layout_margin_right_height"
android:paddingEnd="@dimen/layout_margin_right_height">

<android.support.v7.widget.AppCompatTextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/package_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
</LinearLayout>


<android.support.v7.widget.AppCompatCheckBox
android:id="@+id/check_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:paddingEnd="6dp"
android:paddingStart="2dp"
android:paddingLeft="2dp"
android:paddingRight="6dp"
android:paddingStart="2dp" />
android:paddingEnd="6dp"
android:paddingRight="6dp" />

</LinearLayout>
4 changes: 2 additions & 2 deletions V2rayNG/app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
<string name="title_pref_socks_port">SOCKS5代理端口</string>
<string name="summary_pref_socks_port">SOCKS5代理端口</string>

<string name="title_pref_lanconn_port">HTTP代理端口(0=不允许)</string>
<string name="summary_pref_lanconn_port">HTTP代理端口</string>
<string name="title_pref_http_port">HTTP代理端口</string>
<string name="summary_pref_http_port">HTTP代理端口</string>

<string name="title_pref_feedback">反馈</string>
<string name="summary_pref_feedback">反馈改进或漏洞至 GitHub</string>
Expand Down
4 changes: 2 additions & 2 deletions V2rayNG/app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
<string name="title_pref_socks_port">SOCKS5代理端口</string>
<string name="summary_pref_socks_port">SOCKS5代理端口</string>

<string name="title_pref_lanconn_port">HTTP代理端口(0=不允許)</string>
<string name="summary_pref_lanconn_port">HTTP代理端口</string>
<string name="title_pref_http_port">HTTP代理端口</string>
<string name="summary_pref_http_port">HTTP代理端口</string>


<string name="title_pref_feedback">回饋</string>
Expand Down
4 changes: 2 additions & 2 deletions V2rayNG/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
<string name="title_pref_socks_port">SOCKS5 proxy port</string>
<string name="summary_pref_socks_port">SOCKS5 proxy port</string>

<string name="title_pref_lanconn_port">HTTP proxy port(0=not allowed)</string>
<string name="summary_pref_lanconn_port">HTTP proxy port</string>
<string name="title_pref_http_port">HTTP proxy port</string>
<string name="summary_pref_http_port">HTTP proxy port</string>

<string name="title_pref_feedback">Feedback</string>
<string name="summary_pref_feedback">Feedback enhancements or bugs to GitHub</string>
Expand Down
75 changes: 32 additions & 43 deletions V2rayNG/app/src/main/res/xml/pref_settings.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/title_settings">
<!--<CheckBoxPreference-->
<!--android:key="pref_bypass_mainland"-->
<!--android:summary="@string/summary_pref_bypass_mainland"-->
<!--android:title="@string/title_pref_bypass_mainland" />-->
<CheckBoxPreference
android:key="pref_per_app_proxy"
android:summary="@string/summary_pref_per_app_proxy"
Expand All @@ -28,6 +24,29 @@

</PreferenceCategory>

<PreferenceCategory android:title="@string/title_pref_routing">
<ListPreference
android:defaultValue="IPIfNonMatch"
android:entries="@array/routing_domain_strategy"
android:entryValues="@array/routing_domain_strategy"
android:key="pref_routing_domain_strategy"
android:summary="%s"
android:title="@string/title_pref_routing_domain_strategy" />

<ListPreference
android:defaultValue="0"
android:entries="@array/routing_mode"
android:entryValues="@array/routing_mode_value"
android:key="pref_routing_mode"
android:summary="%s"
android:title="@string/title_pref_routing_mode" />

<Preference
android:key="pref_routing_custom"
android:summary="@string/title_pref_routing_custom"
android:title="@string/title_pref_routing_custom" />
</PreferenceCategory>

<PreferenceCategory android:title="@string/title_advanced">

<CheckBoxPreference
Expand All @@ -50,53 +69,23 @@
android:summary="@string/summary_pref_remote_dns"
android:title="@string/title_pref_remote_dns" />


<!--<EditTextPreference-->
<!--android:enabled="false"-->
<!--android:defaultValue="10808"-->
<!--android:key="pref_socks_port"-->
<!--android:summary="@string/summary_pref_socks_port"-->
<!--android:title="@string/title_pref_socks_port" />-->

<!--<EditTextPreference-->
<!--android:defaultValue="0"-->
<!--android:key="pref_lanconn_port"-->
<!--android:summary="@string/summary_pref_lanconn_port"-->
<!--android:title="@string/title_pref_lanconn_port" />-->


</PreferenceCategory>

<PreferenceCategory android:title="@string/title_pref_routing">
<ListPreference
android:defaultValue="IPIfNonMatch"
android:entries="@array/routing_domain_strategy"
android:entryValues="@array/routing_domain_strategy"
android:key="pref_routing_domain_strategy"
android:summary="%s"
android:title="@string/title_pref_routing_domain_strategy" />

<ListPreference
android:defaultValue="0"
android:entries="@array/routing_mode"
android:entryValues="@array/routing_mode_value"
android:key="pref_routing_mode"
android:summary="%s"
android:title="@string/title_pref_routing_mode" />
<Preference
android:key="pref_socks_port"
android:summary="10808"
android:title="@string/title_pref_socks_port" />

<Preference
android:key="pref_routing_custom"
android:summary="@string/title_pref_routing_custom"
android:title="@string/title_pref_routing_custom" />
android:key="pref_http_port"
android:summary="10809"
android:title="@string/title_pref_http_port" />
</PreferenceCategory>

<PreferenceCategory android:title="@string/title_about">
<!--<Preference-->
<!--android:key="pref_donate"-->
<!--android:summary="@string/summary_pref_donate"-->
<!--android:title="@string/title_pref_donate" />-->

</PreferenceCategory>

<PreferenceCategory android:title="@string/title_about">
<!--<Preference-->
<!--android:key="pref_licenses"-->
<!--android:title="@string/notices_title" />-->
Expand Down
4 changes: 2 additions & 2 deletions V2rayNG/dpreference/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 28
buildToolsVersion '28.0.3'

defaultConfig {
minSdkVersion 17
Expand Down
10 changes: 5 additions & 5 deletions V2rayNG/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# org.gradle.parallel=true
#Fri Jun 02 14:08:42 CST 2017
ankoVersion=0.10.8
kotlinVersion=1.3.10
supportLibVersion=27.1.1
buildToolsVer=27.0.3
compileSdkVer=27
kotlinVersion=1.3.40
supportLibVersion=28.0.0
buildToolsVer=28.0.3
compileSdkVer=28
kotlin.incremental=true
targetSdkVer=27
targetSdkVer=28

0 comments on commit 879e25b

Please sign in to comment.