diff --git a/owncloudApp/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java b/owncloudApp/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
index 95b44927b5b..377ca220e42 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
@@ -71,6 +71,7 @@
 import android.webkit.WebView;
 import android.widget.Button;
 import android.widget.EditText;
+import android.widget.FrameLayout;
 import android.widget.TextView;
 import android.widget.TextView.OnEditorActionListener;
 import android.widget.Toast;
@@ -113,6 +114,7 @@
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
 import com.owncloud.android.ui.errorhandling.ErrorMessageAdapter;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
@@ -305,9 +307,15 @@ protected void onCreate(Bundle savedInstanceState) {
         /// load user interface
         setContentView(R.layout.account_setup);
 
+        // Allow or disallow touches with other visible windows
+        FrameLayout loginLayout = findViewById(R.id.login_layout);
+        loginLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         // Set login background color or image
         if (!getResources().getBoolean(R.bool.use_login_background_image)) {
-            findViewById(R.id.login_layout).setBackgroundColor(
+            loginLayout.setBackgroundColor(
                     getResources().getColor(R.color.login_background_color)
             );
         } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
diff --git a/owncloudApp/src/main/java/com/owncloud/android/media/MediaControlView.java b/owncloudApp/src/main/java/com/owncloud/android/media/MediaControlView.java
index e2d98536994..2f6946b5b1c 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/media/MediaControlView.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/media/MediaControlView.java
@@ -3,6 +3,7 @@
  *
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -40,51 +41,58 @@
 import android.widget.SeekBar.OnSeekBarChangeListener;
 import android.widget.TextView;
 
-import java.util.Formatter;
-import java.util.Locale;
-
 import com.owncloud.android.R;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.PreferenceUtils;
+
+import java.util.Formatter;
+import java.util.Locale;
 
 
 /**
  * View containing controls for a {@link MediaPlayer}. 
- * 
+ *
  * Holds buttons "play / pause", "rewind", "fast forward" 
  * and a progress slider. 
- * 
+ *
  * It synchronizes itself with the state of the 
  * {@link MediaPlayer}.
  */
 
 public class MediaControlView extends FrameLayout implements OnClickListener, OnSeekBarChangeListener {
 
-    private MediaPlayerControl  mPlayer;
-    private Context             mContext;
-    private View                mRoot;
-    private ProgressBar         mProgress;
-    private TextView            mEndTime, mCurrentTime;
-    private boolean             mDragging;
-    private static final int    SHOW_PROGRESS = 1;
-    StringBuilder               mFormatBuilder;
-    Formatter                   mFormatter;
-    private ImageButton         mPauseButton;
-    private ImageButton         mFfwdButton;
-    private ImageButton         mRewButton;
-    
+    private MediaPlayerControl mPlayer;
+    private Context mContext;
+    private View mRoot;
+    private ProgressBar mProgress;
+    private TextView mEndTime, mCurrentTime;
+    private boolean mDragging;
+    private static final int SHOW_PROGRESS = 1;
+    StringBuilder mFormatBuilder;
+    Formatter mFormatter;
+    private ImageButton mPauseButton;
+    private ImageButton mFfwdButton;
+    private ImageButton mRewButton;
+
     public MediaControlView(Context context, AttributeSet attrs) {
         super(context, attrs);
         mContext = context;
-        
+
         FrameLayout.LayoutParams frameParams = new FrameLayout.LayoutParams(
                 ViewGroup.LayoutParams.MATCH_PARENT,
                 ViewGroup.LayoutParams.MATCH_PARENT
         );
         LayoutInflater inflate = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         mRoot = inflate.inflate(R.layout.media_control, null);
+
+        // Allow or disallow touches with other visible windows
+        mRoot.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(context)
+        );
+
         initControllerView(mRoot);
         addView(mRoot, frameParams);
-        
+
         setFocusable(true);
         setFocusableInTouchMode(true);
         setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
index e1f53b67685..948f0b217fb 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
@@ -51,6 +51,7 @@
 import com.owncloud.android.lib.common.OwnCloudAccount;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 /**
  * Base class to handle setup of the drawer implementation including user switching and avatar fetching and fallback
@@ -105,8 +106,19 @@ protected void setupDrawer(int menuItemId) {
      */
     protected void setupDrawer() {
         mDrawerLayout = findViewById(R.id.drawer_layout);
+
+        // Allow or disallow touches with other visible windows
+        mDrawerLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         mNavigationView = findViewById(R.id.nav_view);
 
+        // Allow or disallow touches with other visible windows
+        mNavigationView.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         if (mNavigationView != null) {
             mDrawerLogo = findViewById(R.id.drawer_logo);
 
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ErrorsWhileCopyingHandlerActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ErrorsWhileCopyingHandlerActivity.java
index e4d48ed23bc..5e79c83c0ac 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ErrorsWhileCopyingHandlerActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ErrorsWhileCopyingHandlerActivity.java
@@ -3,6 +3,7 @@
  *
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -40,6 +41,7 @@
 import android.view.ViewGroup;
 import android.widget.ArrayAdapter;
 import android.widget.Button;
+import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.Toast;
@@ -48,26 +50,25 @@
 import com.owncloud.android.datamodel.FileDataStorageManager;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.common.utils.Log_OC;
-
 import com.owncloud.android.ui.dialog.LoadingDialog;
 import com.owncloud.android.utils.FileStorageUtils;
-
+import com.owncloud.android.utils.PreferenceUtils;
 
 
 /**
  * Activity reporting errors occurred when local files uploaded to an ownCloud account with an app
  * in version under 1.3.16 where being copied to the ownCloud local folder.
- * 
+ *
  * Allows the user move the files to the ownCloud local folder. let them unlinked to the remote
  * files.
- * 
+ *
  * Shown when the error notification summarizing the list of errors is clicked by the user.
  */
-public class ErrorsWhileCopyingHandlerActivity  extends AppCompatActivity
+public class ErrorsWhileCopyingHandlerActivity extends AppCompatActivity
         implements OnClickListener {
 
     private static final String TAG = ErrorsWhileCopyingHandlerActivity.class.getSimpleName();
-    
+
     public static final String EXTRA_ACCOUNT =
             ErrorsWhileCopyingHandlerActivity.class.getCanonicalName() + ".KEY_ACCOUNT";
     public static final String EXTRA_LOCAL_PATHS =
@@ -114,7 +115,13 @@ protected void onCreate(Bundle savedInstanceState) {
                 appName, appName, appName, appName, mAccount.name);
         textView.setText(message);
         textView.setMovementMethod(new ScrollingMovementMethod());
-        
+
+        // Allow or disallow touches with other visible windows
+        LinearLayout alertDialogListViewLayout = findViewById(R.id.alertDialogListViewLayout);
+        alertDialogListViewLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         /// load the list of local and remote files that failed
         ListView listView = findViewById(R.id.list);
         if (mLocalPaths != null && mLocalPaths.size() > 0) {
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java
index f55c721534a..f9fb5ca63fd 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java
@@ -100,6 +100,7 @@
 import com.owncloud.android.utils.Extras;
 import com.owncloud.android.utils.FileStorageUtils;
 import com.owncloud.android.utils.PermissionUtil;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -526,10 +527,12 @@ public boolean onPrepareOptionsMenu(Menu menu) {
     public boolean onCreateOptionsMenu(Menu menu) {
         MenuInflater inflater = getMenuInflater();
 
-        // Prevent tapjacking
+        // Allow or disallow touches with other visible windows
         View actionBarView = findViewById(R.id.action_bar);
         if (actionBarView != null) {
-            actionBarView.setFilterTouchesWhenObscured(true);
+            actionBarView.setFilterTouchesWhenObscured(
+                    PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getApplicationContext())
+            );
         }
 
         inflater.inflate(R.menu.main_menu, menu);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.java
index a438bbb9867..43eeeee0619 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.java
@@ -2,6 +2,7 @@
  *   ownCloud Android client application
  *
  *   @author Shashvat Kedia
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -40,6 +41,7 @@
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.Button;
+import android.widget.LinearLayout;
 
 import com.owncloud.android.R;
 import com.owncloud.android.datamodel.OCFile;
@@ -52,9 +54,10 @@
 import com.owncloud.android.operations.common.SyncOperation;
 import com.owncloud.android.syncadapter.FileSyncAdapter;
 import com.owncloud.android.ui.dialog.CreateFolderDialogFragment;
+import com.owncloud.android.ui.errorhandling.ErrorMessageAdapter;
 import com.owncloud.android.ui.fragment.FileFragment;
 import com.owncloud.android.ui.fragment.OCFileListFragment;
-import com.owncloud.android.ui.errorhandling.ErrorMessageAdapter;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.ArrayList;
 
@@ -84,6 +87,12 @@ protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState); 
 
         setContentView(R.layout.files_folder_picker);     // beware - inflated in other activities too
+
+        // Allow or disallow touches with other visible windows
+        LinearLayout filesFolderPickerLayout = findViewById(R.id.filesFolderPickerLayout);
+        filesFolderPickerLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
         
         if (savedInstanceState == null) {
             createFragments();
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/GenericExplanationActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/GenericExplanationActivity.java
index eb18dd30932..e3deb5598ce 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/GenericExplanationActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/GenericExplanationActivity.java
@@ -3,6 +3,7 @@
  *
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -31,20 +32,22 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ArrayAdapter;
+import android.widget.LinearLayout;
 import android.widget.ListAdapter;
 import android.widget.ListView;
 import android.widget.TextView;
 
 import com.owncloud.android.R;
+import com.owncloud.android.utils.PreferenceUtils;
 
 
 /**
  * Activity showing a text message and, optionally, a couple list of single or paired text strings.
- * 
+ *
  * Added to show explanations for notifications when the user clicks on them, and there no place
  * better to show them.
  */
-public class GenericExplanationActivity  extends AppCompatActivity {
+public class GenericExplanationActivity extends AppCompatActivity {
 
     public static final String EXTRA_LIST = GenericExplanationActivity.class.getCanonicalName() +
             ".EXTRA_LIST";
@@ -52,25 +55,31 @@ public class GenericExplanationActivity  extends AppCompatActivity {
             ".EXTRA_LIST_2";
     public static final String MESSAGE = GenericExplanationActivity.class.getCanonicalName() +
             ".MESSAGE";
-    
-    
+
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        
+
         Intent intent = getIntent();
-        String message = intent.getStringExtra(MESSAGE); 
+        String message = intent.getStringExtra(MESSAGE);
         ArrayList<String> list = intent.getStringArrayListExtra(EXTRA_LIST);
         ArrayList<String> list2 = intent.getStringArrayListExtra(EXTRA_LIST_2);
-        
+
         setContentView(R.layout.generic_explanation);
-        
+
         if (message != null) {
             TextView textView = findViewById(R.id.message);
             textView.setText(message);
             textView.setMovementMethod(new ScrollingMovementMethod());
         }
-        
+
+        // Allow or disallow touches with other visible windows
+        LinearLayout alertDialogListViewLayout = findViewById(R.id.alertDialogListViewLayout);
+        alertDialogListViewLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         ListView listView = findViewById(R.id.list);
         if (list != null && list.size() > 0) {
             //ListAdapter adapter = new ArrayAdapter<String>(this,
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/LocalFolderPickerActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/LocalFolderPickerActivity.java
index cdc1ba18f9c..73c2cafd28e 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/LocalFolderPickerActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/LocalFolderPickerActivity.java
@@ -3,6 +3,7 @@
  *
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -25,18 +26,19 @@
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Environment;
-import androidx.annotation.Nullable;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentTransaction;
-import androidx.appcompat.app.ActionBar;
 import android.view.MenuItem;
 import android.view.View;
 import android.widget.Button;
 import android.widget.ImageButton;
-
+import android.widget.LinearLayout;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.ActionBar;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.ui.fragment.LocalFileListFragment;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.File;
 
@@ -99,6 +101,13 @@ public void onCreate(Bundle savedInstanceState) {
 
         // inflate and set the layout view
         setContentView(R.layout.files_folder_picker);   // beware - inflated in other activities too
+
+        // Allow or disallow touches with other visible windows
+        LinearLayout filesFolderPickerLayout = findViewById(R.id.filesFolderPickerLayout);
+        filesFolderPickerLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         if (savedInstanceState == null) {
             createFragments();
        }
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java
index 0df7bec0215..4f57425b3cc 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java
@@ -34,12 +34,14 @@
 import androidx.recyclerview.widget.RecyclerView;
 import android.view.MenuItem;
 import android.widget.Button;
+import android.widget.LinearLayout;
 
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.ui.adapter.LogListAdapter;
 import com.owncloud.android.ui.dialog.LoadingDialog;
 import com.owncloud.android.utils.FileStorageUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -68,6 +70,13 @@ protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
         setContentView(R.layout.logs);
+
+        // Allow or disallow touches with other visible windows
+        LinearLayout logsLayout = findViewById(R.id.logsLayout);
+        logsLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         setupToolbar();
 
         RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ManageAccountsActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ManageAccountsActivity.java
index 48d7964e89c..9f7e94a197d 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ManageAccountsActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ManageAccountsActivity.java
@@ -53,6 +53,7 @@
 import com.owncloud.android.ui.adapter.AccountListItem;
 import com.owncloud.android.ui.dialog.RemoveAccountDialogFragment;
 import com.owncloud.android.ui.helpers.FileOperationsHelper;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -94,7 +95,9 @@ protected void onCreate(Bundle savedInstanceState) {
         setContentView(R.layout.accounts_layout);
 
         mListView = findViewById(R.id.account_list);
-        mListView.setFilterTouchesWhenObscured(true);
+        mListView.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getApplicationContext())
+        );
 
         setupToolbar();
         updateActionBarTitleAndHomeButtonByString(getResources().getString(R.string.prefs_manage_accounts));
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ManageSpaceActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ManageSpaceActivity.java
index fb848554c09..fa63883b73b 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ManageSpaceActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ManageSpaceActivity.java
@@ -3,6 +3,7 @@
  *
  *   @author masensio
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -29,13 +30,14 @@
 import androidx.appcompat.app.ActionBar;
 import androidx.appcompat.app.AppCompatActivity;
 import android.view.MenuItem;
-import android.view.View;
 import android.widget.Button;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.utils.FileStorageUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.File;
 
@@ -50,6 +52,12 @@ protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_manage_space);
 
+        // Allow or disallow touches with other visible windows
+        LinearLayout manageSpaceLayout = findViewById(R.id.manage_space_layout);
+        manageSpaceLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         ActionBar actionBar = getSupportActionBar();
         actionBar.setDisplayHomeAsUpEnabled(true);
         actionBar.setTitle(R.string.manage_space_title);
@@ -58,12 +66,9 @@ protected void onCreate(Bundle savedInstanceState) {
         descriptionTextView.setText(getString(R.string.manage_space_description, getString(R.string.app_name)));
 
         Button clearDataButton = findViewById(R.id.clearDataButton);
-        clearDataButton.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                ClearDataAsynTask clearDataTask = new ClearDataAsynTask();
-                clearDataTask.execute();
-            }
+        clearDataButton.setOnClickListener(v -> {
+            ClearDataAsynTask clearDataTask = new ClearDataAsynTask();
+            clearDataTask.execute();
         });
     }
 
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PassCodeActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PassCodeActivity.java
index e2a5a80a6bd..d39aaf4c556 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PassCodeActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PassCodeActivity.java
@@ -5,6 +5,7 @@
  *   @author masensio
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2011 Bartek Przybylski
  *   Copyright (C) 2019 ownCloud GmbH.
  *
@@ -28,7 +29,6 @@
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 import com.google.android.material.snackbar.Snackbar;
-import androidx.appcompat.app.AppCompatActivity;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.view.KeyEvent;
@@ -37,11 +37,13 @@
 import android.view.WindowManager;
 import android.widget.Button;
 import android.widget.EditText;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.owncloud.android.BuildConfig;
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.Arrays;
 
@@ -95,9 +97,18 @@ protected void onCreate(Bundle savedInstanceState) {
 
         setContentView(R.layout.passcodelock);
 
+        // Allow or disallow touches with other visible windows
+        LinearLayout passcodeLockLayout = findViewById(R.id.passcodeLockLayout);
+        passcodeLockLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         mBCancel = findViewById(R.id.cancel);
         mPassCodeHdr = findViewById(R.id.header);
         mPassCodeHdrExplanation = findViewById(R.id.explanation);
+        mPassCodeHdrExplanation.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
         mPassCodeEditTexts[0] = findViewById(R.id.txt0);
         mPassCodeEditTexts[0].requestFocus();
         getWindow().setSoftInputMode(
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PatternLockActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PatternLockActivity.java
index 421e171f441..5663293aede 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PatternLockActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PatternLockActivity.java
@@ -3,17 +3,18 @@
  *
  * @author Shashvat Kedia
  * @author Christian Schabesberger
+ * @author David González Verdugo
  * Copyright (C) 2019 ownCloud GmbH.
- * <p>
+ *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2,
  * as published by the Free Software Foundation.
- * <p>
+ *
  * This program 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.
- * <p>
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -22,14 +23,15 @@
 
 import android.content.Intent;
 import android.content.SharedPreferences;
+import android.os.Bundle;
 import android.preference.PreferenceManager;
 import com.google.android.material.snackbar.Snackbar;
 import androidx.appcompat.app.AppCompatActivity;
-import android.os.Bundle;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.WindowManager;
 import android.widget.Button;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import com.andrognito.patternlockview.PatternLockView;
@@ -38,6 +40,7 @@
 import com.owncloud.android.BuildConfig;
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.List;
 
@@ -74,10 +77,17 @@ protected void onCreate(Bundle savedInstanceState) {
             getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
         }
         setContentView(R.layout.activity_pattern_lock);
+
+        // Allow or disallow touches with other visible windows
+        RelativeLayout activityPatternLockLayout = findViewById(R.id.activityPatternLockLayout);
+        activityPatternLockLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         String mPatternHeaderViewText = "";
         /**
-        * mPatternExpShouldVisible holds the boolean value that signifies weather the patternExpView should be visible or not.
-        * it is set to true when the pattern is set and when the pattern is removed.
+         * mPatternExpShouldVisible holds the boolean value that signifies weather the patternExpView should be visible or not.
+         * it is set to true when the pattern is set and when the pattern is removed.
          */
         boolean mPatternExpShouldVisible = false;
         mPatternHeader = findViewById(R.id.header_pattern);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/Preferences.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/Preferences.java
index f3d6163fe0c..0edac6d4bd3 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/Preferences.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/Preferences.java
@@ -7,16 +7,16 @@
  * @author Christian Schabesberger
  * Copyright (C) 2011  Bartek Przybylski
  * Copyright (C) 2019 ownCloud GmbH.
- * <p>
+ *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2,
  * as published by the Free Software Foundation.
- * <p>
+ *
  * This program 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.
- * <p>
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -56,6 +56,7 @@
 import com.owncloud.android.files.services.CameraUploadsHandler;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import org.jetbrains.annotations.NotNull;
 
@@ -79,30 +80,35 @@ public class Preferences extends PreferenceActivity {
     private static final int ACTION_REQUEST_PATTERN = 7;
     private static final int ACTION_CONFIRM_PATTERN = 8;
 
-    private CheckBoxPreference pPasscode;
-    private CheckBoxPreference pPattern;
-    private CheckBoxPreference pFingerprint;
-    private AppCompatDelegate mDelegate;
-
-    private String mUploadPath;
-    private String mUploadVideoPath;
-    private String mSourcePath;
-    private boolean patternSet;
-    private boolean passcodeSet;
+    public static final String PREFERENCE_TOUCHES_WITH_OTHER_VISIBLE_WINDOWS = "touches_with_other_visible_windows";
 
     private PreferenceCategory mPrefCameraUploadsCategory;
-    private Preference mPrefCameraPictureUploads;
+    private CheckBoxPreference mPrefCameraPictureUploads;
     private Preference mPrefCameraPictureUploadsPath;
     private Preference mPrefCameraPictureUploadsWiFi;
-    private Preference mPrefCameraVideoUploads;
+    private CheckBoxPreference mPrefCameraVideoUploads;
     private Preference mPrefCameraVideoUploadsPath;
     private Preference mPrefCameraVideoUploadsWiFi;
     private Preference mPrefCameraUploadsSourcePath;
     private Preference mPrefCameraUploadsBehaviour;
 
+    private String mUploadPath;
+    private String mUploadVideoPath;
+    private String mSourcePath;
+
     private CameraUploadsHandler mCameraUploadsHandler;
 
+    private PreferenceCategory mPrefSecurityCategory;
+    private CheckBoxPreference mPasscode;
+    private CheckBoxPreference mPattern;
+    private CheckBoxPreference mFingerprint;
     private FingerprintManager mFingerprintManager;
+    private boolean patternSet;
+    private boolean passcodeSet;
+    private CheckBoxPreference mPrefTouchesWithOtherVisibleWindows;
+
+    private Preference mAboutApp;
+    private AppCompatDelegate mDelegate;
 
     @SuppressWarnings("deprecation")
     @Override
@@ -138,6 +144,10 @@ public void onCreate(Bundle savedInstanceState) {
         // Register context menu for list of preferences.
         registerForContextMenu(getListView());
 
+        getListView().setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getApplicationContext())
+        );
+
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
             mFingerprintManager = FingerprintManager.getFingerprintManager(this);
         }
@@ -145,7 +155,10 @@ public void onCreate(Bundle savedInstanceState) {
         /*
          * Camera uploads
          */
+
         // Pictures
+        mPrefCameraPictureUploads = (CheckBoxPreference) findPreference("camera_picture_uploads");
+
         mPrefCameraPictureUploadsPath = findPreference("camera_picture_uploads_path");
         if (mPrefCameraPictureUploadsPath != null) {
 
@@ -163,24 +176,24 @@ public void onCreate(Bundle savedInstanceState) {
         mPrefCameraUploadsCategory = (PreferenceCategory) findPreference("camera_uploads_category");
 
         mPrefCameraPictureUploadsWiFi = findPreference("camera_picture_uploads_on_wifi");
-        mPrefCameraPictureUploads = findPreference("camera_picture_uploads");
 
-        toggleCameraUploadsPictureOptions(true, ((CheckBoxPreference) mPrefCameraPictureUploads).isChecked());
+        toggleCameraUploadsPictureOptions(true, mPrefCameraPictureUploads.isChecked());
 
         mPrefCameraPictureUploads.setOnPreferenceChangeListener((preference, newValue) -> {
             boolean enableCameraUploadsPicture = (Boolean) newValue;
             toggleCameraUploadsPictureOptions(false, enableCameraUploadsPicture);
             toggleCameraUploadsCommonOptions(
-                    ((CheckBoxPreference) mPrefCameraVideoUploads).isChecked(),
+                    mPrefCameraVideoUploads.isChecked(),
                     enableCameraUploadsPicture
             );
             return true;
         });
 
         // Videos
+        mPrefCameraVideoUploads = (CheckBoxPreference) findPreference("camera_video_uploads");
+
         mPrefCameraVideoUploadsPath = findPreference("camera_video_uploads_path");
         if (mPrefCameraVideoUploadsPath != null) {
-
             mPrefCameraVideoUploadsPath.setOnPreferenceClickListener(preference -> {
                 if (!mUploadVideoPath.endsWith(OCFile.PATH_SEPARATOR)) {
                     mUploadVideoPath += OCFile.PATH_SEPARATOR;
@@ -193,8 +206,7 @@ public void onCreate(Bundle savedInstanceState) {
         }
 
         mPrefCameraVideoUploadsWiFi = findPreference("camera_video_uploads_on_wifi");
-        mPrefCameraVideoUploads = findPreference("camera_video_uploads");
-        toggleCameraUploadsVideoOptions(true, ((CheckBoxPreference) mPrefCameraVideoUploads).isChecked());
+        toggleCameraUploadsVideoOptions(true, mPrefCameraVideoUploads.isChecked());
 
         mPrefCameraVideoUploads.setOnPreferenceChangeListener((preference, newValue) -> {
             toggleCameraUploadsVideoOptions(false, (Boolean) newValue);
@@ -223,8 +235,9 @@ public void onCreate(Bundle savedInstanceState) {
 
         mPrefCameraUploadsBehaviour = findPreference("camera_uploads_behaviour");
         toggleCameraUploadsCommonOptions(
-                ((CheckBoxPreference) mPrefCameraVideoUploads).isChecked(),
-                ((CheckBoxPreference) mPrefCameraPictureUploads).isChecked());
+                mPrefCameraVideoUploads.isChecked(),
+                mPrefCameraPictureUploads.isChecked()
+        );
 
         loadCameraUploadsPicturePath();
         loadCameraUploadsVideoPath();
@@ -239,14 +252,16 @@ public void onCreate(Bundle savedInstanceState) {
          * Security
          */
 
-        PreferenceCategory prefSecurityCategory = (PreferenceCategory) findPreference("security_category");
-        pPasscode = (CheckBoxPreference) findPreference(PassCodeActivity.PREFERENCE_SET_PASSCODE);
-        pFingerprint = (CheckBoxPreference) findPreference(FingerprintActivity.PREFERENCE_SET_FINGERPRINT);
+        mPrefSecurityCategory = (PreferenceCategory) findPreference("security_category");
+        mPasscode = (CheckBoxPreference) findPreference(PassCodeActivity.PREFERENCE_SET_PASSCODE);
+        mPattern = (CheckBoxPreference) findPreference(PatternLockActivity.PREFERENCE_SET_PATTERN);
+        mFingerprint = (CheckBoxPreference) findPreference(FingerprintActivity.PREFERENCE_SET_FINGERPRINT);
+        mPrefTouchesWithOtherVisibleWindows =
+                (CheckBoxPreference) findPreference(PREFERENCE_TOUCHES_WITH_OTHER_VISIBLE_WINDOWS);
 
         // Passcode lock
-        if (pPasscode != null) {
-
-            pPasscode.setOnPreferenceChangeListener((preference, newValue) -> {
+        if (mPasscode != null) {
+            mPasscode.setOnPreferenceChangeListener((preference, newValue) -> {
                 Intent i = new Intent(getApplicationContext(), PassCodeActivity.class);
                 Boolean incoming = (Boolean) newValue;
                 SharedPreferences appPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
@@ -259,16 +274,14 @@ public void onCreate(Bundle savedInstanceState) {
 
                     startActivityForResult(i, incoming ? ACTION_REQUEST_PASSCODE : ACTION_CONFIRM_PASSCODE);
                 }
-                // Don't update just yet, we will decide on it in onActivityResult
+                // Don't update this yet, we will decide it on onActivityResult
                 return false;
             });
         }
 
         // Pattern lock
-        pPattern = (CheckBoxPreference) findPreference(PatternLockActivity.PREFERENCE_SET_PATTERN);
-        if (pPattern != null) {
-
-            pPattern.setOnPreferenceChangeListener((preference, newValue) -> {
+        if (mPattern != null) {
+            mPattern.setOnPreferenceChangeListener((preference, newValue) -> {
                 Intent intent = new Intent(getApplicationContext(), PatternLockActivity.class);
                 Boolean state = (Boolean) newValue;
                 SharedPreferences appPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
@@ -286,18 +299,15 @@ public void onCreate(Bundle savedInstanceState) {
 
         // Fingerprint lock
         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
-
-            prefSecurityCategory.removePreference(pFingerprint);
-
-        } else if (pFingerprint != null) {
-
+            mPrefSecurityCategory.removePreference(mFingerprint);
+        } else if (mFingerprint != null) {
             // Disable Fingerprint lock if Passcode or Pattern locks are disabled
-            if (pPasscode != null && pPattern != null && !pPasscode.isChecked() && !pPattern.isChecked()) {
-                pFingerprint.setEnabled(false);
-                pFingerprint.setSummary(R.string.prefs_fingerprint_summary);
+            if (mPasscode != null && mPattern != null && !mPasscode.isChecked() && !mPattern.isChecked()) {
+                mFingerprint.setEnabled(false);
+                mFingerprint.setSummary(R.string.prefs_fingerprint_summary);
             }
 
-            pFingerprint.setOnPreferenceChangeListener((preference, newValue) -> {
+            mFingerprint.setOnPreferenceChangeListener((preference, newValue) -> {
                 Boolean incoming = (Boolean) newValue;
 
                 // Fingerprint not supported
@@ -320,7 +330,38 @@ public void onCreate(Bundle savedInstanceState) {
             });
         }
 
-        /*
+        if (mPrefTouchesWithOtherVisibleWindows != null) {
+            mPrefTouchesWithOtherVisibleWindows.setOnPreferenceChangeListener((preference, newValue) -> {
+                        SharedPreferences.Editor appPrefs = PreferenceManager.
+                                getDefaultSharedPreferences(getApplicationContext()).edit();
+
+                        if ((Boolean) newValue) {
+                            showConfirmationDialog(
+                                    getString(R.string.confirmation_touches_with_other_windows_title),
+                                    getString(R.string.confirmation_touches_with_other_windows_message),
+                                    (dialog, which) -> {
+                                        if (which == DialogInterface.BUTTON_POSITIVE) {
+                                            appPrefs.putBoolean(
+                                                    PREFERENCE_TOUCHES_WITH_OTHER_VISIBLE_WINDOWS,
+                                                    true
+                                            );
+                                        } else if (which == DialogInterface.BUTTON_NEGATIVE) {
+                                            mPrefTouchesWithOtherVisibleWindows.setChecked(false);
+                                        }
+                                        dialog.dismiss();
+                                    });
+                        } else {
+                            appPrefs.putBoolean(PREFERENCE_TOUCHES_WITH_OTHER_VISIBLE_WINDOWS, false);
+                        }
+
+                        appPrefs.apply();
+
+                        return true;
+                    }
+            );
+        }
+
+        /**
          * More
          */
         PreferenceCategory pCategoryMore = (PreferenceCategory) findPreference("more");
@@ -466,14 +507,14 @@ public void onCreate(Bundle savedInstanceState) {
         /*
          * About App
          */
-        Preference pAboutApp = findPreference("about_app");
-        if (pAboutApp != null) {
-            pAboutApp.setTitle(String.format(
+        mAboutApp = findPreference("about_app");
+        if (mAboutApp != null) {
+            mAboutApp.setTitle(String.format(
                     getString(R.string.about_android),
                     getString(R.string.app_name)
             ));
-            pAboutApp.setSummary(String.format(getString(R.string.about_version), appVersion));
-            pAboutApp.setOnPreferenceClickListener(preference -> {
+            mAboutApp.setSummary(String.format(getString(R.string.about_version), appVersion));
+            mAboutApp.setOnPreferenceClickListener(preference -> {
                 String commitUrl = BuildConfig.GIT_REMOTE + "/commit/" + BuildConfig.COMMIT_SHA1;
                 Uri uriUrl = Uri.parse(commitUrl);
                 Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
@@ -499,10 +540,12 @@ private void toggleCameraUploadsPictureOptions(Boolean initializing, Boolean isC
             }
         } else {
             if (!initializing) {
-                showConfirmationDialog(getString(R.string.confirmation_disable_pictures_upload_message),
+                showConfirmationDialog(
+                        getString(R.string.confirmation_disable_camera_uploads_title),
+                        getString(R.string.confirmation_disable_pictures_upload_message),
                         (dialog, which) -> {
                             if (which == DialogInterface.BUTTON_NEGATIVE) {
-                                ((CheckBoxPreference) mPrefCameraPictureUploads).setChecked(true);
+                                mPrefCameraPictureUploads.setChecked(true);
                                 mPrefCameraUploadsCategory.addPreference(mPrefCameraPictureUploadsWiFi);
                                 mPrefCameraUploadsCategory.addPreference(mPrefCameraPictureUploadsPath);
 
@@ -536,10 +579,12 @@ private void toggleCameraUploadsVideoOptions(Boolean initializing, Boolean isChe
             }
         } else {
             if (!initializing) {
-                showConfirmationDialog(getString(R.string.confirmation_disable_videos_upload_message),
+                showConfirmationDialog(
+                        getString(R.string.confirmation_disable_camera_uploads_title),
+                        getString(R.string.confirmation_disable_videos_upload_message),
                         (dialog, which) -> {
                             if (which == DialogInterface.BUTTON_NEGATIVE) {
-                                ((CheckBoxPreference) mPrefCameraVideoUploads).setChecked(true);
+                                mPrefCameraVideoUploads.setChecked(true);
                                 mPrefCameraUploadsCategory.addPreference(mPrefCameraVideoUploadsWiFi);
                                 mPrefCameraUploadsCategory.addPreference(mPrefCameraVideoUploadsPath);
                             } else if (which == DialogInterface.BUTTON_POSITIVE) {
@@ -573,9 +618,9 @@ protected void onResume() {
         SharedPreferences appPrefs =
                 PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
         boolean passCodeState = appPrefs.getBoolean(PassCodeActivity.PREFERENCE_SET_PASSCODE, false);
-        pPasscode.setChecked(passCodeState);
+        mPasscode.setChecked(passCodeState);
         boolean patternState = appPrefs.getBoolean(PatternLockActivity.PREFERENCE_SET_PATTERN, false);
-        pPattern.setChecked(patternState);
+        mPattern.setChecked(patternState);
         boolean fingerprintState = appPrefs.getBoolean(FingerprintActivity.PREFERENCE_SET_FINGERPRINT, false);
 
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && mFingerprintManager != null &&
@@ -583,7 +628,7 @@ protected void onResume() {
             fingerprintState = false;
         }
 
-        pFingerprint.setChecked(fingerprintState);
+        mFingerprint.setChecked(fingerprintState);
     }
 
     @Override
@@ -884,16 +929,16 @@ private void saveCameraUploadsSourcePathOnPreferences() {
     }
 
     private void enableFingerprint() {
-        pFingerprint.setEnabled(true);
-        pFingerprint.setSummary(null);
+        mFingerprint.setEnabled(true);
+        mFingerprint.setSummary(null);
     }
 
     private void disableFingerprint(String summary) {
-        if (pFingerprint.isChecked()) {
-            pFingerprint.setChecked(false);
+        if (mFingerprint.isChecked()) {
+            mFingerprint.setChecked(false);
         }
-        pFingerprint.setEnabled(false);
-        pFingerprint.setSummary(summary);
+        mFingerprint.setEnabled(false);
+        mFingerprint.setSummary(summary);
     }
 
     /**
@@ -916,9 +961,9 @@ private void showSnackMessage(int messageResource) {
      * @param message  message to show in the dialog
      * @param listener to handle button clicks
      */
-    private void showConfirmationDialog(String message, DialogInterface.OnClickListener listener) {
+    private void showConfirmationDialog(String title, String message, DialogInterface.OnClickListener listener) {
         AlertDialog alertDialog = new AlertDialog.Builder(this).create();
-        alertDialog.setTitle(R.string.confirmation_disable_camera_uploads_title);
+        alertDialog.setTitle(title);
         alertDialog.setMessage(message);
         alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.common_no), listener);
         alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.common_yes), listener);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PrivacyPolicyActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PrivacyPolicyActivity.java
index 9d5a649d875..7fa573cb8d4 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PrivacyPolicyActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/PrivacyPolicyActivity.java
@@ -29,15 +29,17 @@
 import android.webkit.WebChromeClient;
 import android.webkit.WebView;
 import android.webkit.WebViewClient;
+import android.widget.LinearLayout;
 import android.widget.ProgressBar;
 
 import com.owncloud.android.R;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 /**
  * Activity to show the privacy policy to the user
  */
-public class PrivacyPolicyActivity extends ToolbarActivity  {
+public class PrivacyPolicyActivity extends ToolbarActivity {
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -55,6 +57,12 @@ protected void onCreate(Bundle savedInstanceState) {
         final ProgressBar mProgressBar = findViewById(R.id.syncProgressBar);
         DisplayUtils.colorPreLollipopHorizontalProgressBar(mProgressBar);
 
+        // Allow or disallow touches with other visible windows
+        LinearLayout activityPrivacyPolicyLayout = findViewById(R.id.activityPrivacyPolicyLayout);
+        activityPrivacyPolicyLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         WebView webview = findViewById(R.id.privacyPolicyWebview);
         webview.getSettings().setJavaScriptEnabled(true);
 
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ShareActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ShareActivity.java
index 0fdb55b7e93..8918ba24366 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ShareActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/ShareActivity.java
@@ -32,6 +32,7 @@
 import androidx.fragment.app.Fragment;
 import androidx.fragment.app.FragmentTransaction;
 import android.view.MenuItem;
+import android.widget.LinearLayout;
 
 import com.owncloud.android.R;
 import com.owncloud.android.datamodel.OCFile;
@@ -55,6 +56,7 @@
 import com.owncloud.android.ui.fragment.SearchShareesFragment;
 import com.owncloud.android.ui.fragment.ShareFileFragment;
 import com.owncloud.android.ui.fragment.ShareFragmentListener;
+import com.owncloud.android.utils.PreferenceUtils;
 
 
 /**
@@ -83,6 +85,12 @@ protected void onCreate(Bundle savedInstanceState) {
 
         setContentView(R.layout.share_activity);
 
+        // Allow or disallow touches with other visible windows
+        LinearLayout shareActivityLayout = findViewById(R.id.share_activity_layout);
+        shareActivityLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         // Set back button
         getSupportActionBar().setDisplayHomeAsUpEnabled(true);
 
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java
index 30c09b601f8..5237ec83a96 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java
@@ -4,6 +4,7 @@
  *   @author David A. Velasco
  *   @author Shashvat Kedia
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -37,6 +38,7 @@
 import android.view.ViewGroup;
 import android.widget.ArrayAdapter;
 import android.widget.Button;
+import android.widget.LinearLayout;
 import android.widget.RadioButton;
 import android.widget.TextView;
 
@@ -49,6 +51,7 @@
 import com.owncloud.android.ui.fragment.LocalFileListFragment;
 import com.owncloud.android.ui.helpers.FilesUploadHelper;
 import com.owncloud.android.utils.FileStorageUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.File;
 
@@ -126,9 +129,19 @@ public void onCreate(Bundle savedInstanceState) {
         // Inflate and set the layout view
         setContentView(R.layout.upload_files_layout);
 
+        // Allow or disallow touches with other visible windows
+        LinearLayout uploadFilesLayout = findViewById(R.id.upload_files_layout);
+        uploadFilesLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         mFileListFragment = (LocalFileListFragment)
                 getSupportFragmentManager().findFragmentById(R.id.local_files_list);
 
+        mFileListFragment.getView().setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         // Set input controllers
         mCancelBtn = findViewById(R.id.upload_files_btn_cancel);
         mCancelBtn.setOnClickListener(this);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/CertificateCombinedExceptionViewAdapter.java b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/CertificateCombinedExceptionViewAdapter.java
index 7fa8f1f57f1..34e37b13d47 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/CertificateCombinedExceptionViewAdapter.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/CertificateCombinedExceptionViewAdapter.java
@@ -21,12 +21,13 @@
  */
 package com.owncloud.android.ui.adapter;
 
+import android.view.View;
+import android.widget.LinearLayout;
+
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.network.CertificateCombinedException;
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
-
-import android.view.View;
-import android.widget.TextView;
+import com.owncloud.android.utils.PreferenceUtils;
 
 /**
  * TODO
@@ -44,6 +45,12 @@ public CertificateCombinedExceptionViewAdapter(CertificateCombinedException sslE
     
     @Override
     public void updateErrorView(View dialogView) {
+        // Allow or disallow touches with other visible windows
+        LinearLayout manageSpace = dialogView.findViewById(R.id.root);
+        manageSpace.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(dialogView.getContext())
+        );
+
         /// clean
         dialogView.findViewById(R.id.reason_no_info_about_error).setVisibility(View.GONE);
        
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ExpandableUploadListAdapter.java b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ExpandableUploadListAdapter.java
index 688e1452fed..d127cb2ca0e 100755
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ExpandableUploadListAdapter.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ExpandableUploadListAdapter.java
@@ -4,6 +4,7 @@
  *  @author LukeOwncloud
  *  @author masensio
  *  @author Christian Schabesberger
+ *  @author David González Verdugo
  *  Copyright (C) 2019 ownCloud GmbH.
  *
  *  This program is free software: you can redistribute it and/or modify
@@ -53,6 +54,7 @@
 import com.owncloud.android.ui.activity.FileActivity;
 import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.MimetypeIconUtil;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.File;
 import java.lang.ref.WeakReference;
@@ -211,6 +213,10 @@ private View getView(OCUpload[] uploadsItems, int position, View convertView, Vi
                             Context.LAYOUT_INFLATER_SERVICE
                     );
             view = inflator.inflate(R.layout.upload_list_item, parent, false);
+            // Allow or disallow touches with other visible windows
+            view.setFilterTouchesWhenObscured(
+                    PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(mParentActivity)
+            );
         }
 
         if (uploadsItems != null && uploadsItems.length > position) {
@@ -727,6 +733,11 @@ public View getGroupView(int groupPosition, boolean isExpanded, View convertView
             LayoutInflater inflater = (LayoutInflater) mParentActivity
                     .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
             convertView = inflater.inflate(R.layout.upload_list_group, null);
+
+            // Allow or disallow touches with other visible windows
+            convertView.setFilterTouchesWhenObscured(
+                    PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(mParentActivity)
+            );
         }
         TextView tvGroupName = convertView.findViewById(R.id.uploadListGroupName);
         TextView tvFileCount = convertView.findViewById(R.id.textViewFileCount);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java
index a847df08565..6dd40f3c184 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java
@@ -10,16 +10,16 @@
  * @author Shashvat Kedia
  * Copyright (C) 2011  Bartek Przybylski
  * Copyright (C) 2019 ownCloud GmbH.
- * <p>
+ *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2,
  * as published by the Free Software Foundation.
- * <p>
+ *
  * This program 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.
- * <p>
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -55,6 +55,7 @@
 import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.FileStorageUtils;
 import com.owncloud.android.utils.MimetypeIconUtil;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -170,12 +171,15 @@ public View getView(int position, View convertView, ViewGroup parent) {
                 case LIST_ITEM:
                     view = inflator.inflate(R.layout.list_item, parent, false);
                     view.setTag(ViewType.LIST_ITEM);
+                    // Allow or disallow touches with other visible windows
+                    view.setFilterTouchesWhenObscured(
+                            PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(mContext)
+                    );
                     break;
             }
         }
 
         if (file != null) {
-
             final ImageView localStateView = view.findViewById(R.id.localFileIndicator);
             final ImageView fileIcon = view.findViewById(R.id.thumbnail);
 
@@ -186,6 +190,11 @@ public View getView(int position, View convertView, ViewGroup parent) {
             final LinearLayout linearLayout = view.findViewById(R.id.ListItemLayout);
             linearLayout.setContentDescription("LinearLayout-" + name);
 
+            // Allow or disallow touches with other visible windows
+            linearLayout.setFilterTouchesWhenObscured(
+                    PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(mContext)
+            );
+
             switch (viewType) {
                 case LIST_ITEM:
                     TextView fileSizeV = view.findViewById(R.id.file_size);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/LocalFileListAdapter.java b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/LocalFileListAdapter.java
index a486c875ccf..074d8c86f85 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/LocalFileListAdapter.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/LocalFileListAdapter.java
@@ -21,9 +21,6 @@
  */
 package com.owncloud.android.ui.adapter;
 
-import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.datamodel.ThumbnailsCacheManager;
-
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.view.LayoutInflater;
@@ -36,12 +33,15 @@
 import android.widget.TextView;
 
 import com.owncloud.android.R;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.datamodel.ThumbnailsCacheManager;
 import com.owncloud.android.db.PreferenceManager;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.utils.BitmapUtils;
 import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.FileStorageUtils;
 import com.owncloud.android.utils.MimetypeIconUtil;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.File;
 import java.io.FileFilter;
@@ -109,7 +109,13 @@ public View getView(int position, View convertView, ViewGroup parent) {
         if (view == null) {
             LayoutInflater inflater = (LayoutInflater) mContext
                     .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+
             view = inflater.inflate(R.layout.list_item, null);
+
+            // Allow or disallow touches with other visible windows
+            view.setFilterTouchesWhenObscured(
+                    PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(mContext)
+            );
         }
         if (mFiles != null && mFiles.length > position) {
             File file = mFiles[position];
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ReceiveExternalFilesAdapter.java b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ReceiveExternalFilesAdapter.java
index 8dcf5971be0..c5ecf36650d 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ReceiveExternalFilesAdapter.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ReceiveExternalFilesAdapter.java
@@ -4,6 +4,7 @@
  *   @author Tobias Kaminsky
  *   @author Christian Schabesberger
  *   @author Shashvat Kedia
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -42,6 +43,7 @@
 import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.FileStorageUtils;
 import com.owncloud.android.utils.MimetypeIconUtil;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.List;
 import java.util.Vector;
@@ -95,6 +97,11 @@ public View getView(int position, View convertView, ViewGroup parent) {
         View vi = convertView;
         if (convertView == null) {
             vi = mInflater.inflate(R.layout.uploader_list_item_layout, parent, false);
+
+            // Allow or disallow touches with other visible windows
+            vi.setFilterTouchesWhenObscured(
+                    PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(mContext)
+            );
         }
 
         OCFile file = mFiles.get(position);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/SharePublicLinkListAdapter.java b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/SharePublicLinkListAdapter.java
index 14d2ac681b6..77ac2b40d50 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/SharePublicLinkListAdapter.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/SharePublicLinkListAdapter.java
@@ -31,6 +31,7 @@
 
 import com.owncloud.android.R;
 import com.owncloud.android.lib.resources.shares.OCShare;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.ArrayList;
 
@@ -69,10 +70,15 @@ public long getItemId(int position) {
     @Override
     public View getView(final int position, View convertView, ViewGroup parent) {
 
-        LayoutInflater inflator = (LayoutInflater) mContext
-                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+        LayoutInflater inflator = (LayoutInflater) mContext.
+                getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         View view = inflator.inflate(R.layout.share_public_link_item, parent, false);
 
+        // Allow or disallow touches with other visible windows
+        view.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(mContext)
+        );
+
         if (mPublicLinks != null && mPublicLinks.size() > position) {
 
             OCShare share = mPublicLinks.get(position);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ShareUserListAdapter.java b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ShareUserListAdapter.java
index 343c970f01d..77d0b6dc2e3 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ShareUserListAdapter.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/ShareUserListAdapter.java
@@ -33,6 +33,7 @@
 import com.owncloud.android.R;
 import com.owncloud.android.lib.resources.shares.OCShare;
 import com.owncloud.android.lib.resources.shares.ShareType;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.ArrayList;
 
@@ -74,6 +75,11 @@ public View getView(final int position, View convertView, ViewGroup parent) {
                 .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         View view = inflator.inflate(R.layout.share_user_item, parent, false);
 
+        // Allow or disallow touches with other visible windows
+        view.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(mContext)
+        );
+
         if (mShares != null && mShares.size() > position) {
             OCShare share = mShares.get(position);
 
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/SslErrorViewAdapter.java b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/SslErrorViewAdapter.java
index d8963e1fd43..eaf6798a447 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/SslErrorViewAdapter.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/adapter/SslErrorViewAdapter.java
@@ -21,11 +21,13 @@
  */
 package com.owncloud.android.ui.adapter;
 
-import com.owncloud.android.R;
-import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
 import android.net.http.SslError;
 import android.view.View;
-import android.widget.TextView;
+import android.widget.LinearLayout;
+
+import com.owncloud.android.R;
+import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
+import com.owncloud.android.utils.PreferenceUtils;
 
 /**
  * Dialog to show an Untrusted Certificate
@@ -42,6 +44,12 @@ public SslErrorViewAdapter(SslError sslError) {
     
     @Override
     public void updateErrorView(View dialogView) {
+        // Allow or disallow touches with other visible windows
+        LinearLayout manageSpace = dialogView.findViewById(R.id.root);
+        manageSpace.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(dialogView.getContext())
+        );
+
         /// clean
         dialogView.findViewById(R.id.reason_no_info_about_error).setVisibility(View.GONE);
         
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java
index 5d9d0f45a20..6617bdbc145 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java
@@ -3,6 +3,7 @@
  *
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -21,23 +22,26 @@
 
 package com.owncloud.android.ui.dialog;
 
-import com.owncloud.android.R;
-import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.lib.resources.files.FileUtils;
-import com.owncloud.android.ui.activity.ComponentsGetter;
-
-import com.google.android.material.snackbar.Snackbar;
-import androidx.appcompat.app.AlertDialog;
 import android.app.Dialog;
 import android.content.DialogInterface;
 import android.os.Bundle;
-import androidx.fragment.app.DialogFragment;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.WindowManager.LayoutParams;
 import android.widget.EditText;
 import android.widget.TextView;
 
+import com.google.android.material.snackbar.Snackbar;
+import com.owncloud.android.R;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.lib.resources.files.FileUtils;
+import com.owncloud.android.ui.activity.ComponentsGetter;
+import com.owncloud.android.utils.PreferenceUtils;
+
+import androidx.appcompat.app.AlertDialog;
+import androidx.coordinatorlayout.widget.CoordinatorLayout;
+import androidx.fragment.app.DialogFragment;
+
 /**
  *  Dialog to input the name for a new folder to create.  
  * 
@@ -74,6 +78,17 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Inflate the layout for the dialog
         LayoutInflater inflater = getActivity().getLayoutInflater();
         View v = inflater.inflate(R.layout.edit_box_dialog, null);
+
+        // Allow or disallow touches with other visible windows
+        v.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
+        CoordinatorLayout coordinatorLayout = getActivity().findViewById(R.id.coordinator_layout);
+
+        coordinatorLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
         
         // Setup layout 
         EditText inputText = v.findViewById(R.id.user_input);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/LoadingDialog.java b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/LoadingDialog.java
index f35f7043dfd..34d6a818a20 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/LoadingDialog.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/LoadingDialog.java
@@ -2,6 +2,7 @@
  *   ownCloud Android client application
  *
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -20,6 +21,7 @@
 package com.owncloud.android.ui.dialog;
 
 import com.owncloud.android.R;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import android.app.Dialog;
 import android.content.DialogInterface;
@@ -66,20 +68,25 @@ public static LoadingDialog newInstance(int messageId, boolean cancelable) {
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         // Create a view by inflating desired layout
-        View v = inflater.inflate(R.layout.loading_dialog, container,  false);
-        
+        View v = inflater.inflate(R.layout.loading_dialog, container, false);
+
+        // Allow or disallow touches with other visible windows
+        v.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
         // set message
-        TextView tv  = v.findViewById(R.id.loadingText);
+        TextView tv = v.findViewById(R.id.loadingText);
         int messageId = getArguments().getInt(ARG_MESSAGE_ID, R.string.placeholder_sentence);
         tv.setText(messageId);
 
         // set progress wheel color
-        ProgressBar progressBar  = v.findViewById(R.id.loadingBar);
+        ProgressBar progressBar = v.findViewById(R.id.loadingBar);
         progressBar.getIndeterminateDrawable().setColorFilter(
-            ContextCompat.getColor(getActivity(), R.color.color_accent),
-            PorterDuff.Mode.SRC_IN
+                ContextCompat.getColor(getActivity(), R.color.color_accent),
+                PorterDuff.Mode.SRC_IN
         );
-        
+
         return v;
     }
 
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/LoginWebViewDialog.java b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/LoginWebViewDialog.java
index 34bc67f32c1..406b9842d89 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/LoginWebViewDialog.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/LoginWebViewDialog.java
@@ -51,6 +51,7 @@
 import com.owncloud.android.authentication.SAMLWebViewClient.SsoWebViewClientListener;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.operations.AuthenticationMethod;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -165,6 +166,11 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
         // Inflate layout of the dialog  
         RelativeLayout ssoRootView = (RelativeLayout) inflater.inflate(R.layout.webview_dialog,
                 container, false);  // null parent view because it will go in the dialog layout
+
+        // Allow or disallow touches with other visible windows
+        ssoRootView.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
         
         if (mWebView == null) {
             // initialize the WebView
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/RateMeDialog.java b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/RateMeDialog.java
index 771a2e03d92..4eac0ef43e5 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/RateMeDialog.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/RateMeDialog.java
@@ -38,6 +38,7 @@
 
 import com.owncloud.android.AppRater;
 import com.owncloud.android.R;
+import com.owncloud.android.utils.PreferenceUtils;
 
 public class RateMeDialog extends DialogFragment {
 
@@ -75,7 +76,12 @@ public static RateMeDialog newInstance(String packageName, boolean cancelable) {
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         // Create a view by inflating desired layout
-        View v = inflater.inflate(R.layout.rate_me_dialog, container,  false);
+        View v = inflater.inflate(R.layout.rate_me_dialog, container, false);
+
+        // Allow or disallow touches with other visible windows
+        v.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
 
         Button rateNowButton = v.findViewById(R.id.button_rate_now);
         Button laterButton = v.findViewById(R.id.button_later);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java
index 1695fe345fe..c0fe569ecab 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java
@@ -3,6 +3,7 @@
  *
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -42,6 +43,7 @@
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.resources.files.FileUtils;
 import com.owncloud.android.ui.activity.ComponentsGetter;
+import com.owncloud.android.utils.PreferenceUtils;
 
 
 /**
@@ -78,6 +80,11 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Inflate the layout for the dialog
         LayoutInflater inflater = getActivity().getLayoutInflater();
         View v = inflater.inflate(R.layout.edit_box_dialog, null);
+
+        // Allow or disallow touches with other visible windows
+        v.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
         
         // Setup layout 
         String currentName = mTargetFile.getFileName();
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/errorhandling/ErrorShowActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/errorhandling/ErrorShowActivity.java
index 4bfb812fb7b..9a38ab75bbe 100755
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/errorhandling/ErrorShowActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/errorhandling/ErrorShowActivity.java
@@ -1,46 +1,54 @@
 /**
  *   ownCloud Android client application
  *
- *   @author LukeOwncloud
- *   @author Christian Schabesberger
- *   Copyright (C) 2019 ownCloud GmbH.
+ * @author LukeOwncloud
+ * @author Christian Schabesberger
+ * @author David González Verdugo
+ * Copyright (C) 2019 ownCloud GmbH.
  *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License version 2,
- *   as published by the Free Software Foundation.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * as published by the Free Software Foundation.
  *
- *   This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+ * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 package com.owncloud.android.ui.errorhandling;
 
-import android.app.Activity;
 import android.os.Bundle;
 import android.util.Log;
+import android.widget.ScrollView;
 import android.widget.TextView;
 
 import com.owncloud.android.R;
+import com.owncloud.android.ui.activity.BaseActivity;
+import com.owncloud.android.utils.PreferenceUtils;
+
+public class ErrorShowActivity extends BaseActivity {
 
-public class ErrorShowActivity extends Activity {
+    private static final String TAG = ErrorShowActivity.class.getSimpleName();
 
-	private static final String TAG = ErrorShowActivity.class.getSimpleName();
+    TextView mError;
 
-	TextView mError;
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        Log.e(TAG, "ErrorShowActivity was called. See above for StackTrace.");
+        Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));
+        setContentView(R.layout.errorhandling_showerror);
 
-	@Override
-	protected void onCreate(Bundle savedInstanceState) {
-		super.onCreate(savedInstanceState);
-		Log.e(TAG, "ErrorShowActivity was called. See above for StackTrace.");
-		Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));
-		setContentView(R.layout.errorhandling_showerror);
-		mError = findViewById(R.id.errorTextView);
-		mError.setText(getIntent().getStringExtra("error"));
+        // Allow or disallow touches with other visible windows
+        ScrollView errorHandlingShowErrorScrollView = findViewById(R.id.errorHandlingShowErrorScrollView);
+        errorHandlingShowErrorScrollView.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
 
-	}
+        mError = findViewById(R.id.errorTextView);
+        mError.setText(getIntent().getStringExtra("error"));
+    }
 }
\ No newline at end of file
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java
index 803fb1ccba3..a148e017066 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java
@@ -4,6 +4,7 @@
  *   @author masensio
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -45,6 +46,7 @@
 import com.owncloud.android.lib.resources.shares.ShareType;
 import com.owncloud.android.lib.resources.status.OwnCloudVersion;
 import com.owncloud.android.ui.activity.FileActivity;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.Locale;
 
@@ -143,7 +145,12 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
         // Inflate the layout for this fragment
         View view = inflater.inflate(R.layout.edit_share_layout, container, false);
 
-        ((TextView)view.findViewById(R.id.editShareTitle)).setText(
+        // Allow or disallow touches with other visible windows
+        view.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
+        ((TextView) view.findViewById(R.id.editShareTitle)).setText(
                 getResources().getString(R.string.share_with_edit_title, mShare.getSharedWithDisplayName()));
 
         // Setup layout
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ExpandableListFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ExpandableListFragment.java
index 9d5a7ff21d2..fc4bf1d9ba6 100755
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ExpandableListFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ExpandableListFragment.java
@@ -1,23 +1,23 @@
 /**
- *   ownCloud Android client application
+ * ownCloud Android client application
  *
- *   @author Bartek Przybylski
- *   @author Christian Schabesberger
- *   Copyright (C) 2012 Bartek Przybylski
- *   Copyright (C) 2019 ownCloud GmbH.
+ * @author Bartek Przybylski
+ * @author Christian Schabesberger
+ * @author David González Verdugo
+ * Copyright (C) 2012 Bartek Przybylski
+ * Copyright (C) 2019 ownCloud GmbH.
  *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License version 2,
- *   as published by the Free Software Foundation.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * as published by the Free Software Foundation.
  *
- *   This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+ * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 package com.owncloud.android.ui.fragment;
@@ -32,16 +32,16 @@
 
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.utils.PreferenceUtils;
 
 /**
  *  Extending ExtendedListFragment. This allows dividing list in groups.
  */
-public class ExpandableListFragment extends ExtendedListFragment implements OnChildClickListener
- {
+public class ExpandableListFragment extends ExtendedListFragment implements OnChildClickListener {
     protected static final String TAG = ExpandableListFragment.class.getSimpleName();
-    
+
     protected ExpandableListView mList;
-    
+
     public void setListAdapter(ExpandableListAdapter listAdapter) {
         mList.setAdapter(listAdapter);
         mList.invalidate();
@@ -50,12 +50,18 @@ public void setListAdapter(ExpandableListAdapter listAdapter) {
     public ExpandableListView getListView() {
         return mList;
     }
-    
+
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         Log_OC.e(TAG, "onCreateView");
-        
+
         View v = inflater.inflate(R.layout.list_fragment_expandable, null);
+
+        // Allow or disallow touches with other visible windows
+        v.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
         mEmptyListMessage = v.findViewById(R.id.empty_list_view);
         mList = v.findViewById(R.id.list_root);
         mList.setOnChildClickListener(this);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
index 987f71144d6..4101fbee035 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
@@ -42,6 +42,7 @@
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.ui.ExtendedListView;
 import com.owncloud.android.ui.activity.OnEnforceableRefreshListener;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.ArrayList;
 
@@ -157,12 +158,20 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
         mListView.setOnItemClickListener(this);
         mListFooterView = inflater.inflate(R.layout.list_footer, null, false);
 
+        mListFooterView.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
         mGridView = v.findViewById(R.id.grid_root);
         mGridView.setNumColumns(GridView.AUTO_FIT);
         mGridView.setOnItemClickListener(this);
 
         mGridFooterView = inflater.inflate(R.layout.list_footer, null, false);
 
+        mGridFooterView.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
         // Pull-down to refresh layout
         mRefreshListLayout = v.findViewById(R.id.swipe_containing_list);
         mRefreshGridLayout = v.findViewById(R.id.swipe_containing_grid);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java
index ebc677d9a02..575dd6456fd 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java
@@ -4,6 +4,7 @@
  *   @author Bartek Przybylski
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2011  Bartek Przybylski
  *   Copyright (C) 2019 ownCloud GmbH.
  *
@@ -32,9 +33,7 @@
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.ProgressBar;
-import android.widget.TextView;
+import android.widget.*;
 
 import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
@@ -53,6 +52,7 @@
 import com.owncloud.android.ui.dialog.RenameFileDialogFragment;
 import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.MimetypeIconUtil;
+import com.owncloud.android.utils.PreferenceUtils;
 
 
 /**
@@ -111,17 +111,30 @@ public void onActivityCreated(Bundle savedInstanceState) {
         ProgressBar progressBar = mView.findViewById(R.id.fdProgressBar);
         DisplayUtils.colorPreLollipopHorizontalProgressBar(progressBar);
         mProgressController.setProgressBar(progressBar);
+
+        // Allow or disallow touches with other visible windows
+        if (mLayout == R.layout.file_details_fragment) {
+            RelativeLayout fileDetailsLayout = getActivity().findViewById(R.id.fileDetailsLayout);
+            fileDetailsLayout.setFilterTouchesWhenObscured(
+                    PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+            );
+        } else {
+            LinearLayout fileDetailsEmptyLayout = getActivity().findViewById(R.id.fileDetailsEmptyLayout);
+            fileDetailsEmptyLayout.setFilterTouchesWhenObscured(
+                    PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+            );
+        }
     }
 
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
+                             Bundle savedInstanceState) {
 
-        setFile((OCFile) getArguments().getParcelable(ARG_FILE));
+        setFile(getArguments().getParcelable(ARG_FILE));
         mAccount = getArguments().getParcelable(ARG_ACCOUNT);
 
         if (savedInstanceState != null) {
-            setFile((OCFile) savedInstanceState.getParcelable(FileActivity.EXTRA_FILE));
+            setFile(savedInstanceState.getParcelable(FileActivity.EXTRA_FILE));
             mAccount = savedInstanceState.getParcelable(FileActivity.EXTRA_ACCOUNT);
         }
 
@@ -130,7 +143,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
         }
 
         mView = inflater.inflate(mLayout, null);
-        
+
         if (mLayout == R.layout.file_details_fragment) {
             mView.findViewById(R.id.fdCancelBtn).setOnClickListener(this);
         }
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/FileFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/FileFragment.java
index 2ff0978d4c7..6526e784940 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/FileFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/FileFragment.java
@@ -3,6 +3,7 @@
  *
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/LocalFileListFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/LocalFileListFragment.java
index 366134d56aa..9a4ffd69abd 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/LocalFileListFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/LocalFileListFragment.java
@@ -21,9 +21,6 @@
  */
 package com.owncloud.android.ui.fragment;
 
-import java.io.File;
-import java.util.ArrayList;
-
 import android.content.Context;
 import android.os.Bundle;
 import android.os.Environment;
@@ -34,11 +31,15 @@
 import android.widget.AdapterView;
 import android.widget.ImageView;
 import android.widget.ListView;
-
+import androidx.coordinatorlayout.widget.CoordinatorLayout;
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.ui.adapter.LocalFileListAdapter;
 import com.owncloud.android.utils.FileStorageUtils;
+import com.owncloud.android.utils.PreferenceUtils;
+
+import java.io.File;
+import java.util.ArrayList;
 
 
 /**
@@ -192,6 +193,15 @@ public void onActivityCreated(Bundle savedInstanceState) {
         } else {
             mNoOfFilesSelected = new ArrayList<>();
         }
+
+        // Allow or disallow touches with other visible windows
+        CoordinatorLayout coordinatorLayout = getActivity().findViewById(R.id.coordinator_layout);
+        if (coordinatorLayout != null) {
+            coordinatorLayout.setFilterTouchesWhenObscured(
+                    PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+            );
+        }
+
         Log_OC.i(TAG, "onActivityCreated() stop");
     }
 
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java
index 923f4bc8a64..29412a8c952 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java
@@ -34,12 +34,6 @@
 import android.os.Handler;
 import android.os.PowerManager;
 import android.preference.PreferenceManager;
-import com.google.android.material.bottomsheet.BottomSheetBehavior;
-import com.google.android.material.bottomsheet.BottomSheetDialog;
-import com.google.android.material.snackbar.Snackbar;
-import androidx.drawerlayout.widget.DrawerLayout;
-import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
-import androidx.appcompat.widget.SearchView;
 import android.util.SparseBooleanArray;
 import android.view.ActionMode;
 import android.view.LayoutInflater;
@@ -58,6 +52,9 @@
 import android.widget.ListView;
 import android.widget.TextView;
 
+import com.google.android.material.bottomsheet.BottomSheetBehavior;
+import com.google.android.material.bottomsheet.BottomSheetDialog;
+import com.google.android.material.snackbar.Snackbar;
 import com.owncloud.android.R;
 import com.owncloud.android.authentication.AccountUtils;
 import com.owncloud.android.datamodel.FileDataStorageManager;
@@ -81,11 +78,17 @@
 import com.owncloud.android.ui.preview.PreviewTextFragment;
 import com.owncloud.android.ui.preview.PreviewVideoFragment;
 import com.owncloud.android.utils.FileStorageUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
+import androidx.appcompat.widget.SearchView;
+import androidx.coordinatorlayout.widget.CoordinatorLayout;
+import androidx.drawerlayout.widget.DrawerLayout;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
+
 /**
  * A Fragment that lists all files and folders in a given path.
  *
@@ -235,17 +238,23 @@ public void onActivityCreated(Bundle savedInstanceState) {
 
             // detect if a mini FAB has ever been clicked
             final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
-            if(prefs.getLong(KEY_FAB_EVER_CLICKED, 0) > 0) {
+            if (prefs.getLong(KEY_FAB_EVER_CLICKED, 0) > 0) {
                 miniFabClicked = true;
             }
 
             // add labels to the min FABs when none of them has ever been clicked on
-            if(!miniFabClicked) {
+            if (!miniFabClicked) {
                 setFabLabels();
             } else {
                 removeFabLabels();
             }
         }
+
+        // Allow or disallow touches with other visible windows
+        CoordinatorLayout coordinatorLayout = getActivity().findViewById(R.id.coordinator_layout);
+        coordinatorLayout.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
     }
 
     @Override
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/SearchShareesFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/SearchShareesFragment.java
index 2479f611e6f..dc9123b68b2 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/SearchShareesFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/SearchShareesFragment.java
@@ -42,6 +42,7 @@
 import com.owncloud.android.lib.resources.shares.OCShare;
 import com.owncloud.android.ui.activity.FileActivity;
 import com.owncloud.android.ui.adapter.ShareUserListAdapter;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.ArrayList;
 
@@ -115,6 +116,11 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
         // Inflate the layout for this fragment
         View view = inflater.inflate(R.layout.search_users_groups_layout, container, false);
 
+        // Allow or disallow touches with other visible windows
+        view.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
         // Get the SearchView and set the searchable configuration
         SearchView searchView = view.findViewById(R.id.searchView);
         SearchManager searchManager = (SearchManager) getActivity().getSystemService(Context.SEARCH_SERVICE);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ShareFileFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ShareFileFragment.java
index 254524bbe5e..ae2fcb29a6f 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ShareFileFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/fragment/ShareFileFragment.java
@@ -56,6 +56,7 @@
 import com.owncloud.android.ui.dialog.RemoveShareDialogFragment;
 import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.MimetypeIconUtil;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -448,8 +449,14 @@ private void updateListOfUserGroups() {
             usersList.setVisibility(View.GONE);
         }
 
-        // Set Scroll to initial position
         ScrollView scrollView = getView().findViewById(R.id.shareScroll);
+
+        // Allow or disallow touches with other visible windows
+        scrollView.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
+        // Set Scroll to initial position
         scrollView.scrollTo(0, 0);
     }
 
@@ -545,6 +552,12 @@ private void updateListOfPublicLinks() {
 
         // Set Scroll to initial position
         ScrollView scrollView = getView().findViewById(R.id.shareScroll);
+
+        // Allow or disallow touches with other visible windows
+        scrollView.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
         scrollView.scrollTo(0, 0);
     }
 
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/FileDownloadFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/FileDownloadFragment.java
index 4dd9591d34c..27af4d9f41d 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/FileDownloadFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/FileDownloadFragment.java
@@ -39,6 +39,7 @@
 
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 
 /**
@@ -127,30 +128,25 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
                 setFile((OCFile) savedInstanceState.getParcelable(FileDownloadFragment.EXTRA_FILE));
                 mAccount = savedInstanceState.getParcelable(FileDownloadFragment.EXTRA_ACCOUNT);
                 mError = savedInstanceState.getBoolean(FileDownloadFragment.EXTRA_ERROR);
-            }
-            else {
+            } else {
                 mIgnoreFirstSavedState = false;
             }
         }
 
         View rootView = inflater.inflate(R.layout.file_download_fragment, container, false);
-        
+
         mProgressBar = rootView.findViewById(R.id.progressBar);
         DisplayUtils.colorPreLollipopHorizontalProgressBar(mProgressBar);
 
         (rootView.findViewById(R.id.cancelBtn)).setOnClickListener(this);
-        
-        (rootView.findViewById(R.id.fileDownloadLL)).setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                ((PreviewImageActivity) getActivity()).toggleFullScreen();
-            }
-        });
+
+        rootView.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
 
         if (mError) {
             setButtonsForRemote(rootView);
-        }
-        else {
+        } else {
             setButtonsForTransferring(rootView);
         }
 
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewAudioFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewAudioFragment.java
index b6a60e8947a..8027e0c3ea3 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewAudioFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewAudioFragment.java
@@ -3,6 +3,7 @@
  *
  *   @author David A. Velasco
  *   @author Christian Schabesberger
+ *   @author David González Verdugo
  *   Copyright (C) 2019 ownCloud GmbH.
  *
  *   This program is free software: you can redistribute it and/or modify
@@ -52,6 +53,7 @@
 import com.owncloud.android.ui.dialog.RemoveFilesDialogFragment;
 import com.owncloud.android.ui.fragment.FileFragment;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 
 /**
@@ -150,6 +152,10 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
         Log_OC.v(TAG, "onCreateView");
 
         View view = inflater.inflate(R.layout.preview_audio_fragment, container, false);
+        view.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
         mImagePreview = view.findViewById(R.id.image_preview);
         mMediaController = view.findViewById(R.id.media_controller);
         mProgressBar = view.findViewById(R.id.syncProgressBar);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java
index 3d088a4b329..cbba1e9135e 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java
@@ -59,6 +59,7 @@
 import com.owncloud.android.ui.activity.FileDisplayActivity;
 import com.owncloud.android.ui.fragment.FileFragment;
 import com.owncloud.android.utils.Extras;
+import com.owncloud.android.utils.PreferenceUtils;
 
 
 /**
@@ -138,14 +139,18 @@ private void initViewPager() {
 
         // TODO Enable when "On Device" is recovered ?
         mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(
-            getSupportFragmentManager(),
-            parentFolder,
-            getAccount(),
-            getStorageManager()
-            /*, MainApp.getOnlyOnDevice()*/
+                getSupportFragmentManager(),
+                parentFolder,
+                getAccount(),
+                getStorageManager()
+                /*, MainApp.getOnlyOnDevice()*/
         );
 
         mViewPager = findViewById(R.id.fragmentPager);
+        mViewPager.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(this)
+        );
+
         int position = mHasSavedPosition ? mSavedPosition :
                 mPreviewImagePagerAdapter.getFilePosition(getFile());
         position = (position >= 0) ? position : 0;
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java
index 03951c71692..4542cb90700 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java
@@ -53,6 +53,7 @@
 import com.owncloud.android.ui.dialog.RemoveFilesDialogFragment;
 import com.owncloud.android.ui.fragment.FileFragment;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.File;
 
@@ -153,7 +154,12 @@ public void onCreate(Bundle savedInstanceState) {
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         super.onCreateView(inflater, container, savedInstanceState);
+
         View view = inflater.inflate(R.layout.preview_image_fragment, container, false);
+        view.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
         mProgressBar = view.findViewById(R.id.syncProgressBar);
         DisplayUtils.colorPreLollipopHorizontalProgressBar(mProgressBar);
         mImageView = view.findViewById(R.id.photo_view);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java
index 4a370a53405..bf86ef6eeeb 100644
--- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java
+++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java
@@ -46,6 +46,7 @@
 import com.owncloud.android.ui.dialog.RemoveFilesDialogFragment;
 import com.owncloud.android.ui.fragment.FileFragment;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.PreferenceUtils;
 
 import java.io.BufferedWriter;
 import java.io.FileInputStream;
@@ -110,8 +111,11 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
         super.onCreateView(inflater, container, savedInstanceState);
         Log_OC.e(TAG, "onCreateView");
 
-
         View ret = inflater.inflate(R.layout.preview_text_fragment, container, false);
+        ret.setFilterTouchesWhenObscured(
+                PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(getContext())
+        );
+
         mProgressBar = ret.findViewById(R.id.syncProgressBar);
         DisplayUtils.colorPreLollipopHorizontalProgressBar(mProgressBar);
         mTextPreview = ret.findViewById(R.id.text_preview);
diff --git a/owncloudApp/src/main/java/com/owncloud/android/utils/PreferenceUtils.java b/owncloudApp/src/main/java/com/owncloud/android/utils/PreferenceUtils.java
new file mode 100644
index 00000000000..825820826c9
--- /dev/null
+++ b/owncloudApp/src/main/java/com/owncloud/android/utils/PreferenceUtils.java
@@ -0,0 +1,32 @@
+/**
+ * ownCloud Android client application
+ *
+ * @author David González Verdugo
+ * Copyright (C) 2019 ownCloud GmbH.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.owncloud.android.utils;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+
+import com.owncloud.android.ui.activity.Preferences;
+
+public class PreferenceUtils {
+    public static boolean shouldDisallowTouchesWithOtherVisibleWindows(Context context) {
+        SharedPreferences appPrefs = android.preference.PreferenceManager.getDefaultSharedPreferences(context);
+        return !appPrefs.getBoolean(Preferences.PREFERENCE_TOUCHES_WITH_OTHER_VISIBLE_WINDOWS, false);
+    }
+}
diff --git a/owncloudApp/src/main/res/layout-h620dp/drawer.xml b/owncloudApp/src/main/res/layout-h620dp/drawer.xml
index cef78738fd2..56b06ea73e7 100644
--- a/owncloudApp/src/main/res/layout-h620dp/drawer.xml
+++ b/owncloudApp/src/main/res/layout-h620dp/drawer.xml
@@ -24,7 +24,6 @@
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_gravity="start"
-        android:filterTouchesWhenObscured="true"
         android:fitsSystemWindows="true"
         app:headerLayout="@layout/drawer_header"
         app:menu="@menu/drawer_menu">
diff --git a/owncloudApp/src/main/res/layout-land/account_setup.xml b/owncloudApp/src/main/res/layout-land/account_setup.xml
index 2268ba84288..f16c106bbd8 100644
--- a/owncloudApp/src/main/res/layout-land/account_setup.xml
+++ b/owncloudApp/src/main/res/layout-land/account_setup.xml
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout-land/activity_pattern_lock.xml b/owncloudApp/src/main/res/layout-land/activity_pattern_lock.xml
index f9694d9009f..6d26588995e 100644
--- a/owncloudApp/src/main/res/layout-land/activity_pattern_lock.xml
+++ b/owncloudApp/src/main/res/layout-land/activity_pattern_lock.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/activityPatternLockLayout"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:filterTouchesWhenObscured="true"
     android:gravity="center_horizontal"
     android:padding="@dimen/standard_padding">
 
diff --git a/owncloudApp/src/main/res/layout/action_item.xml b/owncloudApp/src/main/res/layout/action_item.xml
index 14e503c18c1..bd3232dda85 100644
--- a/owncloudApp/src/main/res/layout/action_item.xml
+++ b/owncloudApp/src/main/res/layout/action_item.xml
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -17,30 +16,27 @@
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
-<LinearLayout
-	xmlns:android="http://schemas.android.com/apk/res/android"
-	android:orientation="horizontal"
-	android:layout_width="match_parent"
-	android:layout_height="wrap_content" 
-	android:clickable="true"
-	android:focusable="true"
-	android:background="@drawable/action_item_btn"
-	android:filterTouchesWhenObscured="true"
-	>
-        	
-	<ImageView
-		android:id="@+id/icon" 
-		android:layout_width="wrap_content" 
-		android:layout_height="wrap_content"/>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/action_item_btn"
+    android:clickable="true"
+    android:focusable="true"
+    android:orientation="horizontal">
+
+    <ImageView
+        android:id="@+id/icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content" />
+
+    <TextView
+        android:id="@+id/title"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center_vertical"
+        android:paddingLeft="5dip"
+        android:paddingRight="10dip"
+        android:text="Chart"
+        android:textColor="#fff" />
 
-	<TextView 
-		android:id="@+id/title"
-		android:layout_width="match_parent"
-		android:layout_height="match_parent"
-		android:gravity="center_vertical"
-		android:paddingLeft="5dip"
-		android:paddingRight="10dip"
-		android:text="Chart"
-		android:textColor="#fff"/>
-									         
 </LinearLayout>         
\ No newline at end of file
diff --git a/owncloudApp/src/main/res/layout/activity_manage_space.xml b/owncloudApp/src/main/res/layout/activity_manage_space.xml
index 573192c941c..8b203922696 100644
--- a/owncloudApp/src/main/res/layout/activity_manage_space.xml
+++ b/owncloudApp/src/main/res/layout/activity_manage_space.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -16,34 +15,31 @@
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/manage_space_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:filterTouchesWhenObscured="true"
-    >
+    android:orientation="vertical">
 
     <TextView
         android:id="@+id/general_description"
-        android:layout_height="wrap_content"
+        style="?android:attr/editTextPreferenceStyle"
         android:layout_width="match_parent"
+        android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
-        android:singleLine="false"
         android:layout_margin="@dimen/standard_margin"
-        style="?android:attr/editTextPreferenceStyle"
-        android:text="@string/manage_space_description"
-        />
+        android:singleLine="false"
+        android:text="@string/manage_space_description" />
 
     <androidx.appcompat.widget.AppCompatButton
+        android:id="@+id/clearDataButton"
+        style="@style/Button.Primary"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:text="@string/manage_space_clear_data"
-        android:id="@+id/clearDataButton"
         android:layout_gravity="center_horizontal"
         android:layout_margin="@dimen/standard_margin"
-        android:theme="@style/Button.Primary"
-        style="@style/Button.Primary"
-        android:contentDescription="@string/manage_space_clear_data"/>
+        android:contentDescription="@string/manage_space_clear_data"
+        android:text="@string/manage_space_clear_data"
+        android:theme="@style/Button.Primary" />
 
 </LinearLayout>
\ No newline at end of file
diff --git a/owncloudApp/src/main/res/layout/activity_pattern_lock.xml b/owncloudApp/src/main/res/layout/activity_pattern_lock.xml
index 531d21ae8ac..dcb5de244f4 100644
--- a/owncloudApp/src/main/res/layout/activity_pattern_lock.xml
+++ b/owncloudApp/src/main/res/layout/activity_pattern_lock.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/activityPatternLockLayout"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:filterTouchesWhenObscured="true"
     android:gravity="center_horizontal"
     android:padding="@dimen/standard_padding">
 
diff --git a/owncloudApp/src/main/res/layout/activity_privacy_policy.xml b/owncloudApp/src/main/res/layout/activity_privacy_policy.xml
index 33939d22631..ad5860f387c 100644
--- a/owncloudApp/src/main/res/layout/activity_privacy_policy.xml
+++ b/owncloudApp/src/main/res/layout/activity_privacy_policy.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -18,6 +17,7 @@
 -->
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/activityPrivacyPolicyLayout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
diff --git a/owncloudApp/src/main/res/layout/activity_row.xml b/owncloudApp/src/main/res/layout/activity_row.xml
index fca25aa1b87..48d0d1374a9 100644
--- a/owncloudApp/src/main/res/layout/activity_row.xml
+++ b/owncloudApp/src/main/res/layout/activity_row.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2015 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/alert_dialog_list_view.xml b/owncloudApp/src/main/res/layout/alert_dialog_list_view.xml
index 44d30d51dec..562dfa63a96 100644
--- a/owncloudApp/src/main/res/layout/alert_dialog_list_view.xml
+++ b/owncloudApp/src/main/res/layout/alert_dialog_list_view.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/alertDialogListViewLayout"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:filterTouchesWhenObscured="true">
diff --git a/owncloudApp/src/main/res/layout/drawer.xml b/owncloudApp/src/main/res/layout/drawer.xml
index c105ec5c0b8..6af592cca90 100644
--- a/owncloudApp/src/main/res/layout/drawer.xml
+++ b/owncloudApp/src/main/res/layout/drawer.xml
@@ -24,7 +24,6 @@
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_gravity="start"
-        android:filterTouchesWhenObscured="true"
         android:fitsSystemWindows="true"
         app:headerLayout="@layout/drawer_header"
         app:menu="@menu/drawer_menu">
diff --git a/owncloudApp/src/main/res/layout/edit_box_dialog.xml b/owncloudApp/src/main/res/layout/edit_box_dialog.xml
index 4a5c51da05b..b0d57122eef 100644
--- a/owncloudApp/src/main/res/layout/edit_box_dialog.xml
+++ b/owncloudApp/src/main/res/layout/edit_box_dialog.xml
@@ -3,7 +3,7 @@
     ownCloud Android client application
 
     Copyright (C) 2012  Bartek Przybylski
-    Copyright (C) 2016 ownCloud GmbH.
+    Copyright (C) 2019 ownCloud GmbH.
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License version 2,
@@ -21,7 +21,6 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:filterTouchesWhenObscured="true"
     android:gravity="clip_horizontal"
     android:orientation="vertical"
     android:padding="@dimen/standard_margin">
diff --git a/owncloudApp/src/main/res/layout/edit_share_layout.xml b/owncloudApp/src/main/res/layout/edit_share_layout.xml
index 29be06f5694..cd6260f301f 100644
--- a/owncloudApp/src/main/res/layout/edit_share_layout.xml
+++ b/owncloudApp/src/main/res/layout/edit_share_layout.xml
@@ -24,7 +24,6 @@
     android:layout_height="match_parent"
     tools:context="com.owncloud.android.ui.fragment.EditShareFragment"
     android:id="@+id/shareScroll"
-    android:filterTouchesWhenObscured="true"
     >
 
     <LinearLayout android:orientation="vertical"
diff --git a/owncloudApp/src/main/res/layout/errorhandling_showerror.xml b/owncloudApp/src/main/res/layout/errorhandling_showerror.xml
index 56786badf12..1eb262d4d27 100755
--- a/owncloudApp/src/main/res/layout/errorhandling_showerror.xml
+++ b/owncloudApp/src/main/res/layout/errorhandling_showerror.xml
@@ -1,6 +1,6 @@
 <ScrollView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/errorHandlingShowErrorScrollView"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:filterTouchesWhenObscured="true"
diff --git a/owncloudApp/src/main/res/layout/file_details_empty.xml b/owncloudApp/src/main/res/layout/file_details_empty.xml
index 8ff51565339..c34141aeaab 100644
--- a/owncloudApp/src/main/res/layout/file_details_empty.xml
+++ b/owncloudApp/src/main/res/layout/file_details_empty.xml
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -18,6 +17,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+	android:id="@+id/fileDetailsEmptyLayout"
 	android:layout_width="match_parent"
 	android:layout_height="match_parent"
     android:background="@color/background_color"
diff --git a/owncloudApp/src/main/res/layout/file_details_fragment.xml b/owncloudApp/src/main/res/layout/file_details_fragment.xml
index 7a35c622afa..9227d58fb44 100644
--- a/owncloudApp/src/main/res/layout/file_details_fragment.xml
+++ b/owncloudApp/src/main/res/layout/file_details_fragment.xml
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -27,6 +26,7 @@
     >
 
     <RelativeLayout
+        android:id="@+id/fileDetailsLayout"
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
 
diff --git a/owncloudApp/src/main/res/layout/file_download_fragment.xml b/owncloudApp/src/main/res/layout/file_download_fragment.xml
index 873807058b9..b3f83fe1175 100644
--- a/owncloudApp/src/main/res/layout/file_download_fragment.xml
+++ b/owncloudApp/src/main/res/layout/file_download_fragment.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
   as published by the Free Software Foundation.
@@ -16,7 +15,6 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/fileDownloadLL"
 	android:layout_width="match_parent"
 	android:layout_height="match_parent"
 	android:orientation="vertical" 
diff --git a/owncloudApp/src/main/res/layout/files.xml b/owncloudApp/src/main/res/layout/files.xml
index 9d2512092a5..0b8c61436f8 100644
--- a/owncloudApp/src/main/res/layout/files.xml
+++ b/owncloudApp/src/main/res/layout/files.xml
@@ -16,13 +16,12 @@
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
   -->
+
 <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/drawer_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:clickable="true"
-    android:filterTouchesWhenObscured="true"
     android:fitsSystemWindows="true">
 
     <!-- The main content view -->
diff --git a/owncloudApp/src/main/res/layout/files_folder_picker.xml b/owncloudApp/src/main/res/layout/files_folder_picker.xml
index f7b7959144c..8ea7782609f 100644
--- a/owncloudApp/src/main/res/layout/files_folder_picker.xml
+++ b/owncloudApp/src/main/res/layout/files_folder_picker.xml
@@ -16,9 +16,9 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/filesFolderPickerLayout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:filterTouchesWhenObscured="true"
     android:orientation="vertical">
 
     <include layout="@layout/toolbar_standard" />
diff --git a/owncloudApp/src/main/res/layout/generic_explanation.xml b/owncloudApp/src/main/res/layout/generic_explanation.xml
index 1141662cd08..939dfcbad49 100644
--- a/owncloudApp/src/main/res/layout/generic_explanation.xml
+++ b/owncloudApp/src/main/res/layout/generic_explanation.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2015 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/grid_image.xml b/owncloudApp/src/main/res/layout/grid_image.xml
index 22a60509424..98fbc82e70a 100644
--- a/owncloudApp/src/main/res/layout/grid_image.xml
+++ b/owncloudApp/src/main/res/layout/grid_image.xml
@@ -1,7 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<?xml version="1.0" encoding="UTF-8"?><!--
   ownCloud Android client application
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/grid_item.xml b/owncloudApp/src/main/res/layout/grid_item.xml
index b68808eff4a..cb6b7fcbdd3 100644
--- a/owncloudApp/src/main/res/layout/grid_item.xml
+++ b/owncloudApp/src/main/res/layout/grid_item.xml
@@ -1,7 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<?xml version="1.0" encoding="UTF-8"?><!--
   ownCloud Android client application
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/list_fragment.xml b/owncloudApp/src/main/res/layout/list_fragment.xml
index 08234a7c2b4..c2612e39df9 100644
--- a/owncloudApp/src/main/res/layout/list_fragment.xml
+++ b/owncloudApp/src/main/res/layout/list_fragment.xml
@@ -2,7 +2,7 @@
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/list_item.xml b/owncloudApp/src/main/res/layout/list_item.xml
index abb23c015cb..95d85962fc5 100644
--- a/owncloudApp/src/main/res/layout/list_item.xml
+++ b/owncloudApp/src/main/res/layout/list_item.xml
@@ -23,7 +23,6 @@
     android:background="@drawable/list_selector"
     android:orientation="vertical"
     android:layout_height="72dp"
-    android:filterTouchesWhenObscured="true"
     >
 
     <LinearLayout
diff --git a/owncloudApp/src/main/res/layout/loading_dialog.xml b/owncloudApp/src/main/res/layout/loading_dialog.xml
index f193a1c5eda..e6e5cf05c4a 100644
--- a/owncloudApp/src/main/res/layout/loading_dialog.xml
+++ b/owncloudApp/src/main/res/layout/loading_dialog.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/logs.xml b/owncloudApp/src/main/res/layout/logs.xml
index aedcec8cd28..d34592e6f2c 100644
--- a/owncloudApp/src/main/res/layout/logs.xml
+++ b/owncloudApp/src/main/res/layout/logs.xml
@@ -16,9 +16,9 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/logsLayout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:filterTouchesWhenObscured="true"
     android:orientation="vertical"
     android:weightSum="1">
 
diff --git a/owncloudApp/src/main/res/layout/media_control.xml b/owncloudApp/src/main/res/layout/media_control.xml
index 38886909f12..c5a6f5944f8 100644
--- a/owncloudApp/src/main/res/layout/media_control.xml
+++ b/owncloudApp/src/main/res/layout/media_control.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
   
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/passcodelock.xml b/owncloudApp/src/main/res/layout/passcodelock.xml
index 462f43b25e1..eb57b5f7fe2 100644
--- a/owncloudApp/src/main/res/layout/passcodelock.xml
+++ b/owncloudApp/src/main/res/layout/passcodelock.xml
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -19,6 +18,7 @@
 -->
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/passcodeLockLayout"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:gravity="center_horizontal"
diff --git a/owncloudApp/src/main/res/layout/popup.xml b/owncloudApp/src/main/res/layout/popup.xml
index bd9b0192003..a718e552ed5 100644
--- a/owncloudApp/src/main/res/layout/popup.xml
+++ b/owncloudApp/src/main/res/layout/popup.xml
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/preview_audio_fragment.xml b/owncloudApp/src/main/res/layout/preview_audio_fragment.xml
index 60f5ce2a353..10a5f2b0224 100644
--- a/owncloudApp/src/main/res/layout/preview_audio_fragment.xml
+++ b/owncloudApp/src/main/res/layout/preview_audio_fragment.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
   
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/preview_image_activity.xml b/owncloudApp/src/main/res/layout/preview_image_activity.xml
index f58f8828419..0bf419c3c1f 100644
--- a/owncloudApp/src/main/res/layout/preview_image_activity.xml
+++ b/owncloudApp/src/main/res/layout/preview_image_activity.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
   
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/preview_image_fragment.xml b/owncloudApp/src/main/res/layout/preview_image_fragment.xml
index 2e322f30a29..3123e50d0ac 100644
--- a/owncloudApp/src/main/res/layout/preview_image_fragment.xml
+++ b/owncloudApp/src/main/res/layout/preview_image_fragment.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016  ownCloud GmbH.
+  Copyright (C) 2019  ownCloud GmbH.
   
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/preview_text_fragment.xml b/owncloudApp/src/main/res/layout/preview_text_fragment.xml
index 530c0f96610..a22c02d3fa6 100644
--- a/owncloudApp/src/main/res/layout/preview_text_fragment.xml
+++ b/owncloudApp/src/main/res/layout/preview_text_fragment.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016  ownCloud GmbH.
+  Copyright (C) 2019  ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/rate_me_dialog.xml b/owncloudApp/src/main/res/layout/rate_me_dialog.xml
index 8034d29e18b..c33f62347b6 100644
--- a/owncloudApp/src/main/res/layout/rate_me_dialog.xml
+++ b/owncloudApp/src/main/res/layout/rate_me_dialog.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2019 ownCloud GmbH.
diff --git a/owncloudApp/src/main/res/layout/search_suggestion_row.xml b/owncloudApp/src/main/res/layout/search_suggestion_row.xml
index 0e31087df75..2fc0bb081b6 100644
--- a/owncloudApp/src/main/res/layout/search_suggestion_row.xml
+++ b/owncloudApp/src/main/res/layout/search_suggestion_row.xml
@@ -1,7 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
-  Copyright (C) 2017 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/search_users_groups_layout.xml b/owncloudApp/src/main/res/layout/search_users_groups_layout.xml
index 1e74c3736c5..12f91037ab1 100644
--- a/owncloudApp/src/main/res/layout/search_users_groups_layout.xml
+++ b/owncloudApp/src/main/res/layout/search_users_groups_layout.xml
@@ -21,7 +21,6 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:layout_margin="@dimen/standard_half_margin"
-    android:filterTouchesWhenObscured="true"
     android:minWidth="@dimen/share_user_groups_width"
     android:orientation="vertical">
 
diff --git a/owncloudApp/src/main/res/layout/share_activity.xml b/owncloudApp/src/main/res/layout/share_activity.xml
index 9106c3be8ba..5e47be46386 100644
--- a/owncloudApp/src/main/res/layout/share_activity.xml
+++ b/owncloudApp/src/main/res/layout/share_activity.xml
@@ -1,7 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -19,6 +18,7 @@
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/share_activity_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context="com.owncloud.android.ui.activity.ShareActivity"
diff --git a/owncloudApp/src/main/res/layout/share_file_layout.xml b/owncloudApp/src/main/res/layout/share_file_layout.xml
index db681189460..4fc3690874f 100644
--- a/owncloudApp/src/main/res/layout/share_file_layout.xml
+++ b/owncloudApp/src/main/res/layout/share_file_layout.xml
@@ -19,7 +19,6 @@
     android:id="@+id/shareScroll"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:filterTouchesWhenObscured="true"
     tools:context="com.owncloud.android.ui.fragment.ShareFileFragment">
 
     <LinearLayout
diff --git a/owncloudApp/src/main/res/layout/share_public_link_item.xml b/owncloudApp/src/main/res/layout/share_public_link_item.xml
index 66fc6bfcc65..c67c74be183 100644
--- a/owncloudApp/src/main/res/layout/share_public_link_item.xml
+++ b/owncloudApp/src/main/res/layout/share_public_link_item.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -17,7 +17,6 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:filterTouchesWhenObscured="true"
     android:orientation="vertical">
 
     <LinearLayout
diff --git a/owncloudApp/src/main/res/layout/share_user_item.xml b/owncloudApp/src/main/res/layout/share_user_item.xml
index e9074113d71..3b97cdf5de8 100644
--- a/owncloudApp/src/main/res/layout/share_user_item.xml
+++ b/owncloudApp/src/main/res/layout/share_user_item.xml
@@ -1,7 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/simple_dialog_list_item.xml b/owncloudApp/src/main/res/layout/simple_dialog_list_item.xml
index 1dad86ee957..96020eb612f 100644
--- a/owncloudApp/src/main/res/layout/simple_dialog_list_item.xml
+++ b/owncloudApp/src/main/res/layout/simple_dialog_list_item.xml
@@ -9,5 +9,4 @@
     android:gravity="center_vertical"
     android:paddingLeft="@dimen/standard_padding"
     android:paddingRight="@dimen/standard_padding"
-    android:minHeight="48dp"
-    android:filterTouchesWhenObscured="true"/>
\ No newline at end of file
+    android:minHeight="48dp"/>
\ No newline at end of file
diff --git a/owncloudApp/src/main/res/layout/ssl_untrusted_cert_layout.xml b/owncloudApp/src/main/res/layout/ssl_untrusted_cert_layout.xml
index 4525084008a..ee6dd34930b 100644
--- a/owncloudApp/src/main/res/layout/ssl_untrusted_cert_layout.xml
+++ b/owncloudApp/src/main/res/layout/ssl_untrusted_cert_layout.xml
@@ -23,8 +23,7 @@
     android:layout_height="wrap_content"
     android:gravity="center"
     android:padding="@dimen/standard_padding"
-    android:orientation="vertical"
-    android:filterTouchesWhenObscured="true">
+    android:orientation="vertical">
 
 	<TextView
 		android:id="@+id/header"
diff --git a/owncloudApp/src/main/res/layout/ssl_validator_layout.xml b/owncloudApp/src/main/res/layout/ssl_validator_layout.xml
index cfe9ec74501..db73507901f 100644
--- a/owncloudApp/src/main/res/layout/ssl_validator_layout.xml
+++ b/owncloudApp/src/main/res/layout/ssl_validator_layout.xml
@@ -24,7 +24,6 @@
     android:gravity="center"
     android:orientation="vertical"
     android:padding="16dp"
-    android:filterTouchesWhenObscured="true"
     >
 
 	<TextView
diff --git a/owncloudApp/src/main/res/layout/upload_files_layout.xml b/owncloudApp/src/main/res/layout/upload_files_layout.xml
index 7a0685de890..58776357c70 100644
--- a/owncloudApp/src/main/res/layout/upload_files_layout.xml
+++ b/owncloudApp/src/main/res/layout/upload_files_layout.xml
@@ -2,7 +2,7 @@
 <!-- 
   ownCloud Android client application
 
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -17,11 +17,9 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/upload_files_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:filterTouchesWhenObscured="true"
     android:orientation="vertical" >
 
     <include
diff --git a/owncloudApp/src/main/res/layout/upload_list_group.xml b/owncloudApp/src/main/res/layout/upload_list_group.xml
index 13d552a2cb5..583259af040 100755
--- a/owncloudApp/src/main/res/layout/upload_list_group.xml
+++ b/owncloudApp/src/main/res/layout/upload_list_group.xml
@@ -1,9 +1,7 @@
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:filterTouchesWhenObscured="true"
     android:orientation="horizontal"
     android:paddingTop="3dp">
 
diff --git a/owncloudApp/src/main/res/layout/uploader_layout.xml b/owncloudApp/src/main/res/layout/uploader_layout.xml
index e1402e308ca..8d56169f127 100644
--- a/owncloudApp/src/main/res/layout/uploader_layout.xml
+++ b/owncloudApp/src/main/res/layout/uploader_layout.xml
@@ -3,7 +3,7 @@
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
@@ -18,11 +18,9 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/upload_files_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:filterTouchesWhenObscured="true"
     android:orientation="vertical">
 
     <include
diff --git a/owncloudApp/src/main/res/layout/uploader_list_item_layout.xml b/owncloudApp/src/main/res/layout/uploader_list_item_layout.xml
index b9a9ab8c4be..71874da92f7 100644
--- a/owncloudApp/src/main/res/layout/uploader_list_item_layout.xml
+++ b/owncloudApp/src/main/res/layout/uploader_list_item_layout.xml
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/layout/webview_dialog.xml b/owncloudApp/src/main/res/layout/webview_dialog.xml
index ca1f593a78e..cace37edf20 100644
--- a/owncloudApp/src/main/res/layout/webview_dialog.xml
+++ b/owncloudApp/src/main/res/layout/webview_dialog.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
-  Copyright (C) 2016 ownCloud GmbH.
+  Copyright (C) 2019 ownCloud GmbH.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2,
diff --git a/owncloudApp/src/main/res/values/strings.xml b/owncloudApp/src/main/res/values/strings.xml
index 53f5ca19655..958d1d11989 100644
--- a/owncloudApp/src/main/res/values/strings.xml
+++ b/owncloudApp/src/main/res/values/strings.xml
@@ -37,6 +37,10 @@
     <string name="prefs_passcode">Passcode lock</string>
     <string name="prefs_fingerprint">Fingerprint lock</string>
     <string name="prefs_fingerprint_summary">Enable passcode or pattern lock to enable this option</string>
+    <string name="prefs_touches_with_other_visible_windows">Touches with other visible windows</string>
+    <string name="prefs_touches_with_other_visible_windows_summary">Allow touches when the view is obscured by another visible window. Enable it to use light filtering apps.</string>
+    <string name="confirmation_touches_with_other_windows_title">Are you sure you want to enable this feature?</string>
+    <string name="confirmation_touches_with_other_windows_message">Use this feature under your own responsibility, a malicious application could try to spoof you into performing some actions, unaware, using other views.</string>
     <string name="prefs_camera_picture_upload">Picture uploads</string>
     <string name="prefs_camera_picture_upload_summary">Automatically upload pictures taken by camera</string>
     <string name="prefs_camera_video_upload">Video uploads</string>
diff --git a/owncloudApp/src/main/res/xml/preferences.xml b/owncloudApp/src/main/res/xml/preferences.xml
index a71f170e685..4594af3d1f3 100644
--- a/owncloudApp/src/main/res/xml/preferences.xml
+++ b/owncloudApp/src/main/res/xml/preferences.xml
@@ -61,11 +61,15 @@
             android:key="set_pincode"
             android:title="@string/prefs_passcode" />
         <android.preference.CheckBoxPreference
-            android:title="@string/prefs_pattern"
-            android:key="set_pattern" />
+            android:key="set_pattern"
+            android:title="@string/prefs_pattern" />
         <android.preference.CheckBoxPreference
             android:key="set_fingerprint"
             android:title="@string/prefs_fingerprint" />
+        <android.preference.CheckBoxPreference
+            android:key="touches_with_other_visible_windows"
+            android:summary="@string/prefs_touches_with_other_visible_windows_summary"
+            android:title="@string/prefs_touches_with_other_visible_windows" />
     </PreferenceCategory>
 
     <PreferenceCategory