From 0c46dc9bd02679d69236314db0047f39f770bb61 Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Fri, 22 Aug 2014 11:27:11 +0000
Subject: [PATCH] Display auto-start setting in I2PTunnel details

---
 TODO                                                          | 2 --
 .../java/net/i2p/android/i2ptunnel/TunnelDetailFragment.java  | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/TODO b/TODO
index 62ca488b4..46a46b350 100644
--- a/TODO
+++ b/TODO
@@ -4,8 +4,6 @@
     <Meeh> If I goto settings->addressbook it crashes
     <str4d> I have an Intent specified in the settings XML
     <str4d> But I can't specify the package there, because the package depends on the flavor
-- Display auto-start setting correctly in I2PTunnel
-    <zzz> shared clients tunnel is starting. Can't remember if i had it enabled before. But I go to i2ptunnel config page, and all the auto start boxes are unchecked
 - Better addressbook column widths
     <zzz> on the i2ptunnel and addressbook pages on the tablet, the columns are too skinny, they aren't as wide as the tab
     <zzz> only a few addressbook entries wrap but on i2ptunnel everything is wrapped and most of the screen is empty
diff --git a/app/src/main/java/net/i2p/android/i2ptunnel/TunnelDetailFragment.java b/app/src/main/java/net/i2p/android/i2ptunnel/TunnelDetailFragment.java
index 8350396ef..6d51f3054 100644
--- a/app/src/main/java/net/i2p/android/i2ptunnel/TunnelDetailFragment.java
+++ b/app/src/main/java/net/i2p/android/i2ptunnel/TunnelDetailFragment.java
@@ -18,6 +18,7 @@ import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.CheckBox;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -100,6 +101,9 @@ public class TunnelDetailFragment extends Fragment {
 
             TextView accessIfacePort = (TextView) v.findViewById(R.id.tunnel_access_interface_port);
             accessIfacePort.setText(mTunnel.getIfacePort());
+
+            CheckBox autoStart = (CheckBox) v.findViewById(R.id.tunnel_autostart);
+            autoStart.setChecked(mTunnel.startAutomatically());
         }
 
         return v;
-- 
GitLab