summaryrefslogtreecommitdiffhomepage
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/AndroidManifest.xml3
-rw-r--r--app/src/main/java/com/wireguard/android/ProfileActivity.java1
-rw-r--r--app/src/main/java/com/wireguard/android/ProfileEditActivity.java19
-rw-r--r--app/src/main/java/com/wireguard/android/ProfileEditFragment.java8
-rw-r--r--app/src/main/res/values/strings.xml1
5 files changed, 32 insertions, 0 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2544e546..77dec36f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -16,6 +16,9 @@
android:name=".ProfileDetailActivity"
android:label=""
android:parentActivityName=".ProfileListActivity" />
+ <activity
+ android:name=".ProfileEditActivity"
+ android:label="@string/edit_activity_title" />
<activity android:name=".ProfileListActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/app/src/main/java/com/wireguard/android/ProfileActivity.java b/app/src/main/java/com/wireguard/android/ProfileActivity.java
index ea1836c1..d23256d6 100644
--- a/app/src/main/java/com/wireguard/android/ProfileActivity.java
+++ b/app/src/main/java/com/wireguard/android/ProfileActivity.java
@@ -13,6 +13,7 @@ abstract class ProfileActivity extends ServiceClientActivity<ProfileServiceInter
public static final String KEY_IS_EDITING = "is_editing";
public static final String KEY_PROFILE_NAME = "profile_name";
protected static final String TAG_DETAIL = "detail";
+ protected static final String TAG_EDIT = "edit";
protected static final String TAG_LIST = "list";
protected static final String TAG_PLACEHOLDER = "placeholder";
diff --git a/app/src/main/java/com/wireguard/android/ProfileEditActivity.java b/app/src/main/java/com/wireguard/android/ProfileEditActivity.java
new file mode 100644
index 00000000..01caf2c4
--- /dev/null
+++ b/app/src/main/java/com/wireguard/android/ProfileEditActivity.java
@@ -0,0 +1,19 @@
+package com.wireguard.android;
+
+import android.view.MenuItem;
+
+/**
+ * Activity that allows editing a single WireGuard profile.
+ */
+
+public class ProfileEditActivity extends ProfileActivity {
+ @Override
+ public void onMenuEdit(MenuItem item) {
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public void onMenuSave(MenuItem item) {
+
+ }
+}
diff --git a/app/src/main/java/com/wireguard/android/ProfileEditFragment.java b/app/src/main/java/com/wireguard/android/ProfileEditFragment.java
new file mode 100644
index 00000000..b2a7168b
--- /dev/null
+++ b/app/src/main/java/com/wireguard/android/ProfileEditFragment.java
@@ -0,0 +1,8 @@
+package com.wireguard.android;
+
+/**
+ * Fragment for editing a WireGuard profile.
+ */
+
+public class ProfileEditFragment extends ProfileFragment {
+}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 872f9761..32543006 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -4,6 +4,7 @@
<string name="connected">Connected</string>
<string name="disconnected">Disconnected</string>
<string name="edit">Edit</string>
+ <string name="edit_activity_title">Edit WireGuard Profile</string>
<string name="placeholder_text">No profile selected</string>
<string name="profile_name">Profile name</string>
<string name="public_key">Public key</string>