diff --git a/src/android/PrivacyScreenPlugin.java b/src/android/PrivacyScreenPlugin.java index 691f5a6..0c36403 100644 --- a/src/android/PrivacyScreenPlugin.java +++ b/src/android/PrivacyScreenPlugin.java @@ -24,12 +24,14 @@ /** * This class sets the FLAG_SECURE flag on the window to make the app - * private when shown in the task switcher + * private when shown in the task switcher and sets filterTouchesWhenObscured + * on the view object to mitgate 'Tapjacking' */ public class PrivacyScreenPlugin extends CordovaPlugin { @Override public void initialize(CordovaInterface cordova, CordovaWebView webView) { + webView.getView().setFilterTouchesWhenObscured(true); super.initialize(cordova, webView); Activity activity = this.cordova.getActivity(); activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);