summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/build.gradle.kts4
m---------main/src/main/cpp/openvpn0
m---------main/src/main/cpp/openvpn30
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/activities/MainActivity.java28
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/ImportASConfig.kt6
5 files changed, 17 insertions, 21 deletions
diff --git a/main/build.gradle.kts b/main/build.gradle.kts
index a7b9b509..39a7498c 100644
--- a/main/build.gradle.kts
+++ b/main/build.gradle.kts
@@ -16,8 +16,8 @@ android {
defaultConfig {
minSdkVersion(14)
targetSdkVersion(29) //'Q'.toInt()
- versionCode = 165
- versionName = "0.7.12"
+ versionCode = 166
+ versionName = "0.7.13"
externalNativeBuild {
cmake {
diff --git a/main/src/main/cpp/openvpn b/main/src/main/cpp/openvpn
-Subproject 6dc456e67aa57328d42d343044fb9dc27249888
+Subproject ec686d6ae1091ef22d65260004869f0754335f7
diff --git a/main/src/main/cpp/openvpn3 b/main/src/main/cpp/openvpn3
-Subproject 13c1f01a17a1fe4df172726166853cbdd55354c
+Subproject 9291e0232a14927e0312ba20e267ad8600a185f
diff --git a/main/src/ui/java/de/blinkt/openvpn/activities/MainActivity.java b/main/src/ui/java/de/blinkt/openvpn/activities/MainActivity.java
index 2a6a0fff..fa6c4159 100644
--- a/main/src/ui/java/de/blinkt/openvpn/activities/MainActivity.java
+++ b/main/src/ui/java/de/blinkt/openvpn/activities/MainActivity.java
@@ -27,9 +27,11 @@ import de.blinkt.openvpn.views.ScreenSlidePagerAdapter;
public class MainActivity extends BaseActivity {
+ private static final String FEATURE_TELEVISION = "android.hardware.type.television";
+ private static final String FEATURE_LEANBACK = "android.software.leanback";
+ //private TabLayout mTabs;
private ViewPager mPager;
private ScreenSlidePagerAdapter mPagerAdapter;
- //private TabLayout mTabs;
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -42,9 +44,7 @@ public class MainActivity extends BaseActivity {
mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager(), this);
/* Toolbar and slider should have the same elevation */
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- disableToolbarElevation();
- }
+ disableToolbarElevation();
mPagerAdapter.addTab(R.string.vpn_list_title, VPNProfileList.class);
@@ -68,11 +68,8 @@ public class MainActivity extends BaseActivity {
//mTabs.setViewPager(mPager);
}
- private static final String FEATURE_TELEVISION = "android.hardware.type.television";
- private static final String FEATURE_LEANBACK = "android.software.leanback";
-
private boolean isDirectToTV() {
- return(getPackageManager().hasSystemFeature(FEATURE_TELEVISION)
+ return (getPackageManager().hasSystemFeature(FEATURE_TELEVISION)
|| getPackageManager().hasSystemFeature(FEATURE_LEANBACK));
}
@@ -85,7 +82,7 @@ public class MainActivity extends BaseActivity {
@Override
protected void onResume() {
super.onResume();
- if (getIntent()!=null) {
+ if (getIntent() != null) {
String page = getIntent().getStringExtra("PAGE");
if ("graph".equals(page)) {
mPager.setCurrentItem(1);
@@ -96,13 +93,13 @@ public class MainActivity extends BaseActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
- getMenuInflater().inflate(R.menu.main_menu,menu);
+ getMenuInflater().inflate(R.menu.main_menu, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
- if (item.getItemId()==R.id.show_log){
+ if (item.getItemId() == R.id.show_log) {
Intent showLog = new Intent(this, LogWindow.class);
startActivity(showLog);
}
@@ -110,14 +107,13 @@ public class MainActivity extends BaseActivity {
}
@Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
- System.out.println(data);
+ System.out.println(data);
- }
-
+ }
}
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/ImportASConfig.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/ImportASConfig.kt
index 60c79f87..ee912897 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/ImportASConfig.kt
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/ImportASConfig.kt
@@ -266,7 +266,7 @@ class ImportASConfig : DialogFragment() {
if (response.code() == 401 && crvMessage.matcher(profile).matches()) {
requireContext().runOnUiThread {
pleaseWait?.dismiss()
- showCRDialog(profile, asProfileUri)
+ showCRDialog(profile)
}
} else if (response.isSuccessful) {
@@ -342,12 +342,12 @@ class ImportASConfig : DialogFragment() {
}
}
- private fun showCRDialog(response: String, asProfileUri: HttpUrl) {
+ private fun showCRDialog(response: String) {
// This is a dirty hack instead of properly parsing the response
val m = crvMessage.matcher(response)
// We already know that it matches
m.matches()
- var challenge = m.group(1)
+ val challenge = m.group(1)
var username = m.group(2)
val message = m.group(3)