<body>
<h3>2.9 (version code 32)</h3>
- <p>9. Mai 2018 - Mindest-API 19, Ziel-API 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9. Mai 2018</a> - Mindest-API 19, Ziel-API 27</p>
<ul>
- <li>Verwendung des <a href="https://redmine.stoutner.com/issues/224">öffentlichen Download-Ordners</a>.</li>
+ <li>Verwendung des <a href="https://redmine.stoutner.com/issues/224">öffentlichen Download-Ordners</a> (requires <a href="https://redmine.stoutner.com/issues/79">write storage permission</a>).</li>
<li>Neue <a href="https://redmine.stoutner.com/issues/223">Einstellungen für die Block-List</a> in den Domain-Einstellungen.</li>
<li>Unterstützung vom <a href="https://redmine.stoutner.com/issues/268">Starten anderer Anwendungen mit Hilfe eigener URLs</a>.</li>
<li>Neue Hilfe zum <a href="https://redmine.stoutner.com/issues/247">Lesezeichen-Tab</a>.</li>
<body>
<h3>2.9 (version code 32)</h3>
- <p>9. Mai 2018 - Mindest-API 19, Ziel-API 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9. Mai 2018</a> - Mindest-API 19, Ziel-API 27</p>
<ul>
- <li>Verwendung des <a href="https://redmine.stoutner.com/issues/224">öffentlichen Download-Ordners</a>.</li>
+ <li>Verwendung des <a href="https://redmine.stoutner.com/issues/224">öffentlichen Download-Ordners</a> (requires <a href="https://redmine.stoutner.com/issues/79">write storage permission</a>).</li>
<li>Neue <a href="https://redmine.stoutner.com/issues/223">Einstellungen für die Block-List</a> in den Domain-Einstellungen.</li>
<li>Unterstützung vom <a href="https://redmine.stoutner.com/issues/268">Starten anderer Anwendungen mit Hilfe eigener URLs</a>.</li>
<li>Neue Hilfe zum <a href="https://redmine.stoutner.com/issues/247">Lesezeichen-Tab</a>.</li>
<body>
<h3>2.9 (version code 32)</h3>
- <p>9 May 2018 - minimum API 19, target API 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9 May 2018</a> - minimum API 19, target API 27</p>
<ul>
- <li>Use the <a href="https://redmine.stoutner.com/issues/224">public download directory</a>.</li>
+ <li>Use the <a href="https://redmine.stoutner.com/issues/224">public download directory</a> (requires <a href="https://redmine.stoutner.com/issues/79">write storage permission</a>).</li>
<li>Add <a href="https://redmine.stoutner.com/issues/223">controls for the block lists</a> to domain settings.</li>
<li>Support <a href="https://redmine.stoutner.com/issues/268">launching other apps using custom URLs</a>.</li>
<li>Add a <a href="https://redmine.stoutner.com/issues/247">bookmarks tab</a> to the guide.</li>
<body>
<h3>2.9 (version code 32)</h3>
- <p>9 May 2018 - minimum API 19, target API 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9 May 2018</a> - minimum API 19, target API 27</p>
<ul>
- <li>Use the <a href="https://redmine.stoutner.com/issues/224">public download directory</a>.</li>
+ <li>Use the <a href="https://redmine.stoutner.com/issues/224">public download directory</a> (requires <a href="https://redmine.stoutner.com/issues/79">write storage permission</a>).</li>
<li>Add <a href="https://redmine.stoutner.com/issues/223">controls for the block lists</a> to domain settings.</li>
<li>Support <a href="https://redmine.stoutner.com/issues/268">launching other apps using custom URLs</a>.</li>
<li>Add a <a href="https://redmine.stoutner.com/issues/247">bookmarks tab</a> to the guide.</li>
<body>
<h3>2.9 (código de versión 32)</h3>
- <p>9 de mayo de 2018 - API mínimo 19, API dirigido 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9 de mayo de 2018</a> - API mínimo 19, API dirigido 27</p>
<ul>
- <li>Usar el <a href="https://redmine.stoutner.com/issues/224">directorio público de descargas</a>.</li>
+ <li>Usar el <a href="https://redmine.stoutner.com/issues/224">directorio público de descargas</a>
+ (requiere <a href="https://redmine.stoutner.com/issues/79">el permiso de almacenamiento de escritura</a>).</li>
<li>Añadir <a href="https://redmine.stoutner.com/issues/223">controles para las listas de bloqueo</a> a la configuración del dominio.</li>
<li>Soporte para el <a href="https://redmine.stoutner.com/issues/268">lanzamiento de otras aplicaciones usando URLs personalizadas</a>.</li>
<li>Añadir una <a href="https://redmine.stoutner.com/issues/247">pestaña de favoritos</a> a la guía.</li>
<body>
<h3>2.9 (código de versión 32)</h3>
- <p>9 de mayo de 2018 - API mínimo 19, API dirigido 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9 de mayo de 2018</a> - API mínimo 19, API dirigido 27</p>
<ul>
- <li>Usar el <a href="https://redmine.stoutner.com/issues/224">directorio público de descargas</a>.</li>
+ <li>Usar el <a href="https://redmine.stoutner.com/issues/224">directorio público de descargas</a>
+ (requiere <a href="https://redmine.stoutner.com/issues/79">el permiso de almacenamiento de escritura</a>).</li>
<li>Añadir <a href="https://redmine.stoutner.com/issues/223">controles para las listas de bloqueo</a> a la configuración del dominio.</li>
<li>Soporte para el <a href="https://redmine.stoutner.com/issues/268">lanzamiento de otras aplicaciones usando URLs personalizadas</a>.</li>
<li>Añadir una <a href="https://redmine.stoutner.com/issues/247">pestaña de favoritos</a> a la guía.</li>
<body>
<h3>2.9 (versione codice 32)</h3>
- <p>9 Maggio 2018 - minima API 19, target API 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9 Maggio 2018</a> - minima API 19, target API 27</p>
<ul>
- <li>Utilizzo della <a href="https://redmine.stoutner.com/issues/224">cartella pubblica per il download</a>.</li>
+ <li>Utilizzo della <a href="https://redmine.stoutner.com/issues/224">cartella pubblica per il download</a>
+ (richiede <a href="https://redmine.stoutner.com/issues/79">il permesso di scrittura della memoria</a>).</li>
<li>Aggiunta di <a href="https://redmine.stoutner.com/issues/223">controlli delle Block List</a> alle impostazioni dei domini.</li>
<li>Supporto per <a href="https://redmine.stoutner.com/issues/268">il lancio di altre App utilizzando URL personalizzate</a>.</li>
<li>Aggiunta di una <a href="https://redmine.stoutner.com/issues/247">scheda dei segnalibri</a> nella guida.</li>
<body>
<h3>2.9 (versione codice 32)</h3>
- <p>9 Maggio 2018 - minima API 19, target API 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9 Maggio 2018</a> - minima API 19, target API 27</p>
<ul>
- <li>Utilizzo della <a href="https://redmine.stoutner.com/issues/224">cartella pubblica per il download</a>.</li>
+ <li>Utilizzo della <a href="https://redmine.stoutner.com/issues/224">cartella pubblica per il download</a>
+ (richiede <a href="https://redmine.stoutner.com/issues/79">il permesso di scrittura della memoria</a>).</li>
<li>Aggiunta di <a href="https://redmine.stoutner.com/issues/223">controlli delle Block List</a> alle impostazioni dei domini.</li>
<li>Supporto per <a href="https://redmine.stoutner.com/issues/268">il lancio di altre App utilizzando URL personalizzate</a>.</li>
<li>Aggiunta di una <a href="https://redmine.stoutner.com/issues/247">scheda dei segnalibri</a> nella guida.</li>
<body>
<h3>2.9 (код версии 32)</h3>
- <p>9 мая 2018 года - minimum API 19, target API 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9 мая 2018 года</a> - minimum API 19, target API 27</p>
<ul>
- <li>Использование <a href="https://redmine.stoutner.com/issues/224">общей папки загрузок</a>.</li>
+ <li>Использование <a href="https://redmine.stoutner.com/issues/224">общей папки загрузок</a> (требуется <a href="https://redmine.stoutner.com/issues/79">разрешение на доступ к хранилищу</a>).</li>
<li>Добавлены <a href="https://redmine.stoutner.com/issues/223">элементы управления для списков блокировок</a> в настройки домена.</li>
<li>Поддержка <a href="https://redmine.stoutner.com/issues/268">запуска сторонних приложений по URL-адресу</a>.</li>
<li>Добавлена <a href="https://redmine.stoutner.com/issues/247">вкладка закладок</a> в руководство.</li>
<body>
<h3>2.9 (код версии 32)</h3>
- <p>9 мая 2018 года - minimum API 19, target API 27</p>
+ <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=39cde1235af331de5e5ff454ac2daf667d7d894f">9 мая 2018 года</a> - minimum API 19, target API 27</p>
<ul>
- <li>Использование <a href="https://redmine.stoutner.com/issues/224">общей папки загрузок</a>.</li>
+ <li>Использование <a href="https://redmine.stoutner.com/issues/224">общей папки загрузок</a> (требуется <a href="https://redmine.stoutner.com/issues/79">разрешение на доступ к хранилищу</a>).</li>
<li>Добавлены <a href="https://redmine.stoutner.com/issues/223">элементы управления для списков блокировок</a> в настройки домена.</li>
<li>Поддержка <a href="https://redmine.stoutner.com/issues/268">запуска сторонних приложений по URL-адресу</a>.</li>
<li>Добавлена <a href="https://redmine.stoutner.com/issues/247">вкладка закладок</a> в руководство.</li>
import com.stoutner.privacybrowser.BannerAd;
import com.stoutner.privacybrowser.BuildConfig;
import com.stoutner.privacybrowser.R;
-import com.stoutner.privacybrowser.dialogs.AddDomainDialog;
import com.stoutner.privacybrowser.dialogs.CreateBookmarkDialog;
import com.stoutner.privacybrowser.dialogs.CreateBookmarkFolderDialog;
import com.stoutner.privacybrowser.dialogs.CreateHomeScreenShortcutDialog;
import java.util.Set;
// AppCompatActivity from android.support.v7.app.AppCompatActivity must be used to have access to the SupportActionBar until the minimum API is >= 21.
-public class MainWebViewActivity extends AppCompatActivity implements AddDomainDialog.AddDomainListener, CreateBookmarkDialog.CreateBookmarkListener,
- CreateBookmarkFolderDialog.CreateBookmarkFolderListener, CreateHomeScreenShortcutDialog.CreateHomeScreenSchortcutListener, DownloadFileDialog.DownloadFileListener,
- DownloadImageDialog.DownloadImageListener, DownloadLocationPermissionDialog.DownloadLocationPermissionDialogListener, EditBookmarkDialog.EditBookmarkListener,
- EditBookmarkFolderDialog.EditBookmarkFolderListener, HttpAuthenticationDialog.HttpAuthenticationListener, NavigationView.OnNavigationItemSelectedListener,
- PinnedSslCertificateMismatchDialog.PinnedSslCertificateMismatchListener, SslCertificateErrorDialog.SslCertificateErrorListener, UrlHistoryDialog.UrlHistoryListener {
+public class MainWebViewActivity extends AppCompatActivity implements CreateBookmarkDialog.CreateBookmarkListener, CreateBookmarkFolderDialog.CreateBookmarkFolderListener,
+ CreateHomeScreenShortcutDialog.CreateHomeScreenSchortcutListener, DownloadFileDialog.DownloadFileListener, DownloadImageDialog.DownloadImageListener,
+ DownloadLocationPermissionDialog.DownloadLocationPermissionDialogListener, EditBookmarkDialog.EditBookmarkListener, EditBookmarkFolderDialog.EditBookmarkFolderListener,
+ HttpAuthenticationDialog.HttpAuthenticationListener, NavigationView.OnNavigationItemSelectedListener, PinnedSslCertificateMismatchDialog.PinnedSslCertificateMismatchListener,
+ SslCertificateErrorDialog.SslCertificateErrorListener, UrlHistoryDialog.UrlHistoryListener {
// `darkTheme` is public static so it can be accessed from `AboutActivity`, `GuideActivity`, `AddDomainDialog`, `SettingsActivity`, `DomainsActivity`, `DomainsListFragment`, `BookmarksActivity`,
// `BookmarksDatabaseViewActivity`, `CreateBookmarkDialog`, `CreateBookmarkFolderDialog`, `DownloadFileDialog`, `DownloadImageDialog`, `EditBookmarkDialog`, `EditBookmarkFolderDialog`,
// Make it so.
startActivity(domainsIntent);
} else { // Add a new domain.
- // Show the add domain `AlertDialog`.
- AppCompatDialogFragment addDomainDialog = new AddDomainDialog();
- addDomainDialog.show(getSupportFragmentManager(), getResources().getString(R.string.add_domain));
+ // Apply the new domain settings on returning to `MainWebViewActivity`.
+ reapplyDomainSettingsOnRestart = true;
+ currentDomainName = "";
+
+ // Get the current domain
+ Uri currentUri = Uri.parse(formattedUrlString);
+ String currentDomain = currentUri.getHost();
+
+ // Initialize the database handler. The `0` specifies the database version, but that is ignored and set instead using a constant in `DomainsDatabaseHelper`.
+ DomainsDatabaseHelper domainsDatabaseHelper = new DomainsDatabaseHelper(this, null, null, 0);
+
+ // Create the domain and store the database ID.
+ int newDomainDatabaseId = domainsDatabaseHelper.addDomain(currentDomain);
+
+ // Create an intent to launch the domains activity.
+ Intent domainsIntent = new Intent(this, DomainsActivity.class);
+
+ // Put extra information instructing the domains activity to directly load the new domain.
+ domainsIntent.putExtra("LoadDomain", newDomainDatabaseId);
+
+ // Make it so.
+ startActivity(domainsIntent);
}
return true;
}
}
- @Override
- public void onAddDomain(AppCompatDialogFragment dialogFragment) {
- // Reapply the domain settings on returning to `MainWebViewActivity`.
- reapplyDomainSettingsOnRestart = true;
- currentDomainName = "";
-
- // Get the new domain name `String` from `dialogFragment`.
- EditText domainNameEditText = dialogFragment.getDialog().findViewById(R.id.domain_name_edittext);
- String domainNameString = domainNameEditText.getText().toString();
-
- // Initialize the database handler. `this` specifies the context. The two `nulls` do not specify the database name or a `CursorFactory`.
- // The `0` specifies the database version, but that is ignored and set instead using a constant in `DomainsDatabaseHelper`.
- DomainsDatabaseHelper domainsDatabaseHelper = new DomainsDatabaseHelper(this, null, null, 0);
-
- // Create the domain and store the database ID in `currentDomainDatabaseId`.
- int newDomainDatabaseId = domainsDatabaseHelper.addDomain(domainNameString);
-
- // Create an intent to launch the domains activity.
- Intent domainsIntent = new Intent(this, DomainsActivity.class);
-
- // Put extra information instructing the domains activity to directly load the current domain.
- domainsIntent.putExtra("LoadDomain", newDomainDatabaseId);
-
- // Make it so.
- startActivity(domainsIntent);
- }
-
@Override
public void onCreateBookmark(AppCompatDialogFragment dialogFragment) {
// Get the `EditTexts` from the `dialogFragment`.
/*
- * Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2017-2018 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
*
// Set the title.
dialogBuilder.setTitle(R.string.add_domain);
- // Set the view. The parent view is `null` because it will be assigned by the `AlertDialog`.
+ // Remove the incorrect lint warning below that `getActivity()` might be null.
+ assert getActivity() != null;
+
+ // Set the view. The parent view is `null` because it will be assigned by the alert dialog.
dialogBuilder.setView(getActivity().getLayoutInflater().inflate(R.layout.add_domain_dialog, null));
- // Set an `onClick()` listener for the negative button.
+ // Set a listener for the negative button.
dialogBuilder.setNegativeButton(R.string.cancel, (DialogInterface dialog, int which) -> {
// Do nothing. The `AlertDialog` will close automatically.
});
- // Set an `onClick()` listener for the positive button.
+ // Set a listener for the positive button.
dialogBuilder.setPositiveButton(R.string.add, (DialogInterface dialog, int which) -> {
// Return the `DialogFragment` to the parent activity on add.
addDomainListener.onAddDomain(AddDomainDialog.this);
});
- // Create an `AlertDialog` from the `AlertDialog.Builder`.
+ // Create an alert dialog from the builder.
final AlertDialog alertDialog = dialogBuilder.create();
- // Remove the warning below that `setSoftInputMode` might produce `java.lang.NullPointerException`.
+ // Remove the warning below that `setSoftInputMode` might be null.
assert alertDialog.getWindow() != null;
- // Show the keyboard when the `AlertDialog` is displayed on the screen.
+ // Show the keyboard when the alert dialog is displayed on the screen.
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
- // The `AlertDialog` must be shown before the contents can be edited.
+ // The alert dialog must be shown before the contents can be edited.
alertDialog.show();
- // Initialize `domainsDatabaseHelper`. The two `nulls` do not specify the database name or a `CursorFactory`. The `0` specifies the database version, but that is ignored and set instead using a constant in `DomainsDatabaseHelper`.
+ // Initialize `domainsDatabaseHelper`. The `0` specifies the database version, but that is ignored and set instead using a constant in `DomainsDatabaseHelper`.
final DomainsDatabaseHelper domainsDatabaseHelper = new DomainsDatabaseHelper(getContext(), null, null, 0);
- // Get handles for the views in `alertDialog`.
+ // Get handles for the views in the alert dialog.
final EditText addDomainEditText = alertDialog.findViewById(R.id.domain_name_edittext);
final TextView domainNameAlreadyExistsTextView = alertDialog.findViewById(R.id.domain_name_already_exists_textview);
final Button addButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
- // Update the status of the warning text and the `add` button.
+ // Update the status of the warning text and the add button.
addDomainEditText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
// Show the warning text.
domainNameAlreadyExistsTextView.setVisibility(View.VISIBLE);
- // Disable the `add` button.
+ // Disable the add button.
addButton.setEnabled(false);
} else { // The domain do not yet exist.
// Hide the warning text.
domainNameAlreadyExistsTextView.setVisibility(View.GONE);
- // Enable the `add` button.
+ // Enable the add button.
addButton.setEnabled(true);
}
}
-• Use the public download directory.
+• Use the public download directory (requires write storage permission).
• Add controls for the block lists to domain settings.
• Support launching other apps using custom URLs.
• Add a bookmarks tab to the guide.
-• Usar el directorio público de descargas.
+• Usar el directorio público de descargas (requiere el permiso de almacenamiento de escritura).
• Añadir controles para las listas de bloqueo a la configuración del dominio.
• Soporte para el lanzamiento de otras aplicaciones usando URLs personalizadas.
• Añadir una pestaña de favoritos a la guía.
-• Utilizzo della cartella pubblica per il download.
+• Utilizzo della cartella pubblica per il download (richiede il permesso di scrittura della memoria).
• Aggiunta di controlli delle Block List alle impostazioni dei domini.
• Supporto per il lancio di altre App utilizzando URL personalizzate.
• Aggiunta di una scheda dei segnalibri nella guida.
-• Использование общей папки загрузок.
+• Использование общей папки загрузок (требуется разрешение на доступ к хранилищу).
• Добавлены элементы управления для списков блокировок в настройки домена.
• Поддержка запуска сторонних приложений по URL-адресу.
• Добавлена вкладка закладок в руководство.