Add uninstall option in the capabilities confirm dialog
Uninstall option is visible only when the application of the service is not system App. It provides an efficient way to uninstall the App if users are shocked with the perimssions they need to grant. Bug: 176877955 Test: Install an App with AccessibilityService and uninstall it with this option. Change-Id: I6b60cc56d8d34c2983458a676b500035551ec9df
This commit is contained in:
@@ -381,4 +381,13 @@ final class AccessibilityUtil {
|
||||
return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, screenHeightDp,
|
||||
resources.getDisplayMetrics()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the accessibility service belongs to a system App.
|
||||
* @param info AccessibilityServiceInfo
|
||||
* @return {@code true} if the App is a system App.
|
||||
*/
|
||||
public static boolean isSystemApp(@NonNull AccessibilityServiceInfo info) {
|
||||
return info.getResolveInfo().serviceInfo.applicationInfo.isSystemApp();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user