Added safe browsing info button

This commit is contained in:
M66B
2020-03-29 18:46:48 +02:00
parent 0ce292d331
commit 72c11c4a4f
2 changed files with 20 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
@@ -63,6 +64,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
private SwitchCompat swDisplayHidden;
private SwitchCompat swSecure;
private SwitchCompat swSafeBrowsing;
private Button btnSafeBrowsing;
private final static String[] RESET_OPTIONS = new String[]{
"confirm_links", "confirm_images", "confirm_html", "disable_tracking",
@@ -91,6 +93,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
swDisplayHidden = view.findViewById(R.id.swDisplayHidden);
swSecure = view.findViewById(R.id.swSecure);
swSafeBrowsing = view.findViewById(R.id.swSafeBrowsing);
btnSafeBrowsing = view.findViewById(R.id.btnSafeBrowsing);
setOptions();
@@ -200,6 +203,13 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
}
});
btnSafeBrowsing.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.view(getContext(), Uri.parse("https://developers.google.com/safe-browsing"), true);
}
});
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
return view;