Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -937,4 +937,10 @@ public interface AutomatorService {
*/
@JsonRpcErrors({@JsonRpcError(exception=NotImplementedException.class, code=ERROR_CODE_BASE)})
String toast(String switchStatus) throws NotImplementedException;

/**
* Method used to clear hierarachy in case of an update not occurring
*/
@JsonRpcErrors({@JsonRpcError(exception=UiAutomator2Exception.class, code=ERROR_CODE_BASE)})
void clearHierarchyCache();
}
Original file line number Diff line number Diff line change
Expand Up @@ -1641,4 +1641,14 @@ public String toast(String switchStatus) throws NotImplementedException {
}
return null;
}

@Override
public void clearHierarchyCache() {
try {
ReflectionUtils.clearAccessibilityCache();
}catch (Exception e) {
e.printStackTrace();
throw new UiAutomator2Exception(e);
}
}
}