summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2020-07-31 14:29:18 +0200
committerArne Schwabe <arne@rfc2549.org>2020-07-31 14:29:44 +0200
commit24d7baeaa6af96094ac630cae08a7dc0ff772d1c (patch)
tree6c43940bac1dd7d575d4cb0c25b559ee86de3fee
parent45d134dce29488ca43222ea2b86ba9ebbe1dbb75 (diff)
Move UI activities to ui manifest
-rw-r--r--main/src/main/AndroidManifest.xml136
-rw-r--r--main/src/ui/AndroidManifest.xml126
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/activities/CredentialsPopup.kt2
3 files changed, 127 insertions, 137 deletions
diff --git a/main/src/main/AndroidManifest.xml b/main/src/main/AndroidManifest.xml
index 78b45ef2..14b6f5cc 100644
--- a/main/src/main/AndroidManifest.xml
+++ b/main/src/main/AndroidManifest.xml
@@ -19,31 +19,18 @@
android:supportsRtl="true"
android:theme="@style/blinkt"
tools:ignore="UnusedAttribute">
- <activity
- android:name=".core.CredentialsPopup"
- android:theme="@style/blinkt.dialog" />
-
<meta-data
android:name="android.content.APP_RESTRICTIONS"
android:resource="@xml/app_restrictions" />
<activity
- android:name=".activities.VPNPreferences"
- android:exported="false"
- android:windowSoftInputMode="stateHidden" />
- <activity
android:name=".activities.DisconnectVPN"
android:autoRemoveFromRecents="true"
android:excludeFromRecents="true"
android:noHistory="true"
android:taskAffinity=".DisconnectVPN"
android:theme="@style/blinkt.dialog" />
- <activity
- android:name=".activities.LogWindow"
- android:allowTaskReparenting="true"
- android:label="@string/openvpn_log"
- android:launchMode="singleTask" />
- <activity android:name=".activities.FileSelect" />
+
<service
@@ -66,20 +53,6 @@
android:name=".core.OpenVPNStatusService"
android:exported="false"
android:process=":openvpn" />
- <service
- android:name=".OpenVPNTileService"
- android:icon="@drawable/ic_quick"
- android:label="@string/qs_title"
- android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
- android:value="true">
- <intent-filter>
- <action android:name="android.service.quicksettings.action.QS_TILE" />
- </intent-filter>
-
- <meta-data
- android:name="android.service.quicksettings.ACTIVE_TILE"
- android:value="false" />
- </service>
<activity android:name=".api.GrantPermissionsActivity">
<intent-filter>
@@ -99,71 +72,6 @@
</intent-filter>
</receiver>
- <activity
- android:name=".activities.ConfigConverter"
- android:excludeFromRecents="true"
- android:label="Convert Config File"
- android:taskAffinity=".ConfigConverter"
- android:uiOptions="splitActionBarWhenNarrow"
- tools:ignore="ExportedActivity">
- <intent-filter
- android:label="@string/import_config"
- tools:ignore="AppLinkUrlError">
- <action android:name="android.intent.action.VIEW" />
-
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
-
- <data android:mimeType="application/x-openvpn-profile" />
- </intent-filter>
- <intent-filter
- android:label="@string/import_config"
- tools:ignore="AppLinkUrlError">
- <action android:name="android.intent.action.VIEW" />
-
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
-
- <data android:mimeType="application/ovpn" />
- </intent-filter>
- <intent-filter android:label="@string/import_config">
-
- <!-- http://stackoverflow.com/questions/7f030832/associating-certain-file-extension-to-my-android-application/7102838#7102838 -->
- <action android:name="android.intent.action.VIEW" />
-
- <category android:name="android.intent.category.BROWSABLE" />
- <category android:name="android.intent.category.DEFAULT" />
-
- <data android:mimeType="*/*" />
- <data android:scheme="content" />
- <data android:host="*" />
- <data android:pathPattern=".*..*..*..*..*.ovpn" />
- <data android:pathPattern=".*..*..*..*.ovpn" />
- <data android:pathPattern=".*..*..*.ovpn" />
- <data android:pathPattern=".*..*.ovpn" />
- <data android:pathPattern=".*.ovpn" />
- </intent-filter>
- </activity> <!-- https://commonsware.com/blog/2019/03/27/death-external-storage-stay-away-files.html -->
- <activity-alias
- android:name=".activities.ConfigConverterFile"
- android:enabled="@bool/supportFileScheme"
- android:targetActivity=".activities.ConfigConverter">
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
-
- <category android:name="android.intent.category.BROWSABLE" />
- <category android:name="android.intent.category.DEFAULT" />
-
- <data android:mimeType="*/*" />
- <data android:scheme="file" />
- <data android:host="*" />
- <data android:pathPattern=".*..*..*..*..*.ovpn" />
- <data android:pathPattern=".*..*..*..*.ovpn" />
- <data android:pathPattern=".*..*..*.ovpn" />
- <data android:pathPattern=".*..*.ovpn" />
- <data android:pathPattern=".*.ovpn" />
- </intent-filter>
- </activity-alias>
<activity
android:name=".LaunchVPN"
@@ -179,39 +87,6 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
- <activity
- android:name=".api.Intents"
- android:autoRemoveFromRecents="true"
- android:excludeFromRecents="true"
- android:label="@string/vpn_launch_title"
- android:taskAffinity=".LaunchVPN"
- android:theme="@style/blinkt.dialog"
- tools:ignore="ExportedActivity">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
- <activity
- android:name=".activities.CreateShortcuts"
- android:excludeFromRecents="true"
- android:label="@string/vpn_shortcut"
- android:taskAffinity=".CreateShortcuts"
- android:theme="@android:style/Theme.DeviceDefault.Light.DialogWhenLarge">
- <intent-filter>
- <action android:name="android.intent.action.CREATE_SHORTCUT" />
-
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
-
- <provider
- android:name=".FileProvider"
- android:authorities="de.blinkt.openvpn.FileProvider"
- android:exported="true"
- android:grantUriPermissions="true"
- tools:ignore="ExportedContentProvider" />
<!--
<receiver android:name="core.GetRestrictionReceiver">
<intent-filter>
@@ -219,16 +94,7 @@
</intent-filter>
</receiver>
-->
- <activity
- android:name=".activities.OpenSSLSpeed"
- android:label="@string/title_activity_open_sslspeed"
- android:parentActivityName=".activities.MainActivity">
- <meta-data
- android:name="android.support.PARENT_ACTIVITY"
- android:value="de.blinkt.openvpn.activities.MainActivity" />
- </activity>
<activity android:name=".api.RemoteAction" />
- <activity android:name=".activities.MainActivity" />
<activity-alias
android:name=".api.ConnectVPN"
diff --git a/main/src/ui/AndroidManifest.xml b/main/src/ui/AndroidManifest.xml
index 86aa2956..e2037b56 100644
--- a/main/src/ui/AndroidManifest.xml
+++ b/main/src/ui/AndroidManifest.xml
@@ -32,5 +32,131 @@
</intent-filter>
</activity>
<activity android:name=".activities.InternalWebView" />
+ <activity
+ android:name=".activities.CredentialsPopup"
+ android:theme="@style/blinkt.dialog" />
+
+
+ <activity
+ android:name=".activities.LogWindow"
+ android:allowTaskReparenting="true"
+ android:label="@string/openvpn_log"
+ android:launchMode="singleTask" />
+
+ <activity
+ android:name=".activities.VPNPreferences"
+ android:exported="false"
+ android:windowSoftInputMode="stateHidden" />
+
+ <activity android:name=".activities.FileSelect" />
+ <service
+ android:name=".OpenVPNTileService"
+ android:icon="@drawable/ic_quick"
+ android:label="@string/qs_title"
+ android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
+ android:value="true">
+ <intent-filter>
+ <action android:name="android.service.quicksettings.action.QS_TILE" />
+ </intent-filter>
+
+ <meta-data
+ android:name="android.service.quicksettings.ACTIVE_TILE"
+ android:value="false" />
+ </service>
+ <activity
+ android:name=".activities.ConfigConverter"
+ android:excludeFromRecents="true"
+ android:label="Convert Config File"
+ android:taskAffinity=".ConfigConverter"
+ android:uiOptions="splitActionBarWhenNarrow"
+ tools:ignore="ExportedActivity">
+ <intent-filter
+ android:label="@string/import_config"
+ tools:ignore="AppLinkUrlError">
+ <action android:name="android.intent.action.VIEW" />
+
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.BROWSABLE" />
+
+ <data android:mimeType="application/x-openvpn-profile" />
+ </intent-filter>
+ <intent-filter
+ android:label="@string/import_config"
+ tools:ignore="AppLinkUrlError">
+ <action android:name="android.intent.action.VIEW" />
+
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.BROWSABLE" />
+
+ <data android:mimeType="application/ovpn" />
+ </intent-filter>
+ <intent-filter android:label="@string/import_config">
+
+ <!-- http://stackoverflow.com/questions/7f030832/associating-certain-file-extension-to-my-android-application/7102838#7102838 -->
+ <action android:name="android.intent.action.VIEW" />
+
+ <category android:name="android.intent.category.BROWSABLE" />
+ <category android:name="android.intent.category.DEFAULT" />
+
+ <data android:mimeType="*/*" />
+ <data android:scheme="content" />
+ <data android:host="*" />
+ <data android:pathPattern=".*..*..*..*..*.ovpn" />
+ <data android:pathPattern=".*..*..*..*.ovpn" />
+ <data android:pathPattern=".*..*..*.ovpn" />
+ <data android:pathPattern=".*..*.ovpn" />
+ <data android:pathPattern=".*.ovpn" />
+ </intent-filter>
+ </activity> <!-- https://commonsware.com/blog/2019/03/27/death-external-storage-stay-away-files.html -->
+ <activity-alias
+ android:name=".activities.ConfigConverterFile"
+ android:enabled="@bool/supportFileScheme"
+ android:targetActivity=".activities.ConfigConverter">
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+
+ <category android:name="android.intent.category.BROWSABLE" />
+ <category android:name="android.intent.category.DEFAULT" />
+
+ <data android:mimeType="*/*" />
+ <data android:scheme="file" />
+ <data android:host="*" />
+ <data android:pathPattern=".*..*..*..*..*.ovpn" />
+ <data android:pathPattern=".*..*..*..*.ovpn" />
+ <data android:pathPattern=".*..*..*.ovpn" />
+ <data android:pathPattern=".*..*.ovpn" />
+ <data android:pathPattern=".*.ovpn" />
+ </intent-filter>
+ </activity-alias>
+
+ <activity
+ android:name=".activities.CreateShortcuts"
+ android:excludeFromRecents="true"
+ android:label="@string/vpn_shortcut"
+ android:taskAffinity=".CreateShortcuts"
+ android:theme="@android:style/Theme.DeviceDefault.Light.DialogWhenLarge">
+ <intent-filter>
+ <action android:name="android.intent.action.CREATE_SHORTCUT" />
+
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".activities.OpenSSLSpeed"
+ android:label="@string/title_activity_open_sslspeed"
+ android:parentActivityName=".activities.MainActivity">
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="de.blinkt.openvpn.activities.MainActivity" />
+ </activity>
+
+
+ <provider
+ android:name=".FileProvider"
+ android:authorities="de.blinkt.openvpn.FileProvider"
+ android:exported="true"
+ android:grantUriPermissions="true"
+ tools:ignore="ExportedContentProvider" />
</application>
</manifest>
diff --git a/main/src/ui/java/de/blinkt/openvpn/activities/CredentialsPopup.kt b/main/src/ui/java/de/blinkt/openvpn/activities/CredentialsPopup.kt
index 6c59ca88..f5d836b9 100644
--- a/main/src/ui/java/de/blinkt/openvpn/activities/CredentialsPopup.kt
+++ b/main/src/ui/java/de/blinkt/openvpn/activities/CredentialsPopup.kt
@@ -5,11 +5,9 @@
package de.blinkt.openvpn.activities
import android.content.Intent
-import android.net.VpnService
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.DialogFragment
-import de.blinkt.openvpn.core.OpenVPNService
import de.blinkt.openvpn.core.PasswordDialogFragment.Companion.newInstance
class CredentialsPopup : AppCompatActivity() {