Allow background service pre Android 8 only

This commit is contained in:
M66B 2020-05-27 11:40:38 +02:00
parent 0ce044f76c
commit f5e2164c8a
2 changed files with 5 additions and 1 deletions

View File

@ -30,6 +30,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Build;
import android.util.Printer;
import android.webkit.CookieManager;
@ -274,6 +275,9 @@ public class ApplicationEx extends Application {
editor.putBoolean("experiments", true);
} else if (version < 1124) {
editor.remove("experiments");
} else if (version < 1181) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
editor.remove("background_service");
}
if (version < BuildConfig.VERSION_CODE)

View File

@ -503,6 +503,6 @@
android:id="@+id/grpNotification"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="swLight,btnSound" />
app:constraint_referenced_ids="swBackground,tvBackgroundHint,swLight,btnSound" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>