MCPcopy Index your code
hub / github.com/golang/mobile / getRune

Method getRune

app/GoNativeActivity.java:24–37  ·  view source on GitHub ↗
(int deviceId, int keyCode, int metaState)

Source from the content-addressed store, hash-verified

22 }
23
24 static int getRune(int deviceId, int keyCode, int metaState) {
25 try {
26 int rune = KeyCharacterMap.load(deviceId).get(keyCode, metaState);
27 if (rune == 0) {
28 return -1;
29 }
30 return rune;
31 } catch (KeyCharacterMap.UnavailableException e) {
32 return -1;
33 } catch (Exception e) {
34 Log.e("Go", "exception reading KeyCharacterMap", e);
35 return -1;
36 }
37 }
38
39 private void load() {
40 // Interestingly, NativeActivity uses a different method

Callers

nothing calls this directly

Calls 3

loadMethod · 0.80
getMethod · 0.45
eMethod · 0.45

Tested by

no test coverage detected