Crash in Android < 3 fixed: getSupportActionBar() instead of getActionBar()
authorDavid A. Velasco <dvelasco@solidgear.es>
Fri, 31 Oct 2014 14:06:45 +0000 (15:06 +0100)
committerDavid A. Velasco <dvelasco@solidgear.es>
Fri, 31 Oct 2014 14:06:45 +0000 (15:06 +0100)
src/com/owncloud/android/ui/activity/Uploader.java

index ebc5f37..cdbcb97 100644 (file)
@@ -112,7 +112,7 @@ public class Uploader extends SherlockListActivity implements OnItemClickListene
         super.onCreate(savedInstanceState);
         mParents = new Stack<String>();
 
-        ActionBar actionBar = getSherlock().getActionBar();
+        ActionBar actionBar = getSupportActionBar();
         actionBar.setIcon(DisplayUtils.getSeasonalIconId());
 
         if (prepareStreamsToUpload()) {
@@ -332,10 +332,10 @@ public class Uploader extends SherlockListActivity implements OnItemClickListene
 
         String current_dir = mParents.peek();
         if(current_dir.equals("")){
-            getActionBar().setTitle(getString(R.string.default_display_name_for_root_folder));
+            getSupportActionBar().setTitle(getString(R.string.default_display_name_for_root_folder));
         }
         else{
-            getActionBar().setTitle(current_dir);
+            getSupportActionBar().setTitle(current_dir);
         }
 
         String full_path = generatePath(mParents);