change refreshAllFeeds() main thread call guard to exception.

This commit is contained in:
orionlee 2019-09-01 13:15:02 -07:00
parent 0ddda3a0d2
commit 8dc9939736
1 changed files with 1 additions and 2 deletions

View File

@ -158,8 +158,7 @@ public final class DBTasks {
}
if (Looper.myLooper() == Looper.getMainLooper()) {
Log.wtf(TAG, "DBTasks.refreshAllFeeds() must not be called from the main thread");
return;
throw new IllegalStateException("DBTasks.refreshAllFeeds() must not be called from the main thread.");
}
refreshFeeds(context, DBReader.getFeedList());