1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-05 03:50:07 +00:00

Restructured android threading code to re-use threading code in juce_posix_Shared.h

This commit is contained in:
hogliux 2017-04-12 18:13:16 +01:00
parent 6c7bb37720
commit 86e28d1e42
5 changed files with 102 additions and 292 deletions

View file

@ -1211,36 +1211,8 @@ public class JuceAppActivity extends Activity
return null;
}
public final int setCurrentThreadPriority (int priority)
{
android.os.Process.setThreadPriority (android.os.Process.myTid(), priority);
return android.os.Process.getThreadPriority (android.os.Process.myTid());
}
public final boolean hasSystemFeature (String property)
{
return getPackageManager().hasSystemFeature (property);
}
private static class JuceThread extends Thread
{
public JuceThread (long host, String threadName, long threadStackSize)
{
super (null, null, threadName, threadStackSize);
_this = host;
}
public void run()
{
runThread(_this);
}
private native void runThread (long host);
private long _this;
}
public final Thread createNewThread(long host, String threadName, long threadStackSize)
{
return new JuceThread(host, threadName, threadStackSize);
}
}