Allow background service pre Android 8 only

pull/180/head
M66B 5 years ago
parent 0ce044f76c
commit f5e2164c8a

@ -30,6 +30,7 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.os.Build;
import android.util.Printer; import android.util.Printer;
import android.webkit.CookieManager; import android.webkit.CookieManager;
@ -274,6 +275,9 @@ public class ApplicationEx extends Application {
editor.putBoolean("experiments", true); editor.putBoolean("experiments", true);
} else if (version < 1124) { } else if (version < 1124) {
editor.remove("experiments"); 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) if (version < BuildConfig.VERSION_CODE)

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

Loading…
Cancel
Save