import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
+import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.webkit.CookieManager;
import android.widget.EditText;
public class ViewSourceActivity extends AppCompatActivity {
// `activity` is used in `onCreate()` and `goBack()`.
- Activity activity;
+ private Activity activity;
// The color spans are used in `onCreate()` and `highlightUrlText()`.
private ForegroundColorSpan redColorSpan;
@Override
protected void onCreate(Bundle savedInstanceState) {
+ // Disable screenshots if not allowed.
+ if (!MainWebViewActivity.allowScreenshots) {
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
+ }
+
// Set the theme.
if (MainWebViewActivity.darkTheme) {
setTheme(R.style.PrivacyBrowserDark);