summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/android/AddActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/com/wireguard/android/AddActivity.java')
-rw-r--r--app/src/main/java/com/wireguard/android/AddActivity.java46
1 files changed, 0 insertions, 46 deletions
diff --git a/app/src/main/java/com/wireguard/android/AddActivity.java b/app/src/main/java/com/wireguard/android/AddActivity.java
deleted file mode 100644
index 5b57e634..00000000
--- a/app/src/main/java/com/wireguard/android/AddActivity.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.wireguard.android;
-
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
-import android.os.Bundle;
-
-import com.wireguard.config.Config;
-
-/**
- * Standalone activity for creating configurations.
- */
-
-public class AddActivity extends BaseConfigActivity {
- @Override
- public void onCreate(final Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.add_activity);
- }
-
- @Override
- protected void onCurrentConfigChanged(final Config oldConfig, final Config newConfig) {
- // Do nothing (this never happens).
- }
-
- @Override
- protected void onEditingStateChanged(final boolean isEditing) {
- // Go back to the main activity once the new configuration is created.
- if (!isEditing)
- finish();
- }
-
- @Override
- protected void onServiceAvailable() {
- super.onServiceAvailable();
- final FragmentManager fm = getFragmentManager();
- ConfigEditFragment fragment = (ConfigEditFragment) fm.findFragmentById(R.id.master_fragment);
- if (fragment == null) {
- fragment = new ConfigEditFragment();
- final FragmentTransaction transaction = fm.beginTransaction();
- transaction.add(R.id.master_fragment, fragment);
- transaction.commit();
- }
- // Prime the state for the fragment to tell us it is finished.
- setIsEditing(true);
- }
-}