Skip to content

Commit 35b7b24

Browse files
author
Shushant
committed
Added runInBackground method
1 parent ad42e02 commit 35b7b24

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/org/opendroidphp/app/AppController.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,21 @@ public void run() {
5757
*
5858
* @param r Runnable to run
5959
*/
60-
public void runInApplicationThread(Runnable r) {
60+
public static void runInApplicationThread(Runnable r) {
6161
mApplicationHandler.post(r);
6262
}
6363

64+
/**
65+
* Run a runnable in the background thread
66+
*
67+
* @param r Runnable to run
68+
*/
69+
public static void runInBackground(Runnable r) {
70+
Thread thread = new Thread(r);
71+
thread.start();
72+
}
73+
74+
6475
@Override
6576
public void onCreate() {
6677
super.onCreate();

0 commit comments

Comments
 (0)