1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 19:25:34 +00:00

Revert "System themes require Android 10"

This reverts commit 329e98eb14.
This commit is contained in:
M66B 2019-10-22 21:54:39 +02:00
parent 47419b06b5
commit 3f5a14e825

View file

@ -24,7 +24,6 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
@ -36,11 +35,9 @@ import android.widget.AdapterView;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.SeekBar;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
@ -617,13 +614,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
View dview = LayoutInflater.from(getContext()).inflate(R.layout.dialog_theme, null);
final RadioGroup rgTheme = dview.findViewById(R.id.rgTheme);
final RadioButton rbThemeSystem = dview.findViewById(R.id.rbThemeSystem);
final RadioButton rbThemeGreySystem = dview.findViewById(R.id.rbThemeGreySystem);
final TextView tvSystem = dview.findViewById(R.id.tvSystem);
rbThemeSystem.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.Q ? View.GONE : View.VISIBLE);
rbThemeGreySystem.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.Q ? View.GONE : View.VISIBLE);
tvSystem.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.Q ? View.GONE : View.VISIBLE);
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
String theme = prefs.getString("theme", "light");