allow SwapService to start SwapWorkflowActivity on Android < 7.0

https://stackoverflow.com/a/50833599
This commit is contained in:
Hans-Christoph Steiner 2019-06-13 21:14:51 +02:00
parent 254bd6a4db
commit ec6f9cef2b

View File

@ -412,7 +412,9 @@ public class SwapService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
deleteAllSwapRepos();
startActivity(new Intent(this, SwapWorkflowActivity.class));
Intent startUiIntent = new Intent(this, SwapWorkflowActivity.class);
startUiIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startUiIntent);
return START_NOT_STICKY;
}