1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-29 07:41:17 +00:00

Remove activity from recents list on exit (fixes #1805) (#1824)

This commit is contained in:
fps.io 2022-08-15 17:27:51 +02:00 committed by GitHub
parent b05430bedb
commit 5c04dab7b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -287,6 +287,10 @@ public class DrawerFragment extends Fragment implements View.OnClickListener {
} }
Log.i(TAG, "Exiting app on user request"); Log.i(TAG, "Exiting app on user request");
mActivity.stopService(new Intent(mActivity, SyncthingService.class)); mActivity.stopService(new Intent(mActivity, SyncthingService.class));
if(android.os.Build.VERSION.SDK_INT >= 21) {
mActivity.finishAndRemoveTask();
} else {
mActivity.finish(); mActivity.finish();
} }
}
} }