Fix npe
This commit is contained in:
parent
b74b1f6d21
commit
19f23a38d3
2 changed files with 4 additions and 2 deletions
|
@ -76,7 +76,8 @@ public class DownloadActivity extends BaseDownloadActivity {
|
|||
updateDescriptionTextWithSize(this, downloadProgressLayout);
|
||||
int currentTab = 0;
|
||||
String tab = getIntent() == null || getIntent().getExtras() == null ? null : getIntent().getExtras().getString(TAB_TO_OPEN);
|
||||
switch (tab) {
|
||||
if (tab != null) {
|
||||
switch (tab) {
|
||||
case DOWNLOAD_TAB:
|
||||
currentTab = DOWNLOAD_TAB_NUMBER;
|
||||
break;
|
||||
|
@ -86,6 +87,7 @@ public class DownloadActivity extends BaseDownloadActivity {
|
|||
case UPDATES_TAB:
|
||||
currentTab = UPDATES_TAB_NUMBER;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
viewPager = (ViewPager) findViewById(R.id.pager);
|
||||
|
|
|
@ -1054,7 +1054,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
|||
if (child.getSize() > 100) {
|
||||
builder.append(DownloadActivity.formatMb.format(new Object[]{(float) child.getSize() / (1 << 10)}));
|
||||
} else {
|
||||
builder.append(child.getSize()).append(" kB");
|
||||
builder.append(child.getSize()).append(" KB");
|
||||
}
|
||||
builder.append(" • ");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue