Fixed issues in DashUpdatesFragment with thread safety
This commit is contained in:
parent
73e42558e3
commit
83911e44b5
1 changed files with 6 additions and 0 deletions
|
@ -84,6 +84,9 @@ public class DashDownloadMapsFragment extends DashBaseFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updateCount(String s) {
|
protected void updateCount(String s) {
|
||||||
|
if (DashDownloadMapsFragment.this.isDetached()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
File ms = getMyApplication().getAppPath(s);
|
File ms = getMyApplication().getAppPath(s);
|
||||||
if (ms.exists()) {
|
if (ms.exists()) {
|
||||||
File[] lf = ms.listFiles();
|
File[] lf = ms.listFiles();
|
||||||
|
@ -101,6 +104,9 @@ public class DashDownloadMapsFragment extends DashBaseFragment {
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Void result) {
|
protected void onPostExecute(Void result) {
|
||||||
super.onPostExecute(result);
|
super.onPostExecute(result);
|
||||||
|
if (DashDownloadMapsFragment.this.isDetached()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(countMaps > 0) {
|
if(countMaps > 0) {
|
||||||
long mb = 1 << 20;
|
long mb = 1 << 20;
|
||||||
long gb = 1 << 30;
|
long gb = 1 << 30;
|
||||||
|
|
Loading…
Reference in a new issue