Search in sources :

Example 1 with List_trusted

use of de.baumann.browser.browser.List_trusted in project browser by scoute-dich.

the class ProfilesList method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Window window = this.getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
    window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    window.setStatusBarColor(ContextCompat.getColor(this, R.color.md_theme_light_onBackground));
    if (getSupportActionBar() != null)
        getSupportActionBar().hide();
    HelperUnit.initTheme(this);
    setContentView(R.layout.activity_settings_profile_list);
    Toolbar toolbar = findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
    listToLoad = sp.getString("listToLoad", "standard");
    if (listToLoad != null) {
        switch(listToLoad) {
            case "protected":
                setTitle(R.string.setting_title_profiles_protectedList);
                break;
            case "standard":
                setTitle(R.string.setting_title_profiles_standardList);
                break;
            case "trusted":
                setTitle(R.string.setting_title_profiles_trustedList);
                break;
        }
    }
    listProtected = new List_protected(this);
    listStandard = new List_standard(this);
    listTrusted = new List_trusted(this);
    RecordAction action = new RecordAction(this);
    action.open(false);
    switch(listToLoad) {
        case "protected":
            list = action.listDomains(RecordUnit.TABLE_PROTECTED);
            break;
        case "standard":
            list = action.listDomains(RecordUnit.TABLE_STANDARD);
            break;
        case "trusted":
            list = action.listDomains(RecordUnit.TABLE_TRUSTED);
            break;
    }
    action.close();
    ListView listView = findViewById(R.id.whitelist);
    listView.setEmptyView(findViewById(R.id.whitelist_empty));
    // noinspection NullableProblems
    adapter = new AdapterProfileList(this, list) {

        @Override
        public View getView(final int position, View convertView, @NonNull ViewGroup parent) {
            View v = super.getView(position, convertView, parent);
            Button deleteEntry = v.findViewById(R.id.cancelButton);
            deleteEntry.setVisibility(View.VISIBLE);
            MaterialCardView cardView = v.findViewById(R.id.cardView);
            cardView.setVisibility(View.GONE);
            deleteEntry.setOnClickListener(v1 -> {
                MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(ProfilesList.this);
                builder.setIcon(R.drawable.icon_alert);
                builder.setTitle(R.string.menu_delete);
                builder.setMessage(R.string.hint_database);
                builder.setPositiveButton(R.string.app_ok, (dialog, whichButton) -> {
                    switch(listToLoad) {
                        case "protected":
                            listProtected.removeDomain(list.get(position));
                            break;
                        case "standard":
                            listStandard.removeDomain(list.get(position));
                            break;
                        case "trusted":
                            listTrusted.removeDomain(list.get(position));
                            break;
                    }
                    list.remove(position);
                    notifyDataSetChanged();
                    NinjaToast.show(ProfilesList.this, R.string.toast_delete_successful);
                });
                builder.setNegativeButton(R.string.app_cancel, (dialog, whichButton) -> dialog.cancel());
                AlertDialog dialog = builder.create();
                dialog.show();
                HelperUnit.setupDialog(ProfilesList.this, dialog);
            });
            return v;
        }
    };
    listView.setAdapter(adapter);
    adapter.notifyDataSetChanged();
    Button button = findViewById(R.id.whitelist_add);
    button.setOnClickListener(v -> {
        EditText editText = findViewById(R.id.whitelist_edit);
        String domain = editText.getText().toString().trim();
        if (domain.isEmpty()) {
            NinjaToast.show(ProfilesList.this, R.string.toast_input_empty);
        } else if (!BrowserUnit.isURL(domain)) {
            NinjaToast.show(ProfilesList.this, R.string.toast_invalid_domain);
        } else {
            RecordAction action1 = new RecordAction(ProfilesList.this);
            action1.open(true);
            if (action1.checkDomain(domain, RecordUnit.TABLE_PROTECTED)) {
                NinjaToast.show(ProfilesList.this, R.string.toast_domain_already_exists);
            } else {
                switch(listToLoad) {
                    case "protected":
                        listProtected.addDomain(domain.trim());
                        break;
                    case "standard":
                        listStandard.addDomain(domain.trim());
                        break;
                    case "trusted":
                        listTrusted.addDomain(domain.trim());
                        break;
                }
                list.add(0, domain.trim());
                adapter.notifyDataSetChanged();
                NinjaToast.show(ProfilesList.this, R.string.toast_add_whitelist_successful);
            }
            action1.close();
        }
    });
}
Also used : Window(android.view.Window) List_standard(de.baumann.browser.browser.List_standard) Bundle(android.os.Bundle) AlertDialog(androidx.appcompat.app.AlertDialog) MaterialCardView(com.google.android.material.card.MaterialCardView) List_trusted(de.baumann.browser.browser.List_trusted) NonNull(androidx.annotation.NonNull) MaterialAlertDialogBuilder(com.google.android.material.dialog.MaterialAlertDialogBuilder) Uri(android.net.Uri) WindowManager(android.view.WindowManager) NinjaToast(de.baumann.browser.view.NinjaToast) AdapterProfileList(de.baumann.browser.view.AdapterProfileList) AppCompatActivity(androidx.appcompat.app.AppCompatActivity) MenuItem(android.view.MenuItem) RecordAction(de.baumann.browser.database.RecordAction) Menu(android.view.Menu) View(android.view.View) Button(android.widget.Button) BrowserUnit(de.baumann.browser.unit.BrowserUnit) ContextCompat(androidx.core.content.ContextCompat) HelperUnit(de.baumann.browser.unit.HelperUnit) R(de.baumann.browser.R) List_protected(de.baumann.browser.browser.List_protected) ViewGroup(android.view.ViewGroup) Objects(java.util.Objects) List(java.util.List) SharedPreferences(android.content.SharedPreferences) Toolbar(androidx.appcompat.widget.Toolbar) PreferenceManager(androidx.preference.PreferenceManager) ListView(android.widget.ListView) RecordUnit(de.baumann.browser.unit.RecordUnit) Window(android.view.Window) EditText(android.widget.EditText) AlertDialog(androidx.appcompat.app.AlertDialog) EditText(android.widget.EditText) SharedPreferences(android.content.SharedPreferences) ViewGroup(android.view.ViewGroup) List_trusted(de.baumann.browser.browser.List_trusted) AdapterProfileList(de.baumann.browser.view.AdapterProfileList) MaterialCardView(com.google.android.material.card.MaterialCardView) View(android.view.View) ListView(android.widget.ListView) MaterialAlertDialogBuilder(com.google.android.material.dialog.MaterialAlertDialogBuilder) MaterialCardView(com.google.android.material.card.MaterialCardView) List_protected(de.baumann.browser.browser.List_protected) ListView(android.widget.ListView) Button(android.widget.Button) List_standard(de.baumann.browser.browser.List_standard) RecordAction(de.baumann.browser.database.RecordAction) Toolbar(androidx.appcompat.widget.Toolbar)

Example 2 with List_trusted

use of de.baumann.browser.browser.List_trusted in project browser by scoute-dich.

the class BackupUnit method importList.

public static void importList(Context context, int i) {
    try {
        String filename;
        List_trusted listTrusted = null;
        List_protected listProtected = null;
        List_standard listStandard = null;
        switch(i) {
            case 1:
                listTrusted = new List_trusted(context);
                filename = "list_trusted.txt";
                break;
            case 3:
                listStandard = new List_standard(context);
                filename = "list_standard.txt";
                break;
            default:
                listProtected = new List_protected(context);
                filename = "list_protected.txt";
                break;
        }
        File file = new File(Environment.getExternalStoragePublicDirectory(DIRECTORY_DOCUMENTS), "browser_backup//" + filename);
        RecordAction action = new RecordAction(context);
        action.open(true);
        switch(i) {
            case 1:
                listTrusted.clearDomains();
                break;
            case 3:
                listStandard.clearDomains();
                break;
            default:
                listProtected.clearDomains();
                break;
        }
        BufferedReader reader = new BufferedReader(new FileReader(file));
        String line;
        while ((line = reader.readLine()) != null) {
            switch(i) {
                case 1:
                    if (!action.checkDomain(line, RecordUnit.TABLE_TRUSTED))
                        listTrusted.addDomain(line);
                    break;
                case 3:
                    if (!action.checkDomain(line, RecordUnit.TABLE_STANDARD))
                        listStandard.addDomain(line);
                    break;
                default:
                    if (!action.checkDomain(line, RecordUnit.TABLE_PROTECTED))
                        listProtected.addDomain(line);
                    break;
            }
        }
        reader.close();
        action.close();
    } catch (Exception e) {
        Log.w("browser", "Error reading file", e);
    }
}
Also used : List_protected(de.baumann.browser.browser.List_protected) List_standard(de.baumann.browser.browser.List_standard) BufferedReader(java.io.BufferedReader) List_trusted(de.baumann.browser.browser.List_trusted) RecordAction(de.baumann.browser.database.RecordAction) FileReader(java.io.FileReader) File(java.io.File)

Example 3 with List_trusted

use of de.baumann.browser.browser.List_trusted in project browser by scoute-dich.

the class BrowserActivity method show_dialogFastToggle.

private void show_dialogFastToggle() {
    listTrusted = new List_trusted(context);
    listStandard = new List_standard(context);
    listProtected = new List_protected(context);
    ninjaWebView = (NinjaWebView) currentAlbumController;
    String url = ninjaWebView.getUrl();
    if (url != null) {
        MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context);
        View dialogView = View.inflate(context, R.layout.dialog_toggle, null);
        builder.setView(dialogView);
        Chip chip_profile_standard = dialogView.findViewById(R.id.chip_profile_standard);
        Chip chip_profile_trusted = dialogView.findViewById(R.id.chip_profile_trusted);
        Chip chip_profile_changed = dialogView.findViewById(R.id.chip_profile_changed);
        Chip chip_profile_protected = dialogView.findViewById(R.id.chip_profile_protected);
        TextView dialog_warning = dialogView.findViewById(R.id.dialog_titleDomain);
        dialog_warning.setText(HelperUnit.domain(url));
        TextView dialog_titleProfile = dialogView.findViewById(R.id.dialog_titleProfile);
        ninjaWebView.putProfileBoolean("", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        AlertDialog dialog = builder.create();
        dialog.show();
        Objects.requireNonNull(dialog.getWindow()).setGravity(Gravity.BOTTOM);
        // ProfileControl
        Chip chip_setProfileTrusted = dialogView.findViewById(R.id.chip_setProfileTrusted);
        chip_setProfileTrusted.setChecked(listTrusted.isWhite(url));
        chip_setProfileTrusted.setOnClickListener(v -> {
            if (listTrusted.isWhite(ninjaWebView.getUrl()))
                listTrusted.removeDomain(HelperUnit.domain(url));
            else {
                listTrusted.addDomain(HelperUnit.domain(url));
                listStandard.removeDomain(HelperUnit.domain(url));
                listProtected.removeDomain(HelperUnit.domain(url));
            }
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_setProfileTrusted.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_trustedList), Toast.LENGTH_SHORT).show();
            return true;
        });
        Chip chip_setProfileProtected = dialogView.findViewById(R.id.chip_setProfileProtected);
        chip_setProfileProtected.setChecked(listProtected.isWhite(url));
        chip_setProfileProtected.setOnClickListener(v -> {
            if (listProtected.isWhite(ninjaWebView.getUrl()))
                listProtected.removeDomain(HelperUnit.domain(url));
            else {
                listProtected.addDomain(HelperUnit.domain(url));
                listTrusted.removeDomain(HelperUnit.domain(url));
                listStandard.removeDomain(HelperUnit.domain(url));
            }
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_setProfileProtected.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_protectedList), Toast.LENGTH_SHORT).show();
            return true;
        });
        Chip chip_setProfileStandard = dialogView.findViewById(R.id.chip_setProfileStandard);
        chip_setProfileStandard.setChecked(listStandard.isWhite(url));
        chip_setProfileStandard.setOnClickListener(v -> {
            if (listStandard.isWhite(ninjaWebView.getUrl()))
                listStandard.removeDomain(HelperUnit.domain(url));
            else {
                listStandard.addDomain(HelperUnit.domain(url));
                listTrusted.removeDomain(HelperUnit.domain(url));
                listProtected.removeDomain(HelperUnit.domain(url));
            }
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_setProfileStandard.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_standardList), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_profile_trusted.setChecked(Objects.equals(sp.getString("profile", "profileTrusted"), "profileTrusted"));
        chip_profile_trusted.setOnClickListener(v -> {
            sp.edit().putString("profile", "profileTrusted").apply();
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_profile_trusted.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_trusted), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_profile_standard.setChecked(Objects.equals(sp.getString("profile", "profileTrusted"), "profileStandard"));
        chip_profile_standard.setOnClickListener(v -> {
            sp.edit().putString("profile", "profileStandard").apply();
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_profile_standard.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_standard), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_profile_protected.setChecked(Objects.equals(sp.getString("profile", "profileTrusted"), "profileProtected"));
        chip_profile_protected.setOnClickListener(v -> {
            sp.edit().putString("profile", "profileProtected").apply();
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_profile_protected.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_protected), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_profile_changed.setChecked(Objects.equals(sp.getString("profile", "profileTrusted"), "profileChanged"));
        chip_profile_changed.setOnClickListener(v -> {
            sp.edit().putString("profile", "profileChanged").apply();
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_profile_changed.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_changed), Toast.LENGTH_SHORT).show();
            return true;
        });
        // CheckBox
        Chip chip_image = dialogView.findViewById(R.id.chip_image);
        chip_image.setChecked(ninjaWebView.getBoolean("_images"));
        chip_image.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_images), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_image.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_images", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_javaScript = dialogView.findViewById(R.id.chip_javaScript);
        chip_javaScript.setChecked(ninjaWebView.getBoolean("_javascript"));
        chip_javaScript.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_javascript), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_javaScript.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_javascript", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_javaScriptPopUp = dialogView.findViewById(R.id.chip_javaScriptPopUp);
        chip_javaScriptPopUp.setChecked(ninjaWebView.getBoolean("_javascriptPopUp"));
        chip_javaScriptPopUp.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_javascript_popUp), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_javaScriptPopUp.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_javascriptPopUp", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_cookie = dialogView.findViewById(R.id.chip_cookie);
        chip_cookie.setChecked(ninjaWebView.getBoolean("_cookies"));
        chip_cookie.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_cookie), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_cookie.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_cookies", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_fingerprint = dialogView.findViewById(R.id.chip_Fingerprint);
        chip_fingerprint.setChecked(ninjaWebView.getBoolean("_fingerPrintProtection"));
        chip_fingerprint.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_fingerPrint), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_fingerprint.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_fingerPrintProtection", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_adBlock = dialogView.findViewById(R.id.chip_adBlock);
        chip_adBlock.setChecked(ninjaWebView.getBoolean("_adBlock"));
        chip_adBlock.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_adblock), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_adBlock.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_adBlock", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_saveData = dialogView.findViewById(R.id.chip_saveData);
        chip_saveData.setChecked(ninjaWebView.getBoolean("_saveData"));
        chip_saveData.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_save_data), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_saveData.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_saveData", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_history = dialogView.findViewById(R.id.chip_history);
        chip_history.setChecked(ninjaWebView.getBoolean("_saveHistory"));
        chip_history.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.album_title_history), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_history.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_saveHistory", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_location = dialogView.findViewById(R.id.chip_location);
        chip_location.setChecked(ninjaWebView.getBoolean("_location"));
        chip_location.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_location), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_location.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_location", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_microphone = dialogView.findViewById(R.id.chip_microphone);
        chip_microphone.setChecked(ninjaWebView.getBoolean("_microphone"));
        chip_microphone.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_microphone), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_microphone.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_microphone", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_camera = dialogView.findViewById(R.id.chip_camera);
        chip_camera.setChecked(ninjaWebView.getBoolean("_camera"));
        chip_camera.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_camera), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_camera.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_camera", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_dom = dialogView.findViewById(R.id.chip_dom);
        chip_dom.setChecked(ninjaWebView.getBoolean("_dom"));
        chip_dom.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_dom), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_dom.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_dom", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        if (listTrusted.isWhite(url) || listStandard.isWhite(url) || listProtected.isWhite(url)) {
            TypedValue typedValue = new TypedValue();
            Resources.Theme theme = context.getTheme();
            theme.resolveAttribute(R.attr.colorError, typedValue, true);
            int color = typedValue.data;
            dialog_warning.setTextColor(color);
            chip_image.setEnabled(false);
            chip_adBlock.setEnabled(false);
            chip_saveData.setEnabled(false);
            chip_location.setEnabled(false);
            chip_camera.setEnabled(false);
            chip_microphone.setEnabled(false);
            chip_history.setEnabled(false);
            chip_fingerprint.setEnabled(false);
            chip_cookie.setEnabled(false);
            chip_javaScript.setEnabled(false);
            chip_javaScriptPopUp.setEnabled(false);
            chip_dom.setEnabled(false);
        }
        Chip chip_toggleNightView = dialogView.findViewById(R.id.chip_toggleNightView);
        chip_toggleNightView.setChecked(ninjaWebView.isNightMode());
        chip_toggleNightView.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.menu_nightView), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_toggleNightView.setOnClickListener(v -> {
            ninjaWebView.toggleNightMode();
            isNightMode = ninjaWebView.isNightMode();
            dialog.cancel();
        });
        Chip chip_toggleDesktop = dialogView.findViewById(R.id.chip_toggleDesktop);
        chip_toggleDesktop.setChecked(ninjaWebView.isDesktopMode());
        chip_toggleDesktop.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.menu_desktopView), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_toggleDesktop.setOnClickListener(v -> {
            ninjaWebView.toggleDesktopMode(true);
            dialog.cancel();
        });
        Chip chip_toggleScreenOn = dialogView.findViewById(R.id.chip_toggleScreenOn);
        chip_toggleScreenOn.setChecked(sp.getBoolean("sp_screenOn", false));
        chip_toggleScreenOn.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_screenOn), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_toggleScreenOn.setOnClickListener(v -> {
            sp.edit().putBoolean("sp_screenOn", !sp.getBoolean("sp_screenOn", false)).apply();
            saveOpenedTabs();
            HelperUnit.triggerRebirth(context);
            dialog.cancel();
        });
        Chip chip_toggleAudioBackground = dialogView.findViewById(R.id.chip_toggleAudioBackground);
        chip_toggleAudioBackground.setChecked(sp.getBoolean("sp_audioBackground", false));
        chip_toggleAudioBackground.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_audioBackground), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_toggleAudioBackground.setOnClickListener(v -> {
            sp.edit().putBoolean("sp_audioBackground", !sp.getBoolean("sp_audioBackground", false)).apply();
            dialog.cancel();
        });
        Button ib_reload = dialogView.findViewById(R.id.ib_reload);
        ib_reload.setOnClickListener(view -> {
            if (ninjaWebView != null) {
                dialog.cancel();
                ninjaWebView.reload();
            }
        });
        Button ib_settings = dialogView.findViewById(R.id.ib_settings);
        ib_settings.setOnClickListener(view -> {
            if (ninjaWebView != null) {
                dialog.cancel();
                Intent settings = new Intent(BrowserActivity.this, Settings_Activity.class);
                startActivity(settings);
            }
        });
        Button button_help = dialogView.findViewById(R.id.button_help);
        button_help.setOnClickListener(view -> {
            dialog.cancel();
            Uri webpage = Uri.parse("https://github.com/scoute-dich/browser/wiki/Fast-Toggle-Dialog");
            BrowserUnit.intentURL(this, webpage);
        });
    } else {
        NinjaToast.show(context, getString(R.string.app_error));
    }
}
Also used : AlertDialog(androidx.appcompat.app.AlertDialog) List_trusted(de.baumann.browser.browser.List_trusted) Intent(android.content.Intent) Chip(com.google.android.material.chip.Chip) MaterialAlertDialogBuilder(com.google.android.material.dialog.MaterialAlertDialogBuilder) ImageView(android.widget.ImageView) CardView(androidx.cardview.widget.CardView) GridView(android.widget.GridView) View(android.view.View) WebView(android.webkit.WebView) BottomNavigationView(com.google.android.material.bottomnavigation.BottomNavigationView) TextView(android.widget.TextView) ListView(android.widget.ListView) NinjaWebView(de.baumann.browser.view.NinjaWebView) NavigationBarView(com.google.android.material.navigation.NavigationBarView) VideoView(android.widget.VideoView) Uri(android.net.Uri) SuppressLint(android.annotation.SuppressLint) List_protected(de.baumann.browser.browser.List_protected) ImageButton(android.widget.ImageButton) FloatingActionButton(com.google.android.material.floatingactionbutton.FloatingActionButton) Button(android.widget.Button) List_standard(de.baumann.browser.browser.List_standard) TextView(android.widget.TextView) Resources(android.content.res.Resources) TypedValue(android.util.TypedValue)

Example 4 with List_trusted

use of de.baumann.browser.browser.List_trusted in project browser by scoute-dich.

the class BrowserActivity method showDialogFastToggle.

// Dialogs
private void showDialogFastToggle() {
    listTrusted = new List_trusted(context);
    listStandard = new List_standard(context);
    listProtected = new List_protected(context);
    ninjaWebView = (NinjaWebView) currentAlbumController;
    String url = ninjaWebView.getUrl();
    if (url != null) {
        MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context);
        View dialogView = View.inflate(context, R.layout.dialog_toggle, null);
        builder.setView(dialogView);
        Chip chip_profile_standard = dialogView.findViewById(R.id.chip_profile_standard);
        Chip chip_profile_trusted = dialogView.findViewById(R.id.chip_profile_trusted);
        Chip chip_profile_changed = dialogView.findViewById(R.id.chip_profile_changed);
        Chip chip_profile_protected = dialogView.findViewById(R.id.chip_profile_protected);
        TextView dialog_warning = dialogView.findViewById(R.id.dialog_titleDomain);
        dialog_warning.setText(HelperUnit.domain(url));
        FaviconHelper.setFavicon(context, dialogView, url, R.id.menu_icon, R.drawable.icon_image_broken);
        TextView dialog_titleProfile = dialogView.findViewById(R.id.dialog_titleProfile);
        ninjaWebView.putProfileBoolean("", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        AlertDialog dialog = builder.create();
        dialog.show();
        Objects.requireNonNull(dialog.getWindow()).setGravity(Gravity.BOTTOM);
        // ProfileControl
        Chip chip_setProfileTrusted = dialogView.findViewById(R.id.chip_setProfileTrusted);
        chip_setProfileTrusted.setChecked(listTrusted.isWhite(url));
        chip_setProfileTrusted.setOnClickListener(v -> {
            if (listTrusted.isWhite(ninjaWebView.getUrl()))
                listTrusted.removeDomain(HelperUnit.domain(url));
            else {
                listTrusted.addDomain(HelperUnit.domain(url));
                listStandard.removeDomain(HelperUnit.domain(url));
                listProtected.removeDomain(HelperUnit.domain(url));
            }
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_setProfileTrusted.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_trustedList), Toast.LENGTH_SHORT).show();
            return true;
        });
        Chip chip_setProfileProtected = dialogView.findViewById(R.id.chip_setProfileProtected);
        chip_setProfileProtected.setChecked(listProtected.isWhite(url));
        chip_setProfileProtected.setOnClickListener(v -> {
            if (listProtected.isWhite(ninjaWebView.getUrl()))
                listProtected.removeDomain(HelperUnit.domain(url));
            else {
                listProtected.addDomain(HelperUnit.domain(url));
                listTrusted.removeDomain(HelperUnit.domain(url));
                listStandard.removeDomain(HelperUnit.domain(url));
            }
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_setProfileProtected.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_protectedList), Toast.LENGTH_SHORT).show();
            return true;
        });
        Chip chip_setProfileStandard = dialogView.findViewById(R.id.chip_setProfileStandard);
        chip_setProfileStandard.setChecked(listStandard.isWhite(url));
        chip_setProfileStandard.setOnClickListener(v -> {
            if (listStandard.isWhite(ninjaWebView.getUrl()))
                listStandard.removeDomain(HelperUnit.domain(url));
            else {
                listStandard.addDomain(HelperUnit.domain(url));
                listTrusted.removeDomain(HelperUnit.domain(url));
                listProtected.removeDomain(HelperUnit.domain(url));
            }
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_setProfileStandard.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_standardList), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_profile_trusted.setChecked(Objects.equals(sp.getString("profile", "profileTrusted"), "profileTrusted"));
        chip_profile_trusted.setOnClickListener(v -> {
            sp.edit().putString("profile", "profileTrusted").apply();
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_profile_trusted.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_trusted), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_profile_standard.setChecked(Objects.equals(sp.getString("profile", "profileTrusted"), "profileStandard"));
        chip_profile_standard.setOnClickListener(v -> {
            sp.edit().putString("profile", "profileStandard").apply();
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_profile_standard.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_standard), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_profile_protected.setChecked(Objects.equals(sp.getString("profile", "profileTrusted"), "profileProtected"));
        chip_profile_protected.setOnClickListener(v -> {
            sp.edit().putString("profile", "profileProtected").apply();
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_profile_protected.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_protected), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_profile_changed.setChecked(Objects.equals(sp.getString("profile", "profileTrusted"), "profileChanged"));
        chip_profile_changed.setOnClickListener(v -> {
            sp.edit().putString("profile", "profileChanged").apply();
            ninjaWebView.reload();
            dialog.cancel();
        });
        chip_profile_changed.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_profiles_changed), Toast.LENGTH_SHORT).show();
            return true;
        });
        // CheckBox
        Chip chip_image = dialogView.findViewById(R.id.chip_image);
        chip_image.setChecked(ninjaWebView.getBoolean("_images"));
        chip_image.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_images), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_image.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_images", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_javaScript = dialogView.findViewById(R.id.chip_javaScript);
        chip_javaScript.setChecked(ninjaWebView.getBoolean("_javascript"));
        chip_javaScript.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_javascript), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_javaScript.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_javascript", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_javaScriptPopUp = dialogView.findViewById(R.id.chip_javaScriptPopUp);
        chip_javaScriptPopUp.setChecked(ninjaWebView.getBoolean("_javascriptPopUp"));
        chip_javaScriptPopUp.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_javascript_popUp), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_javaScriptPopUp.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_javascriptPopUp", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_cookie = dialogView.findViewById(R.id.chip_cookie);
        chip_cookie.setChecked(ninjaWebView.getBoolean("_cookies"));
        chip_cookie.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_cookie), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_cookie.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_cookies", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_fingerprint = dialogView.findViewById(R.id.chip_Fingerprint);
        chip_fingerprint.setChecked(ninjaWebView.getBoolean("_fingerPrintProtection"));
        chip_fingerprint.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_fingerPrint), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_fingerprint.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_fingerPrintProtection", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_adBlock = dialogView.findViewById(R.id.chip_adBlock);
        chip_adBlock.setChecked(ninjaWebView.getBoolean("_adBlock"));
        chip_adBlock.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_adblock), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_adBlock.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_adBlock", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_saveData = dialogView.findViewById(R.id.chip_saveData);
        chip_saveData.setChecked(ninjaWebView.getBoolean("_saveData"));
        chip_saveData.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_save_data), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_saveData.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_saveData", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_history = dialogView.findViewById(R.id.chip_history);
        chip_history.setChecked(ninjaWebView.getBoolean("_saveHistory"));
        chip_history.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.album_title_history), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_history.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_saveHistory", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_location = dialogView.findViewById(R.id.chip_location);
        chip_location.setChecked(ninjaWebView.getBoolean("_location"));
        chip_location.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_location), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_location.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_location", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_microphone = dialogView.findViewById(R.id.chip_microphone);
        chip_microphone.setChecked(ninjaWebView.getBoolean("_microphone"));
        chip_microphone.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_microphone), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_microphone.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_microphone", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_camera = dialogView.findViewById(R.id.chip_camera);
        chip_camera.setChecked(ninjaWebView.getBoolean("_camera"));
        chip_camera.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_camera), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_camera.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_camera", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        Chip chip_dom = dialogView.findViewById(R.id.chip_dom);
        chip_dom.setChecked(ninjaWebView.getBoolean("_dom"));
        chip_dom.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_dom), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_dom.setOnClickListener(v -> {
            ninjaWebView.setProfileChanged();
            ninjaWebView.putProfileBoolean("_dom", dialog_titleProfile, chip_profile_trusted, chip_profile_standard, chip_profile_protected, chip_profile_changed);
        });
        if (listTrusted.isWhite(url) || listStandard.isWhite(url) || listProtected.isWhite(url)) {
            TypedValue typedValue = new TypedValue();
            Resources.Theme theme = context.getTheme();
            theme.resolveAttribute(R.attr.colorError, typedValue, true);
            int color = typedValue.data;
            MaterialCardView cardView = dialogView.findViewById(R.id.editProfile);
            cardView.setVisibility(View.GONE);
            dialog_warning.setTextColor(color);
        }
        Chip chip_toggleNightView = dialogView.findViewById(R.id.chip_toggleNightView);
        chip_toggleNightView.setChecked(ninjaWebView.isNightMode());
        chip_toggleNightView.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.menu_nightView), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_toggleNightView.setOnClickListener(v -> {
            ninjaWebView.toggleNightMode();
            isNightMode = ninjaWebView.isNightMode();
            dialog.cancel();
        });
        Chip chip_toggleDesktop = dialogView.findViewById(R.id.chip_toggleDesktop);
        chip_toggleDesktop.setChecked(ninjaWebView.isDesktopMode());
        chip_toggleDesktop.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.menu_desktopView), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_toggleDesktop.setOnClickListener(v -> {
            ninjaWebView.toggleDesktopMode(true);
            dialog.cancel();
        });
        Chip chip_toggleScreenOn = dialogView.findViewById(R.id.chip_toggleScreenOn);
        chip_toggleScreenOn.setChecked(sp.getBoolean("sp_screenOn", false));
        chip_toggleScreenOn.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_screenOn), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_toggleScreenOn.setOnClickListener(v -> {
            sp.edit().putBoolean("sp_screenOn", !sp.getBoolean("sp_screenOn", false)).apply();
            saveOpenedTabs();
            HelperUnit.triggerRebirth(context);
            dialog.cancel();
        });
        Chip chip_toggleAudioBackground = dialogView.findViewById(R.id.chip_toggleAudioBackground);
        chip_toggleAudioBackground.setChecked(sp.getBoolean("sp_audioBackground", false));
        chip_toggleAudioBackground.setOnLongClickListener(view -> {
            Toast.makeText(context, getString(R.string.setting_title_audioBackground), Toast.LENGTH_SHORT).show();
            return true;
        });
        chip_toggleAudioBackground.setOnClickListener(v -> {
            sp.edit().putBoolean("sp_audioBackground", !sp.getBoolean("sp_audioBackground", false)).apply();
            dialog.cancel();
        });
        Button ib_reload = dialogView.findViewById(R.id.ib_reload);
        ib_reload.setOnClickListener(view -> {
            if (ninjaWebView != null) {
                dialog.cancel();
                ninjaWebView.reload();
            }
        });
        Button ib_settings = dialogView.findViewById(R.id.ib_settings);
        ib_settings.setOnClickListener(view -> {
            if (ninjaWebView != null) {
                dialog.cancel();
                Intent settings = new Intent(BrowserActivity.this, Settings_Activity.class);
                startActivity(settings);
            }
        });
        Button button_help = dialogView.findViewById(R.id.button_help);
        button_help.setVisibility(View.VISIBLE);
        button_help.setOnClickListener(view -> {
            dialog.cancel();
            Uri webpage = Uri.parse("https://github.com/scoute-dich/browser/wiki/Fast-Toggle-Dialog");
            BrowserUnit.intentURL(this, webpage);
        });
    } else {
        NinjaToast.show(context, getString(R.string.app_error));
    }
}
Also used : AlertDialog(androidx.appcompat.app.AlertDialog) List_trusted(de.baumann.browser.browser.List_trusted) Intent(android.content.Intent) Chip(com.google.android.material.chip.Chip) MaterialAlertDialogBuilder(com.google.android.material.dialog.MaterialAlertDialogBuilder) ImageView(android.widget.ImageView) CardView(androidx.cardview.widget.CardView) MaterialCardView(com.google.android.material.card.MaterialCardView) GridView(android.widget.GridView) View(android.view.View) WebView(android.webkit.WebView) BottomNavigationView(com.google.android.material.bottomnavigation.BottomNavigationView) TextView(android.widget.TextView) ListView(android.widget.ListView) NinjaWebView(de.baumann.browser.view.NinjaWebView) NavigationBarView(com.google.android.material.navigation.NavigationBarView) VideoView(android.widget.VideoView) Uri(android.net.Uri) SuppressLint(android.annotation.SuppressLint) MaterialCardView(com.google.android.material.card.MaterialCardView) List_protected(de.baumann.browser.browser.List_protected) ImageButton(android.widget.ImageButton) FloatingActionButton(com.google.android.material.floatingactionbutton.FloatingActionButton) Button(android.widget.Button) List_standard(de.baumann.browser.browser.List_standard) TextView(android.widget.TextView) Resources(android.content.res.Resources) TypedValue(android.util.TypedValue)

Example 5 with List_trusted

use of de.baumann.browser.browser.List_trusted in project browser by scoute-dich.

the class BrowserActivity method updateOmniBox.

@SuppressLint({ "UnsafeOptInUsageError" })
private void updateOmniBox() {
    BadgeDrawable badge = bottom_navigation.getOrCreateBadge(R.id.page_0);
    badge.setVisible(true);
    badge.setNumber(BrowserContainer.size());
    badge.setBackgroundColor(colorSecondary);
    badgeDrawable.setNumber(BrowserContainer.size());
    BadgeUtils.attachBadgeDrawable(badgeDrawable, omniBox_tab, findViewById(R.id.layout));
    omniBox_text.clearFocus();
    ninjaWebView = (NinjaWebView) currentAlbumController;
    String url = ninjaWebView.getUrl();
    if (url != null) {
        progressBar.setVisibility(View.GONE);
        ninjaWebView.setProfileIcon(omniBox_tab);
        ninjaWebView.initCookieManager(url);
        listTrusted = new List_trusted(context);
        if (Objects.requireNonNull(ninjaWebView.getTitle()).isEmpty())
            omniBox_text.setText(url);
        else
            omniBox_text.setText(ninjaWebView.getTitle());
        if (url.startsWith("https://") || url.contains("about:blank") || listTrusted.isWhite(url))
            omniBox_tab.setOnClickListener(v -> showTabView());
        else if (url.isEmpty()) {
            omniBox_tab.setOnClickListener(v -> showTabView());
            omniBox_text.setText("");
        } else {
            omniBox_tab.setImageResource(R.drawable.icon_alert);
            omniBox_tab.setOnClickListener(v -> {
                MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context);
                builder.setIcon(R.drawable.icon_alert);
                builder.setTitle(R.string.app_warning);
                builder.setMessage(R.string.toast_unsecured);
                builder.setPositiveButton(R.string.app_ok, (dialog, whichButton) -> ninjaWebView.loadUrl(url.replace("http://", "https://")));
                builder.setNegativeButton(R.string.app_cancel, (dialog, whichButton) -> {
                    dialog.cancel();
                    omniBox_tab.setOnClickListener(v2 -> showTabView());
                });
                AlertDialog dialog = builder.create();
                dialog.show();
                HelperUnit.setupDialog(context, dialog);
            });
        }
    }
}
Also used : Chip(com.google.android.material.chip.Chip) Arrays(java.util.Arrays) Bundle(android.os.Bundle) PrintManager(android.print.PrintManager) List_trusted(de.baumann.browser.browser.List_trusted) NonNull(androidx.annotation.NonNull) Uri(android.net.Uri) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) PrintAttributes(android.print.PrintAttributes) AppCompatActivity(androidx.appcompat.app.AppCompatActivity) BadgeDrawable(com.google.android.material.badge.BadgeDrawable) AdapterRecord(de.baumann.browser.view.AdapterRecord) Manifest(android.Manifest) SRC_ANCHOR_TYPE(android.webkit.WebView.HitTestResult.SRC_ANCHOR_TYPE) Handler(android.os.Handler) ClipboardManager(android.content.ClipboardManager) DataURIParser(de.baumann.browser.browser.DataURIParser) ContextCompat(androidx.core.content.ContextCompat) Log(android.util.Log) HelperUnit(de.baumann.browser.unit.HelperUnit) CardView(androidx.cardview.widget.CardView) GridAdapter(de.baumann.browser.view.GridAdapter) BottomAppBar(com.google.android.material.bottomappbar.BottomAppBar) IMAGE_TYPE(android.webkit.WebView.HitTestResult.IMAGE_TYPE) LinearProgressIndicator(com.google.android.material.progressindicator.LinearProgressIndicator) IntentFilter(android.content.IntentFilter) WindowInsetsController(android.view.WindowInsetsController) FaviconHelper(de.baumann.browser.database.FaviconHelper) Message(android.os.Message) PrintDocumentAdapter(android.print.PrintDocumentAdapter) TextWatcher(android.text.TextWatcher) MaterialCardView(com.google.android.material.card.MaterialCardView) TextInputLayout(com.google.android.material.textfield.TextInputLayout) Dialog(android.app.Dialog) Editable(android.text.Editable) ArrayList(java.util.ArrayList) Toast(android.widget.Toast) BrowserUnit(de.baumann.browser.unit.BrowserUnit) Record(de.baumann.browser.database.Record) TAG(android.content.ContentValues.TAG) WebChromeClient(android.webkit.WebChromeClient) ValueCallback(android.webkit.ValueCallback) KeyListener(android.text.method.KeyListener) TextUtils(android.text.TextUtils) Gravity(android.view.Gravity) SharedPreferences(android.content.SharedPreferences) TypedValue(android.util.TypedValue) Configuration(android.content.res.Configuration) PreferenceManager(androidx.preference.PreferenceManager) RecordUnit(de.baumann.browser.unit.RecordUnit) EditText(android.widget.EditText) ImageButton(android.widget.ImageButton) LinearLayout(android.widget.LinearLayout) GridView(android.widget.GridView) PackageManager(android.content.pm.PackageManager) MaterialAlertDialogBuilder(com.google.android.material.dialog.MaterialAlertDialogBuilder) WindowManager(android.view.WindowManager) BrowserController(de.baumann.browser.browser.BrowserController) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) FloatingActionButton(com.google.android.material.floatingactionbutton.FloatingActionButton) View(android.view.View) WebBackForwardList(android.webkit.WebBackForwardList) Button(android.widget.Button) STARTSITE_ITEM(de.baumann.browser.database.RecordAction.STARTSITE_ITEM) WebView(android.webkit.WebView) GridItem(de.baumann.browser.view.GridItem) BottomNavigationView(com.google.android.material.bottomnavigation.BottomNavigationView) NotificationManager(android.app.NotificationManager) SRC_IMAGE_ANCHOR_TYPE(android.webkit.WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) ObjectAnimator(android.animation.ObjectAnimator) R(de.baumann.browser.R) List_protected(de.baumann.browser.browser.List_protected) WebStorage(android.webkit.WebStorage) BroadcastReceiver(android.content.BroadcastReceiver) ViewGroup(android.view.ViewGroup) DownloadManager(android.app.DownloadManager) Objects(java.util.Objects) List(java.util.List) TextView(android.widget.TextView) WindowInsets(android.view.WindowInsets) RelativeLayout(android.widget.RelativeLayout) BOOKMARK_ITEM(de.baumann.browser.database.RecordAction.BOOKMARK_ITEM) ListView(android.widget.ListView) OrientationEventListener(android.view.OrientationEventListener) BrowserContainer(de.baumann.browser.browser.BrowserContainer) SearchManager(android.app.SearchManager) Window(android.view.Window) Context(android.content.Context) ContextMenu(android.view.ContextMenu) TextInputEditText(com.google.android.material.textfield.TextInputEditText) List_standard(de.baumann.browser.browser.List_standard) KeyEvent(android.view.KeyEvent) AlertDialog(androidx.appcompat.app.AlertDialog) NinjaWebView(de.baumann.browser.view.NinjaWebView) Intent(android.content.Intent) MediaPlayer(android.media.MediaPlayer) NinjaToast(de.baumann.browser.view.NinjaToast) NavigationBarView(com.google.android.material.navigation.NavigationBarView) ClipData(android.content.ClipData) RecordAction(de.baumann.browser.database.RecordAction) SuppressLint(android.annotation.SuppressLint) SwipeTouchListener(de.baumann.browser.view.SwipeTouchListener) Build(android.os.Build) LinkedList(java.util.LinkedList) VideoView(android.widget.VideoView) BadgeUtils(com.google.android.material.badge.BadgeUtils) ActivityCompat(androidx.core.app.ActivityCompat) AlbumController(de.baumann.browser.browser.AlbumController) PopupMenu(androidx.appcompat.widget.PopupMenu) HandlerThread(android.os.HandlerThread) Bitmap(android.graphics.Bitmap) AdapterSearch(de.baumann.browser.view.AdapterSearch) Activity(android.app.Activity) Resources(android.content.res.Resources) AlertDialog(androidx.appcompat.app.AlertDialog) BadgeDrawable(com.google.android.material.badge.BadgeDrawable) List_trusted(de.baumann.browser.browser.List_trusted) MaterialAlertDialogBuilder(com.google.android.material.dialog.MaterialAlertDialogBuilder) SuppressLint(android.annotation.SuppressLint)

Aggregations

List_protected (de.baumann.browser.browser.List_protected)5 List_standard (de.baumann.browser.browser.List_standard)5 List_trusted (de.baumann.browser.browser.List_trusted)5 Uri (android.net.Uri)4 View (android.view.View)4 Button (android.widget.Button)4 ListView (android.widget.ListView)4 AlertDialog (androidx.appcompat.app.AlertDialog)4 MaterialAlertDialogBuilder (com.google.android.material.dialog.MaterialAlertDialogBuilder)4 SuppressLint (android.annotation.SuppressLint)3 Intent (android.content.Intent)3 Resources (android.content.res.Resources)3 TypedValue (android.util.TypedValue)3 WebView (android.webkit.WebView)3 GridView (android.widget.GridView)3 ImageButton (android.widget.ImageButton)3 ImageView (android.widget.ImageView)3 TextView (android.widget.TextView)3 VideoView (android.widget.VideoView)3 CardView (androidx.cardview.widget.CardView)3