mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-07-21 22:20:34 +02:00
[android] add gradle wrapper, update buildtools version, fixes in code.
This commit is contained in:
parent
fc84d6c4b7
commit
642435486c
11 changed files with 104 additions and 17 deletions
|
@ -6,14 +6,12 @@ import android.util.Log;
|
|||
import org.purplei2p.i2pd.R;
|
||||
|
||||
public class DaemonSingleton {
|
||||
private static final String TAG="i2pd";
|
||||
private static final String TAG = "i2pd";
|
||||
private static final DaemonSingleton instance = new DaemonSingleton();
|
||||
public interface StateUpdateListener { void daemonStateUpdate(); }
|
||||
private final Set<StateUpdateListener> stateUpdateListeners = new HashSet<>();
|
||||
|
||||
public static DaemonSingleton getInstance() {
|
||||
return instance;
|
||||
}
|
||||
public static DaemonSingleton getInstance() { return instance; }
|
||||
|
||||
public synchronized void addStateChangeListener(StateUpdateListener listener) { stateUpdateListeners.add(listener); }
|
||||
public synchronized void removeStateChangeListener(StateUpdateListener listener) { stateUpdateListeners.remove(listener); }
|
||||
|
@ -91,7 +89,6 @@ public class DaemonSingleton {
|
|||
} catch (Throwable tr) {
|
||||
lastThrowable=tr;
|
||||
setState(State.startFailed);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.purplei2p.i2pd;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
|
|
|
@ -119,11 +119,10 @@ public class I2PDPermsAskerActivity extends Activity {
|
|||
|
||||
// permission denied, boo! Disable the
|
||||
// functionality that depends on this permission.
|
||||
textview_retry.setText("SD card write permission denied, you need to allow this to continue");
|
||||
textview_retry.setText(R.string.permDenied);
|
||||
textview_retry.setVisibility(TextView.VISIBLE);
|
||||
button_request_write_ext_storage_perms.setVisibility(Button.VISIBLE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// other 'case' lines to check for other
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue