mirror of
https://github.com/moparisthebest/SSLDroid
synced 2024-11-27 03:12:18 -05:00
Fixed "running" notification to be persistent, e.g. not clearable by
the user. Signed-off-by: Balint Kovacs <blint@blint.hu>
This commit is contained in:
parent
a447f4419f
commit
7cf08aca6e
BIN
bin/SSLDroid.apk
BIN
bin/SSLDroid.apk
Binary file not shown.
BIN
bin/classes.dex
BIN
bin/classes.dex
Binary file not shown.
@ -58,7 +58,7 @@ public class SSLDroid extends Service {
|
||||
keyPass = settingPkcspass;
|
||||
|
||||
//Toast.makeText(this, "SSLDroid Service Started", Toast.LENGTH_LONG).show();
|
||||
createNotification(0, "SSLDroid is running", "SSLDroid service is running");
|
||||
createNotification(0, true, "SSLDroid is running", "SSLDroid service is running");
|
||||
Log.d(TAG, "SSLDroid Service Started");
|
||||
|
||||
//createNotification("test", "This is a test of the emergency broadcast system");
|
||||
@ -97,12 +97,13 @@ public class SSLDroid extends Service {
|
||||
notificationManager.cancel(id);
|
||||
}
|
||||
|
||||
public void createNotification(int id, String title, String text) {
|
||||
public void createNotification(int id, boolean persistent, String title, String text) {
|
||||
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
Notification notification = new Notification(R.drawable.icon,
|
||||
"SSLDroid startup", System.currentTimeMillis());
|
||||
// Hide the notification after its selected
|
||||
//notification.flags |= Notification.FLAG_AUTO_CANCEL;
|
||||
if (persistent == true)
|
||||
notification.flags |= Notification.FLAG_NO_CLEAR;
|
||||
|
||||
Intent intent = new Intent(this, SSLDroidGui.class);
|
||||
PendingIntent activity = PendingIntent.getActivity(this, 0, intent, 0);
|
||||
|
@ -48,6 +48,11 @@ public class TcpProxy {
|
||||
}
|
||||
server = new TcpProxyServerThread(ss, listenPort, tunnelHost, tunnelPort, keyFile, keyPass);
|
||||
server.start();
|
||||
/* try {
|
||||
server.wait();
|
||||
} catch (InterruptedException e) {
|
||||
Log.d("SSLDroid", "Server thread interrupted: " + e.toString());
|
||||
} */
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
|
Loading…
Reference in New Issue
Block a user