@@ -1765,8 +1765,7 @@ public boolean canPerformActionLocked(Service service, int windowId, int action,
17651765 Bundle arguments ) {
17661766 return canRetrieveWindowContent (service )
17671767 && isRetrievalAllowingWindow (windowId )
1768- && isActionPermitted (action )
1769- && isActionArgumentsValid (action , arguments );
1768+ && isActionPermitted (action );
17701769 }
17711770
17721771 public boolean canRetrieveWindowContent (Service service ) {
@@ -1790,29 +1789,6 @@ private boolean isActionPermitted(int action) {
17901789 return (VALID_ACTIONS & action ) != 0 ;
17911790 }
17921791
1793- private boolean isActionArgumentsValid (int action , Bundle arguments ) {
1794- switch (action ) {
1795- case AccessibilityNodeInfo .ACTION_NEXT_AT_GRANULARITY :
1796- case AccessibilityNodeInfo .ACTION_PREVIOUS_AT_GRANULARITY : {
1797- if (arguments .size () == 1 ) {
1798- final int granularity = arguments .getInt (
1799- AccessibilityNodeInfo .ACTION_ARGUMENT_GRANULARITY_INT );
1800- return (granularity & VALID_GRANULARITIES ) != 0
1801- && Integer .bitCount (granularity ) == 1 ;
1802- }
1803- } break ;
1804- case AccessibilityNodeInfo .ACTION_NEXT_HTML_ELEMENT :
1805- case AccessibilityNodeInfo .ACTION_PREVIOUS_HTML_ELEMENT : {
1806- if (arguments .size () == 1 ) {
1807- String element = arguments .getString (
1808- AccessibilityNodeInfo .ACTION_ARGUMENT_HTML_ELEMENT_STRING );
1809- return !TextUtils .isEmpty (element );
1810- }
1811- } break ;
1812- }
1813- return false ;
1814- }
1815-
18161792 private void enforceCallingPermission (String permission , String function ) {
18171793 if (OWN_PROCESS_ID == Binder .getCallingPid ()) {
18181794 return ;
0 commit comments