|
|
|
@ -50,6 +50,7 @@ import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
import androidx.appcompat.app.AlertDialog;
|
|
|
|
|
import androidx.appcompat.widget.SwitchCompat;
|
|
|
|
|
import androidx.constraintlayout.widget.Group;
|
|
|
|
|
import androidx.lifecycle.Lifecycle;
|
|
|
|
|
import androidx.preference.PreferenceManager;
|
|
|
|
|
|
|
|
|
@ -66,6 +67,8 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
|
|
|
|
private SwitchCompat swSafeBrowsing;
|
|
|
|
|
private Button btnSafeBrowsing;
|
|
|
|
|
|
|
|
|
|
private Group grpSafeBrowsing;
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
|
"confirm_links", "confirm_images", "confirm_html", "disable_tracking",
|
|
|
|
|
"biometrics", "pin", "biometrics_timeout",
|
|
|
|
@ -95,6 +98,8 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
|
|
|
|
swSafeBrowsing = view.findViewById(R.id.swSafeBrowsing);
|
|
|
|
|
btnSafeBrowsing = view.findViewById(R.id.btnSafeBrowsing);
|
|
|
|
|
|
|
|
|
|
grpSafeBrowsing = view.findViewById(R.id.grpSafeBrowsing);
|
|
|
|
|
|
|
|
|
|
setOptions();
|
|
|
|
|
|
|
|
|
|
// Wire controls
|
|
|
|
@ -195,7 +200,6 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swSafeBrowsing.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? View.GONE : View.VISIBLE);
|
|
|
|
|
swSafeBrowsing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
@ -210,6 +214,8 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
grpSafeBrowsing.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? View.GONE : View.VISIBLE);
|
|
|
|
|
|
|
|
|
|
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
|
|
|
|
|
|
|
|
|
|
return view;
|
|
|
|
|