aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/AndroidManifest.xml27
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/configure/ConfigurationAccessServerFragment.kt77
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/configure/ToolsFragment.kt4
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/configure/tools/GenerateConfigToolDialogFragment.kt7
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/configure/tools/JoinNetworkToolDialogFragment.kt5
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/start/ErrorNotificationFragment.kt60
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/start/StartActivity.kt9
-rw-r--r--app/src/main/java/org/pacien/tincapp/context/App.kt2
-rw-r--r--app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt97
-rw-r--r--app/src/main/java/org/pacien/tincapp/context/AppPaths.kt15
-rw-r--r--app/src/main/java/org/pacien/tincapp/context/StorageMigrator.kt (renamed from app/src/main/java/org/pacien/tincapp/context/ConfigurationDirectoryMigrator.kt)17
-rw-r--r--app/src/main/java/org/pacien/tincapp/service/ConfigurationAccessService.kt204
-rw-r--r--app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt5
-rw-r--r--app/src/main/java/org/pacien/tincapp/utils/Files.kt47
-rw-r--r--app/src/main/java/org/pacien/tincapp/utils/PendingIntentUtils.kt35
-rw-r--r--app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt8
-rw-r--r--app/src/main/play/listings/en-US/full-description.txt2
-rw-r--r--app/src/main/res/layout/configure_activity.xml14
-rw-r--r--app/src/main/res/layout/configure_tools_configuration_access_fragment.xml86
-rw-r--r--app/src/main/res/layout/start_activity.xml29
-rw-r--r--app/src/main/res/layout/start_error_notification.xml69
-rw-r--r--app/src/main/res/layout/start_network_list.xml2
-rw-r--r--app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml1
-rw-r--r--app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml1
-rw-r--r--app/src/main/res/values-nb-rNO/strings.xml4
-rw-r--r--app/src/main/res/values-ru-rRU/strings.xml142
-rw-r--r--app/src/main/res/values-zh-rCN/strings.xml4
-rw-r--r--app/src/main/res/values-zh-rHK/strings.xml4
-rw-r--r--app/src/main/res/values-zh-rTW/strings.xml4
-rw-r--r--app/src/main/res/values/colors.xml3
-rw-r--r--app/src/main/res/values/strings.xml15
-rw-r--r--app/src/main/res/values/styles.xml6
-rw-r--r--app/src/main/res/xml/backup_rules.xml39
-rw-r--r--app/src/main/res/xml/data_extraction_rules.xml41
34 files changed, 571 insertions, 514 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c98555f..a1183d5 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -2,7 +2,7 @@
2 2
3<!-- 3<!--
4 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon 4 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon
5 * Copyright (C) 2017-2020 Pacien TRAN-GIRARD 5 * Copyright (C) 2017-2023 Pacien TRAN-GIRARD
6 * 6 *
7 * This program is free software: you can redistribute it and/or modify 7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,25 +19,24 @@
19--> 19-->
20 20
21<manifest xmlns:android="http://schemas.android.com/apk/res/android" 21<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22 xmlns:tools="http://schemas.android.com/tools" 22 xmlns:tools="http://schemas.android.com/tools">
23 package="org.pacien.tincapp">
24 23
25 <uses-permission android:name="android.permission.INTERNET" /> 24 <uses-permission android:name="android.permission.INTERNET" />
26 25
27 <!-- needed for the configuration FTP server -->
28 <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
29
30 <!-- workaround for broken file permissions on some Android ROMs --> 26 <!-- workaround for broken file permissions on some Android ROMs -->
31 <uses-permission-sdk-23 android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 27 <uses-permission-sdk-23 android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
32 28
33 <application 29 <application
34 android:name="org.pacien.tincapp.context.App" 30 android:name="org.pacien.tincapp.context.App"
35 android:allowBackup="false" 31 android:allowBackup="true"
32 android:dataExtractionRules="@xml/data_extraction_rules"
33 android:fullBackupContent="@xml/backup_rules"
36 android:icon="@mipmap/ic_launcher" 34 android:icon="@mipmap/ic_launcher"
37 android:label="@string/app_name" 35 android:label="@string/app_name"
38 android:supportsRtl="true" 36 android:supportsRtl="true"
39 android:theme="@style/AppTheme" 37 android:theme="@style/AppTheme"
40 tools:ignore="GoogleAppIndexingWarning"> 38 tools:ignore="GoogleAppIndexingWarning"
39 tools:targetApi="s">
41 40
42 <uses-library 41 <uses-library
43 android:name="org.apache.http.legacy" 42 android:name="org.apache.http.legacy"
@@ -46,7 +45,7 @@
46 <activity 45 <activity
47 android:name=".activities.start.StartActivity" 46 android:name=".activities.start.StartActivity"
48 android:configChanges="orientation|screenSize" 47 android:configChanges="orientation|screenSize"
49 android:label="@string/app_name"> 48 android:exported="true">
50 <intent-filter> 49 <intent-filter>
51 <action android:name="android.intent.action.MAIN" /> 50 <action android:name="android.intent.action.MAIN" />
52 <category android:name="android.intent.category.LAUNCHER" /> 51 <category android:name="android.intent.category.LAUNCHER" />
@@ -65,7 +64,8 @@
65 64
66 <activity 65 <activity
67 android:name=".activities.status.StatusActivity" 66 android:name=".activities.status.StatusActivity"
68 android:configChanges="orientation|screenSize"> 67 android:configChanges="orientation|screenSize"
68 android:exported="true">
69 <intent-filter> 69 <intent-filter>
70 <action android:name="org.pacien.tincapp.intent.action.DISCONNECT" /> 70 <action android:name="org.pacien.tincapp.intent.action.DISCONNECT" />
71 <category android:name="android.intent.category.DEFAULT" /> 71 <category android:name="android.intent.category.DEFAULT" />
@@ -78,16 +78,13 @@
78 78
79 <service 79 <service
80 android:name="org.pacien.tincapp.service.TincVpnService" 80 android:name="org.pacien.tincapp.service.TincVpnService"
81 android:permission="android.permission.BIND_VPN_SERVICE"> 81 android:permission="android.permission.BIND_VPN_SERVICE"
82 android:exported="true">
82 <intent-filter> 83 <intent-filter>
83 <action android:name="android.net.VpnService" /> 84 <action android:name="android.net.VpnService" />
84 </intent-filter> 85 </intent-filter>
85 </service> 86 </service>
86 87
87 <service
88 android:name="org.pacien.tincapp.service.ConfigurationAccessService">
89 </service>
90
91 </application> 88 </application>
92 89
93</manifest> 90</manifest>
diff --git a/app/src/main/java/org/pacien/tincapp/activities/configure/ConfigurationAccessServerFragment.kt b/app/src/main/java/org/pacien/tincapp/activities/configure/ConfigurationAccessServerFragment.kt
deleted file mode 100644
index c90299a..0000000
--- a/app/src/main/java/org/pacien/tincapp/activities/configure/ConfigurationAccessServerFragment.kt
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon
3 * Copyright (C) 2017-2020 Pacien TRAN-GIRARD
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19package org.pacien.tincapp.activities.configure
20
21import android.content.Intent
22import android.os.Bundle
23import android.view.LayoutInflater
24import android.view.View
25import android.view.ViewGroup
26import androidx.databinding.Observable
27import androidx.databinding.ObservableBoolean
28import org.pacien.tincapp.activities.BaseFragment
29import org.pacien.tincapp.databinding.ConfigureToolsConfigurationAccessFragmentBinding
30import org.pacien.tincapp.service.ConfigurationAccessService
31
32/**
33 * @author pacien
34 */
35class ConfigurationAccessServerFragment : BaseFragment() {
36 private val ftpServerStartListener = object : Observable.OnPropertyChangedCallback() {
37 override fun onPropertyChanged(sender: Observable, propertyId: Int) {
38 binding.ftpEnabled = (sender as ObservableBoolean).get()
39 }
40 }
41
42 private lateinit var binding: ConfigureToolsConfigurationAccessFragmentBinding
43
44 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
45 binding = ConfigureToolsConfigurationAccessFragmentBinding.inflate(inflater, container, false)
46 binding.toggleFtpState = { toggleServer() }
47 setConnectionInfo()
48 return binding.root
49 }
50
51 override fun onResume() {
52 super.onResume()
53 setConnectionInfo()
54 ConfigurationAccessService.runningState.addOnPropertyChangedCallback(ftpServerStartListener)
55 binding.ftpEnabled = ConfigurationAccessService.runningState.get()
56 }
57
58 override fun onPause() {