Fixed NPE for Android 5.0

This commit is contained in:
Bars107 2014-12-02 15:49:46 +02:00
parent 7b031e444e
commit 8a39a17cb1
2 changed files with 2 additions and 2 deletions

View file

@ -44,6 +44,7 @@ public class BaseDownloadActivity extends SherlockFragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
settings = ((OsmandApplication) getApplication()).getSettings();
if(downloadListIndexThread == null) {
downloadListIndexThread = new DownloadIndexesThread(this);
}

View file

@ -74,8 +74,7 @@ public class DownloadActivity extends BaseDownloadActivity {
setProgressBarIndeterminateVisibility(false);
setContentView(R.layout.tab_content);
settings = ((OsmandApplication) getApplication()).getSettings();
tabHost = (TabHost) findViewById(android.R.id.tabhost);
tabHost.setup();
ViewPager viewPager = (ViewPager) findViewById(R.id.pager);