Add activity for MANAGE_APP_OVERLAY_PERMISSION intent in Settings
In order to support system use-cases, such as when the user wants do revoke SYSTEM_ALERT_WINDOW (SAW) permission via notification, we are introducing a new intent, MANAGE_APP_OVERLAY_PERMISSION (notice the "APP_"), that directs the user to the app-specific screen to toggle SAW permission. This activity can only be started if the caller has INTERNAL_SYSTEM_WINDOW permission, which sysui and the system have. Test: atest TestManageOverlayPermissionIntents (cts in one of the topic CLs) Test: Let an app draw on top of other apps, via its notification go to settings, verify that the screen for controlling such capability for the app is dispayed. Bug: 135920175 Change-Id: I2f7e02a1242af7a22098359aeb230888fb8d4f3a
This commit is contained in:
@@ -2721,6 +2721,19 @@
|
||||
android:value="com.android.settings.applications.manageapplications.ManageApplications" />
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="Settings$AppDrawOverlaySettingsActivity"
|
||||
android:label="@string/draw_overlay"
|
||||
android:permission="android.permission.INTERNAL_SYSTEM_WINDOW">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.settings.MANAGE_APP_OVERLAY_PERMISSION" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:scheme="package" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||
android:value="com.android.settings.applications.appinfo.DrawOverlayDetails" />
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="Settings$WriteSettingsActivity"
|
||||
android:label="@string/write_settings_title">
|
||||
|
@@ -138,6 +138,7 @@ public class Settings extends SettingsActivity {
|
||||
public static class OverlaySettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class WriteSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class ChangeWifiStateActivity extends SettingsActivity { /* empty */ }
|
||||
public static class AppDrawOverlaySettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class AppWriteSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
|
||||
public static class ManageExternalSourcesActivity extends SettingsActivity {/* empty */ }
|
||||
|
Reference in New Issue
Block a user