mirror of
https://github.com/PurpleI2P/i2pd-android.git
synced 2024-12-06 19:27:28 +01:00
remove unused settings activity code, fix calling on 4.4
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
@@ -152,7 +152,7 @@ public class DaemonWrapper {
|
||||
|
||||
public void changeDataDir(String dataDir, Boolean updateAssets) {
|
||||
I2PD_JNI.setDataDir(dataDir);
|
||||
if( updateAssets ) processAssets();
|
||||
if (updateAssets) processAssets();
|
||||
//ToDo: move old dir to new dir?
|
||||
}
|
||||
|
||||
|
||||
@@ -325,10 +325,10 @@ public class I2PDActivity extends Activity {
|
||||
|
||||
private void i2pdStop() {
|
||||
cancelGracefulStop0();
|
||||
Log.d(TAG, "stopping");
|
||||
textView.setText(getText(R.string.stopping));
|
||||
new Thread(() -> {
|
||||
Log.d(TAG, "stopping");
|
||||
try {
|
||||
textView.setText(getText(R.string.stopping));
|
||||
daemon.stopDaemon();
|
||||
} catch (Throwable tr) {
|
||||
Log.e(TAG, "", tr);
|
||||
|
||||
@@ -18,11 +18,10 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
import org.purplei2p.i2pd.iniedotr.IniEditor;
|
||||
//import org.purplei2p.i2pd.iniedotr.IniEditor;
|
||||
|
||||
public class SettingsActivity extends Activity {
|
||||
protected IniEditor iniedit = new IniEditor();
|
||||
private String dataDir = DaemonWrapper.getDataDir();//for inieditor
|
||||
//protected IniEditor iniedit = new IniEditor();
|
||||
private String TAG = "i2pdSrvcSettings";
|
||||
private File cacheDir;
|
||||
public static String onBootFileName="/onBoot"; // just file, empty, if exist the do autostart, if not then no.
|
||||
@@ -74,8 +73,6 @@ public class SettingsActivity extends Activity {
|
||||
Uri.parse("package:" + getPackageName())
|
||||
);
|
||||
startActivityForResult(intent, 232);
|
||||
} else {
|
||||
//Permission Granted-System will work
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,6 +95,7 @@ public class SettingsActivity extends Activity {
|
||||
if (!onBoot.exists()) {
|
||||
requestPermission();
|
||||
addAutoStartupSwitch();
|
||||
|
||||
try {
|
||||
if (!onBoot.createNewFile())
|
||||
Log.d(TAG, "Cant create new wile on: "+onBoot.getAbsolutePath());
|
||||
|
||||
Reference in New Issue
Block a user