mirror of
https://github.com/PurpleI2P/i2pd-android.git
synced 2024-12-06 19:27:28 +01:00
Main activity, replace drawables with SVGs
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
@@ -92,7 +92,7 @@ public class ForegroundService extends Service {
|
||||
public void onDestroy() {
|
||||
cancelNotification();
|
||||
deinitCheck();
|
||||
instance=null;
|
||||
instance = null;
|
||||
}
|
||||
|
||||
public static void deinit() {
|
||||
@@ -148,7 +148,7 @@ public class ForegroundService extends Service {
|
||||
// Set the info for the views that show in the notification panel.
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, channelId)
|
||||
.setOngoing(true)
|
||||
.setSmallIcon(R.drawable.itoopie_notification_icon); // the status icon
|
||||
.setSmallIcon(R.drawable.ic_notification_icon); // the status icon
|
||||
if (Build.VERSION.SDK_INT >= 16)
|
||||
builder = builder.setPriority(Notification.PRIORITY_DEFAULT);
|
||||
if (Build.VERSION.SDK_INT >= 21)
|
||||
|
||||
@@ -34,13 +34,6 @@ import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
// For future package update checking
|
||||
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
|
||||
import static android.provider.Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS;
|
||||
|
||||
public class I2PDActivity extends Activity {
|
||||
@@ -66,7 +59,7 @@ public class I2PDActivity extends Activity {
|
||||
if (textView == null)
|
||||
return;
|
||||
Throwable tr = daemon.getLastThrowable();
|
||||
if (tr!=null) {
|
||||
if (tr != null) {
|
||||
textView.setText(throwableToString(tr));
|
||||
return;
|
||||
}
|
||||
@@ -98,15 +91,16 @@ public class I2PDActivity extends Activity {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
Log.i(TAG, "onCreate");
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
if (daemon==null) {
|
||||
textView = (TextView) findViewById(R.id.textView);
|
||||
|
||||
if (daemon == null) {
|
||||
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
daemon = new DaemonWrapper(getAssets(), connectivityManager);
|
||||
}
|
||||
ForegroundService.init(daemon);
|
||||
|
||||
textView = new TextView(this);
|
||||
setContentView(textView);
|
||||
daemon.addStateChangeListener(daemonStateUpdatedListener);
|
||||
daemonStateUpdatedListener.daemonStateUpdate(DaemonWrapper.State.uninitialized, daemon.getState());
|
||||
|
||||
@@ -119,7 +113,6 @@ public class I2PDActivity extends Activity {
|
||||
}
|
||||
}
|
||||
|
||||
// set the app be foreground
|
||||
doBindService();
|
||||
|
||||
final Timer gracefulQuitTimer = getGracefulQuitTimer();
|
||||
@@ -478,6 +471,6 @@ public class I2PDActivity extends Activity {
|
||||
} catch (Throwable tr) {
|
||||
Log.e(TAG, "", tr);
|
||||
}
|
||||
System.exit(0);
|
||||
//System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,13 +35,13 @@ public class WebConsoleActivity extends Activity {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
swipeRefreshLayout.setRefreshing(true);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
new Handler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
webView.reload();
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user