On main Activity, I do the following to have these methods run in the background thread.
private void doInBackground() {
final Activity a = this;
AsyncTask.execute(new Runnable() {
@Override
public void run() {
bindDb();
new MessageSynchronizer(a);
NotifHelper.cancelNotifications(a);
MessageHelper.updateMyLastSeen();
versioning();
}
});
}
Then I want to know if the following method, called from above is running in the UiThread or the thread which called it above.
private void bindDb() {
DatabaseHelper databaseHelper = new DatabaseHelper(this);
databaseHelper.getWritableDatabase();
databaseHelper.getDatabaseName();
databaseHelper.close();
}