SurfaceControlViewHost.setView keeps asking for system level permission


so i'm making an accessibility service and i'm trying to make an overlay with attachAccessibilityOverlayToDisplay and for that i need a SurfaceControl that according to docs i can set the view for the SurfaceControlViewHost with setView(View, int, int) (note in the docs it says setView(View, SurfaceControlViewHost.LayoutParams) but that's marked as @TestApi and it has @hide in javadocs (at least according to android studio)) but it throws a security exception that says "Requires INTERNAL_SYSTEM_WINDOW permission" which is apparently a system permission

so like idk what to do now

1
Feb 21 at 8:44 PM
User Avatar p851523
#android

No answer found for this question yet.