Browse Source

Persistent notification wasn't properly removed on disc0nnect kek

Wazakindjes 1 year ago
parent
commit
8f4413c81c

BIN
app/rem0t0.apk


+ 2 - 1
app/src/app_rem0t0/src/main/java/com/jemoeder/lief/rem0t0/MainActivity.java

@@ -349,7 +349,7 @@ public class MainActivity extends AppCompatActivity {
 		startService(kserv);
 	}
 
-	private void kservRemove() {
+	public void kservRemove() {
 		if(!wrapass.svcrunning)
 			return;
 		Intent kserv = new Intent(muhctx, rem0t0Service.class);
@@ -393,6 +393,7 @@ public class MainActivity extends AppCompatActivity {
 		// If we're already connected, make sure we disconnect and show additional messages
 		if(muhsock != null) {
 			reconnecting = true;
+			kservRemove();
 			muhcmds.add(muhres.getString(R.string.cmd_quit));
 		}
 

+ 1 - 0
app/src/app_rem0t0/src/main/java/com/jemoeder/lief/rem0t0/muhReceiver.java

@@ -101,6 +101,7 @@ class muhReceiver extends AsyncTask<Void, Void, Void> {
 			muhmain.abSetDisconnected();
 			muhmain.doSnackbar(errstr, Snackbar.LENGTH_LONG, true);
 		}
+		muhmain.kservRemove();
 	}
 
 	@SuppressWarnings("SameParameterValue")

+ 1 - 0
app/src/app_rem0t0/src/main/java/com/jemoeder/lief/rem0t0/muhSender.java

@@ -126,6 +126,7 @@ class muhSender extends AsyncTask<Void, Void, Void> {
 			muhmain.abSetDisconnected();
 			muhmain.doSnackbar(errstr, Snackbar.LENGTH_LONG, true);
 		}
+		muhmain.kservRemove();
 	}
 
 	// Lil wrapper for showing snackbars in MainActivity (has to be done on the UI thread, thanks Google)

+ 2 - 2
app/src/app_rem0t0/version.properties

@@ -1,2 +1,2 @@
-#Sat Nov 02 21:36:54 CET 2019
-VERSION_CODE=290
+#Sun Nov 03 15:33:59 CET 2019
+VERSION_CODE=292