mirror of
http://galexander.org/git/simplesshd.git
synced 2024-11-17 21:08:28 +00:00
823591055a
use it in StartReceive/StopReceiver as well as BootReceiver, so that the sshd service can be started and stopped even if the UI is closed.
14 lines
389 B
Java
14 lines
389 B
Java
package org.galexander.sshd;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
import android.content.Intent;
|
|
import android.content.Context;
|
|
|
|
public class StopReceiver extends BroadcastReceiver {
|
|
public void onReceive(Context context, Intent intent) {
|
|
SimpleSSHDService.my_startService(context,
|
|
new Intent(context, SimpleSSHDService.class)
|
|
.putExtra("stop", true));
|
|
}
|
|
}
|