Add on-the-fly blocklist controls. https://redmine.stoutner.com/issues/279
[PrivacyBrowser.git] / app / src / main / java / com / stoutner / privacybrowser / activities / GuideActivity.java
index a419ff91030790058ecc121426d91e40bb0fd298..856aa5d57163802fdd4c92e6d1dea72e787e48ff 100644 (file)
@@ -28,6 +28,7 @@ import android.support.v4.view.ViewPager;
 import android.support.v7.app.ActionBar;
 import android.support.v7.app.AppCompatActivity;
 import android.support.v7.widget.Toolbar;
+import android.view.WindowManager;
 
 import com.stoutner.privacybrowser.fragments.GuideTabFragment;
 import com.stoutner.privacybrowser.R;
@@ -35,6 +36,11 @@ import com.stoutner.privacybrowser.R;
 public class GuideActivity extends AppCompatActivity {
     @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_SecondaryActivity);
@@ -76,7 +82,7 @@ public class GuideActivity extends AppCompatActivity {
         @Override
         // Get the count of the number of tabs.
         public int getCount() {
-            return 8;
+            return 9;
         }
 
         @Override
@@ -107,6 +113,9 @@ public class GuideActivity extends AppCompatActivity {
                 case 7:
                     return getString(R.string.tracking_ids);
 
+                case 8:
+                    return getString(R.string.bookmarks);
+
                 default:
                     return "";
             }
@@ -118,5 +127,4 @@ public class GuideActivity extends AppCompatActivity {
             return GuideTabFragment.createTab(tab);
         }
     }
-
 }