]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java
Fix the GUI displaying under the loading blocklists screen on restart. https://redmin...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / asynctasks / PopulateBlocklists.java
index e9e151f5df069c77273e6860c2995dcfb9cea4bb..af2bea14001fe28ea2b0f288a36c0f58a0cb96d0 100644 (file)
@@ -1,20 +1,20 @@
 /*
- * Copyright © 2019,2021 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2019,2021-2022 Soren Stoutner <soren@stoutner.com>.
  *
- * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+ * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
  *
- * Privacy Browser is free software: you can redistribute it and/or modify
+ * Privacy Browser Android is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  *
- * Privacy Browser is distributed in the hope that it will be useful,
+ * Privacy Browser Android is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>.
+ * along with Privacy Browser Android.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 package com.stoutner.privacybrowser.asynctasks;
@@ -23,11 +23,9 @@ import android.app.Activity;
 import android.content.Context;
 import android.os.AsyncTask;
 import android.view.View;
-import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
-import androidx.appcompat.widget.Toolbar;
 import androidx.drawerlayout.widget.DrawerLayout;
 
 import com.stoutner.privacybrowser.R;
@@ -74,14 +72,8 @@ public class PopulateBlocklists extends AsyncTask<Void, String, ArrayList<ArrayL
         }
 
         // Get handles for the views.
-        Toolbar toolbar = activity.findViewById(R.id.toolbar);
-        LinearLayout tabsLinearLayout = activity.findViewById(R.id.tabs_linearlayout);
         RelativeLayout loadingBlocklistsRelativeLayout = activity.findViewById(R.id.loading_blocklists_relativelayout);
 
-        // Hide the toolbar and tabs linear layout, which will be visible if this is being run after the app process has been killed in the background.
-        toolbar.setVisibility(View.GONE);
-        tabsLinearLayout.setVisibility(View.GONE);
-
         // Show the loading blocklists screen.
         loadingBlocklistsRelativeLayout.setVisibility(View.VISIBLE);
     }
@@ -222,14 +214,11 @@ public class PopulateBlocklists extends AsyncTask<Void, String, ArrayList<ArrayL
         }
 
         // Get handles for the views.
-        Toolbar toolbar = activity.findViewById(R.id.toolbar);
         DrawerLayout drawerLayout = activity.findViewById(R.id.drawerlayout);
-        LinearLayout tabsLinearLayout = activity.findViewById(R.id.tabs_linearlayout);
         RelativeLayout loadingBlocklistsRelativeLayout = activity.findViewById(R.id.loading_blocklists_relativelayout);
 
-        // Show the toolbar and tabs linear layout.
-        toolbar.setVisibility(View.VISIBLE);
-        tabsLinearLayout.setVisibility(View.VISIBLE);
+        // Show the drawer layout.
+        drawerLayout.setVisibility(View.VISIBLE);
 
         // Hide the loading blocklists screen.
         loadingBlocklistsRelativeLayout.setVisibility(View.GONE);