RESTRICT AUTOMERGE
Don't allow tapjacking permissioncontroller

Use the filterTouchesWhenObscured attribute throughout the permission
controller.

Bug: 155287782
Test: Manual using PoC app from b/154015447#comment1
Change-Id: I205395fdcabe68055df15ce9414468a833a0807c
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index f939175..2e17674 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -126,7 +126,7 @@
         <activity android:name=".permission.ui.GrantPermissionsActivity"
                 android:configChanges="orientation|keyboardHidden|screenSize"
                 android:excludeFromRecents="true"
-                android:theme="@style/GrantPermissions"
+                android:theme="@style/GrantPermissions.FilterTouches"
                 android:visibleToInstantApps="true">
             <intent-filter android:priority="1">
                 <action android:name="android.content.pm.action.REQUEST_PERMISSIONS" />
@@ -138,7 +138,7 @@
                   android:configChanges="orientation|keyboardHidden|screenSize"
                   android:excludeFromRecents="true"
                   android:label="@string/app_permissions"
-                  android:theme="@style/Settings"
+                  android:theme="@style/Settings.FilterTouches"
                   android:permission="android.permission.GRANT_RUNTIME_PERMISSIONS">
             <intent-filter android:priority="1">
                 <action android:name="android.intent.action.MANAGE_PERMISSIONS" />
diff --git a/res/values/themes.xml b/res/values/themes.xml
index a88674a..bd56bc3 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -38,6 +38,7 @@
         <item name="android:textAppearanceMedium">@style/MediumText</item>
         <item name="android:textAppearanceSmall">@style/SmallText</item>
         <item name="android:titleTextStyle">@style/TitleText</item>
+        <item name="android:filterTouchesWhenObscured">true</item>
     </style>
 
     <style name="DialogWhenLargeNoAnimation" parent="DialogWhenLarge">
@@ -54,4 +55,20 @@
     </style>
 
 
+
+
+<!-- Do not allow OEMs to overlay these themes.
+ Must Guarantee that filterTouches is set for these activities -->
+    <style name="FilterTouches">
+        <item name="android:filterTouchesWhenObscured">true</item>
+    </style>
+
+    <style name="Settings.FilterTouches">
+        <item name="android:filterTouchesWhenObscured">true</item>
+    </style>
+
+    <style name="GrantPermissions.FilterTouches">
+        <item name="android:filterTouchesWhenObscured">true</item>
+    </style>
+
 </resources>