fix crash when switching activities while downloading offline stuff
This commit is contained in:
parent
cf39cea333
commit
282285ef78
@ -464,6 +464,11 @@ public class OfflineDownloadService extends Service {
|
||||
|
||||
@Override
|
||||
public void onStart(Intent intent, int startId) {
|
||||
try {
|
||||
if (getWritableDb().isDbLockedByCurrentThread() || getWritableDb().isDbLockedByOtherThreads()) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_sessionId = intent.getStringExtra("sessionId");
|
||||
|
||||
if (!m_downloadInProgress) {
|
||||
@ -474,5 +479,8 @@ public class OfflineDownloadService extends Service {
|
||||
|
||||
downloadCategories();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user