diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index feb0144..bed677e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -28,7 +28,9 @@
+ android:exported="false"
+ android:foregroundServiceType="dataSync" >
+
= android.os.Build.VERSION_CODES.O) {
this.startForeground(1, this.showNotification());
}
@@ -119,19 +117,23 @@ public class ShellService extends Service {
} else {
fileName = "Error:filename unknown!!!";
Log.e("adx", fileName);
- Toast.makeText((Context)this, (CharSequence)fileName, Toast.LENGTH_SHORT).show();
+ // Toast.makeText((Context)this, (CharSequence)fileName, Toast.LENGTH_SHORT).show();
this.stopSelf();
return Service.START_NOT_STICKY;
}
}
public void onDestroy() {
- if (mProcessThread != null) {
- mProcessThread.interrupt();
- }
+ try {
+ if (mProcessThread != null) {
+ mProcessThread.interrupt();
+ }
- logger.warning("Service has been stopped");
- Toast.makeText((Context)this, (CharSequence)"已关闭frp服务", Toast.LENGTH_SHORT).show();
+ logger.warning("Service has been stopped");
+ // Toast.makeText((Context)this, (CharSequence)"已关闭frp服务", Toast.LENGTH_SHORT).show();
+ } catch (Exception ex) {
+
+ }
}
private final void runCommand(String command, String[] envp, File dir) {