MCPcopy Create free account
hub / github.com/AccessKit/accesskit / get_or_create_java_id

Method get_or_create_java_id

platforms/android/src/util.rs:74–87  ·  view source on GitHub ↗
(&mut self, node: &Node)

Source from the content-addressed store, hash-verified

72 }
73
74 pub(crate) fn get_or_create_java_id(&mut self, node: &Node) -> jint {
75 if node.is_root() {
76 return HOST_VIEW_ID;
77 }
78 let accesskit_id = node.id();
79 if let Some(id) = self.accesskit_to_java.get(&accesskit_id) {
80 return *id;
81 }
82 let java_id = self.next_java_id;
83 self.next_java_id += 1;
84 self.accesskit_to_java.insert(accesskit_id, java_id);
85 self.java_to_accesskit.insert(java_id, accesskit_id);
86 java_id
87 }
88}
89
90pub(crate) fn bundle_contains_key(env: &mut JNIEnv, bundle: &JObject, key: &str) -> bool {

Callers 5

node_updatedMethod · 0.80
find_focusMethod · 0.80
virtual_view_at_pointMethod · 0.80
populate_node_infoMethod · 0.80

Calls 3

getMethod · 0.80
is_rootMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected