|
|
@@ -684,12 +684,14 @@ public class MainActivity extends FragmentActivity implements Scrcpy.ServiceCall
|
|
|
|
|
|
//禁止后台运行
|
|
|
if(DISABLE_BG_RUNNING && !result_of_Rotation){
|
|
|
+ boolean isGranted = SystemUtils.isGranted(this);
|
|
|
+ Log.e(LOG_TAG,isGranted+" onPause bg "+serviceBound);
|
|
|
if (serviceBound) {
|
|
|
scrcpy.StopService();
|
|
|
unbindService(serviceConnection);
|
|
|
+ android.os.Process.killProcess(android.os.Process.myPid());
|
|
|
+ System.exit(1);
|
|
|
}
|
|
|
- android.os.Process.killProcess(android.os.Process.myPid());
|
|
|
- System.exit(1);
|
|
|
}
|
|
|
}
|
|
|
|