Browse Source

fix issue with foreground service on Oreo+ (#1203)

pull/1207/head
Konrad Pozniak 7 years ago committed by GitHub
parent
commit
1b9e279064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java

6
app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java

@ -956,7 +956,11 @@ public final class ComposeActivity
getIntent().getStringExtra(SAVED_JSON_URLS_EXTRA),
accountManager.getActiveAccount(), savedTootUid);
startService(sendIntent);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
startForegroundService(sendIntent);
} else {
startService(sendIntent);
}
finishWithoutSlideOutAnimation();

Loading…
Cancel
Save