Formatting
This commit is contained in:
@@ -1,19 +1,5 @@
|
|||||||
package i2p.bote.android.config;
|
package i2p.bote.android.config;
|
||||||
|
|
||||||
import i2p.bote.Configuration;
|
|
||||||
import i2p.bote.I2PBote;
|
|
||||||
import i2p.bote.android.InitActivities;
|
|
||||||
import i2p.bote.android.R;
|
|
||||||
import i2p.bote.android.widget.SummaryEditTextPreference;
|
|
||||||
import i2p.bote.email.EmailIdentity;
|
|
||||||
import i2p.bote.fileencryption.PasswordException;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.security.GeneralSecurityException;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -39,6 +25,20 @@ import android.widget.ArrayAdapter;
|
|||||||
import android.widget.ListAdapter;
|
import android.widget.ListAdapter;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.security.GeneralSecurityException;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import i2p.bote.Configuration;
|
||||||
|
import i2p.bote.I2PBote;
|
||||||
|
import i2p.bote.android.InitActivities;
|
||||||
|
import i2p.bote.android.R;
|
||||||
|
import i2p.bote.android.widget.SummaryEditTextPreference;
|
||||||
|
import i2p.bote.email.EmailIdentity;
|
||||||
|
import i2p.bote.fileencryption.PasswordException;
|
||||||
|
|
||||||
public class SettingsActivity extends PreferenceActivity {
|
public class SettingsActivity extends PreferenceActivity {
|
||||||
// Actions for legacy settings
|
// Actions for legacy settings
|
||||||
private static final String ACTION_PREFS_GENERAL = "i2p.bote.PREFS_GENERAL";
|
private static final String ACTION_PREFS_GENERAL = "i2p.bote.PREFS_GENERAL";
|
||||||
@@ -251,8 +251,8 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final PreferenceCategory i2pCat = (PreferenceCategory)findPreference("i2pCategory");
|
final PreferenceCategory i2pCat = (PreferenceCategory) findPreference("i2pCategory");
|
||||||
CheckBoxPreference routerAuto = (CheckBoxPreference)findPreference("i2pbote.router.auto");
|
CheckBoxPreference routerAuto = (CheckBoxPreference) findPreference("i2pbote.router.auto");
|
||||||
|
|
||||||
if (!routerAuto.isChecked()) {
|
if (!routerAuto.isChecked()) {
|
||||||
setupI2PCategory(this, i2pCat);
|
setupI2PCategory(this, i2pCat);
|
||||||
@@ -304,8 +304,8 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final PreferenceCategory i2pCat = (PreferenceCategory)findPreference("i2pCategory");
|
final PreferenceCategory i2pCat = (PreferenceCategory) findPreference("i2pCategory");
|
||||||
CheckBoxPreference routerAuto = (CheckBoxPreference)findPreference("i2pbote.router.auto");
|
CheckBoxPreference routerAuto = (CheckBoxPreference) findPreference("i2pbote.router.auto");
|
||||||
|
|
||||||
if (!routerAuto.isChecked()) {
|
if (!routerAuto.isChecked()) {
|
||||||
setupI2PCategory(getActivity(), i2pCat);
|
setupI2PCategory(getActivity(), i2pCat);
|
||||||
@@ -451,13 +451,13 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
} catch (PasswordException e) {
|
} catch (PasswordException e) {
|
||||||
cancel(false);
|
cancel(false);
|
||||||
return new Object[] {e};
|
return new Object[]{e};
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
cancel(false);
|
cancel(false);
|
||||||
return new Object[] {e};
|
return new Object[]{e};
|
||||||
} catch (GeneralSecurityException e) {
|
} catch (GeneralSecurityException e) {
|
||||||
cancel(false);
|
cancel(false);
|
||||||
return new Object[] {e};
|
return new Object[]{e};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,7 +481,7 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
result[index++] = newHeader;
|
result[index++] = newHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Object[] {result};
|
return new Object[]{result};
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||||
@@ -508,7 +508,7 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
result[index++] = newHeader;
|
result[index++] = newHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Object[] {result};
|
return new Object[]{result};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -611,7 +611,7 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
public HeaderAdapter(Context context, ListAdapter adapter) {
|
public HeaderAdapter(Context context, ListAdapter adapter) {
|
||||||
super(context, 0);
|
super(context, 0);
|
||||||
mAdapter = adapter;
|
mAdapter = adapter;
|
||||||
mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user