summaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-08-15 16:08:38 -0500
committerSamuel Holland <samuel@sholland.org>2017-08-15 16:08:38 -0500
commitcfcda8bd132b9dae5cf9e0efcb06f7dd5b5850ad (patch)
tree360ca4e1a51446c46c7ca35a05898344ba2a3c05 /app/src
parentd91770a1b620233b7e261bd1f56a53c520bdc969 (diff)
BaseConfigActivity: Move menu handling to ConfigActivity
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/wireguard/android/BaseConfigActivity.java7
-rw-r--r--app/src/main/java/com/wireguard/android/ConfigActivity.java7
2 files changed, 7 insertions, 7 deletions
diff --git a/app/src/main/java/com/wireguard/android/BaseConfigActivity.java b/app/src/main/java/com/wireguard/android/BaseConfigActivity.java
index 4a9c2434..8fa2a7f0 100644
--- a/app/src/main/java/com/wireguard/android/BaseConfigActivity.java
+++ b/app/src/main/java/com/wireguard/android/BaseConfigActivity.java
@@ -7,7 +7,6 @@ import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
-import android.view.Menu;
import com.wireguard.config.Config;
@@ -45,12 +44,6 @@ abstract class BaseConfigActivity extends Activity {
initialConfig = getIntent().getStringExtra(KEY_CURRENT_CONFIG);
}
- @Override
- public boolean onCreateOptionsMenu(final Menu menu) {
- getMenuInflater().inflate(R.menu.main, menu);
- return true;
- }
-
protected abstract void onCurrentConfigChanged(Config config);
@Override
diff --git a/app/src/main/java/com/wireguard/android/ConfigActivity.java b/app/src/main/java/com/wireguard/android/ConfigActivity.java
index 084f6c08..b3cde478 100644
--- a/app/src/main/java/com/wireguard/android/ConfigActivity.java
+++ b/app/src/main/java/com/wireguard/android/ConfigActivity.java
@@ -6,6 +6,7 @@ import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
+import android.view.Menu;
import android.view.MenuItem;
import com.wireguard.config.Config;
@@ -49,6 +50,12 @@ public class ConfigActivity extends BaseConfigActivity {
}
@Override
+ public boolean onCreateOptionsMenu(final Menu menu) {
+ getMenuInflater().inflate(R.menu.main, menu);
+ return true;
+ }
+
+ @Override
protected void onCurrentConfigChanged(final Config config) {
Log.d(getClass().getSimpleName(), "onCurrentConfigChanged config=" + (config != null ?
config.getName() : null) + " fragment=" + fm.findFragmentById(mainContainer) +