diff --git a/app/src/main/java/com/nutomic/syncthingandroid/fragments/DrawerFragment.java b/app/src/main/java/com/nutomic/syncthingandroid/fragments/DrawerFragment.java index 6c0703b7..c0c82260 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/fragments/DrawerFragment.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/fragments/DrawerFragment.java @@ -287,6 +287,10 @@ public class DrawerFragment extends Fragment implements View.OnClickListener { } Log.i(TAG, "Exiting app on user request"); mActivity.stopService(new Intent(mActivity, SyncthingService.class)); - mActivity.finish(); + if(android.os.Build.VERSION.SDK_INT >= 21) { + mActivity.finishAndRemoveTask(); + } else { + mActivity.finish(); + } } }