Commit 412cd469 authored by Roumen Petrov's avatar Roumen Petrov

start foreground TermService according API 26 norms

parent 33e68db8
......@@ -231,7 +231,10 @@ public void onCreate(Bundle icicle) {
.registerOnSharedPreferenceChangeListener(this);
TSIntent = new Intent(this, TermService.class);
startService(TSIntent);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*API level 26*/)
startForegroundService(TSIntent);
else
startService(TSIntent);
mActionBar = TermActionBar.setTermContentView(this,
mActionBarMode == TermSettings.ACTION_BAR_MODE_HIDES);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment