From 8a39a17cb18f7a06354c7957ac7b3d408ac4573a Mon Sep 17 00:00:00 2001 From: Bars107 Date: Tue, 2 Dec 2014 15:49:46 +0200 Subject: [PATCH] Fixed NPE for Android 5.0 --- OsmAnd/src/net/osmand/plus/download/BaseDownloadActivity.java | 1 + OsmAnd/src/net/osmand/plus/download/DownloadActivity.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/BaseDownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/BaseDownloadActivity.java index bde60a9bca..1db2821318 100644 --- a/OsmAnd/src/net/osmand/plus/download/BaseDownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/BaseDownloadActivity.java @@ -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); } diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index 3a52cb9fa8..977cf51f1e 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -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);