How can you pass an argument to QtActivity runOnUiThread ?
Example with no argument:
public void hide()
{
m_activity.runOnUiThread( new Runnable() {
@Override
public void run() {
if (m_dialog != null && m_dialog.isShowing())
m_dialog.dismiss();
reset();
}
});
}
My goal is to temporarily disable power saving during a log-running Bluetooth
transfer by clearing the Window flag FLAG_KEEP_SCREEN_ON
public void setKeepScreenOn(boolean keepScreenOn)
{
m_activity.runOnUiThread( new Runnable() {
@Override
public void run() {
if (keepScreenOn) {
m_instance.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
return;
}
// Else let it go back to sleep and save power
m_instance.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
});
}
-Ed_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest