diff --git a/app/src/main/java/net/christianbeier/droidvnc_ng/MainService.java b/app/src/main/java/net/christianbeier/droidvnc_ng/MainService.java index f29ceac..7a0dbd9 100644 --- a/app/src/main/java/net/christianbeier/droidvnc_ng/MainService.java +++ b/app/src/main/java/net/christianbeier/droidvnc_ng/MainService.java @@ -427,6 +427,10 @@ public int onStartCommand(Intent intent, int flags, int startId) }).start(); } else { stopSelfByUs(); + Intent answer = new Intent(ACTION_CONNECT_REVERSE); + answer.putExtra(EXTRA_REQUEST_ID, intent.getStringExtra(EXTRA_REQUEST_ID)); + answer.putExtra(EXTRA_REQUEST_SUCCESS, false); + sendBroadcastToOthersAndUs(answer); } return START_NOT_STICKY; @@ -455,6 +459,10 @@ public int onStartCommand(Intent intent, int flags, int startId) }).start(); } else { stopSelfByUs(); + Intent answer = new Intent(ACTION_CONNECT_REPEATER); + answer.putExtra(EXTRA_REQUEST_ID, intent.getStringExtra(EXTRA_REQUEST_ID)); + answer.putExtra(EXTRA_REQUEST_SUCCESS, false); + sendBroadcastToOthersAndUs(answer); } return START_NOT_STICKY; @@ -464,6 +472,10 @@ public int onStartCommand(Intent intent, int flags, int startId) if(!vncIsActive()) { stopSelfByUs(); } + Intent answer = new Intent(intent.getAction()); + answer.putExtra(EXTRA_REQUEST_ID, intent.getStringExtra(EXTRA_REQUEST_ID)); + answer.putExtra(EXTRA_REQUEST_SUCCESS, false); + sendBroadcastToOthersAndUs(answer); return START_NOT_STICKY; }