MCPcopy Create free account
hub / github.com/NativeScript/android / Class1

Class Class1

test-app/app/src/main/java/com/tns/tests/Class1.java:7–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import android.util.Log;
6
7public class Class1 {
8 public static boolean IsCollected;
9
10 public Class1() {
11 IsCollected = false;
12 }
13
14 public String getMessage() {
15 return "Hello from Class1 instance";
16 }
17
18 @Override
19 protected void finalize() {
20 IsCollected = true;
21 }
22
23 public interface Callback1 {
24 String getMessage();
25 }
26
27 public static class Class2 {
28 public static boolean printMessageWithDelay(final Callback1 cb, final long delay) {
29 Handler mainThreadHandler = new Handler(Looper.getMainLooper());
30
31 Runnable r = new Runnable() {
32 @Override
33 public void run() {
34 String s = cb.getMessage();
35 Log.d("TestApp", "printMessgeWithDelay=" + s);
36 }
37 };
38
39 boolean success = mainThreadHandler.postDelayed(r, delay);
40
41 return success;
42 }
43 }
44}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected