Crash in Android < 3 fixed: getSupportActionBar() instead of getActionBar()
[pub/Android/ownCloud.git] / 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>();
 
         super.onCreate(savedInstanceState);
         mParents = new Stack<String>();
 
-        ActionBar actionBar = getSherlock().getActionBar();
+        ActionBar actionBar = getSupportActionBar();
         actionBar.setIcon(DisplayUtils.getSeasonalIconId());
 
         if (prepareStreamsToUpload()) {
         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("")){
 
         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{
         }
         else{
-            getActionBar().setTitle(current_dir);
+            getSupportActionBar().setTitle(current_dir);
         }
 
         String full_path = generatePath(mParents);
         }
 
         String full_path = generatePath(mParents);