diff --git a/src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java b/src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java index 65947f2fcc..878f1ceae9 100755 --- a/src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java +++ b/src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java @@ -175,7 +175,7 @@ public class ReceiveExternalFilesActivity extends FileActivity super.onCreate(savedInstanceState); if (mAccountSelected) { - setAccount((Account) savedInstanceState.getParcelable(FileActivity.EXTRA_ACCOUNT)); + setAccount(savedInstanceState.getParcelable(FileActivity.EXTRA_ACCOUNT)); } // Listen for sync messages @@ -777,12 +777,16 @@ public class ReceiveExternalFilesActivity extends FileActivity getStorageManager(), getAccount()); mListView.setAdapter(sa); + } Button btnChooseFolder = (Button) findViewById(R.id.uploader_choose_folder); btnChooseFolder.setOnClickListener(this); btnChooseFolder.getBackground().setColorFilter(ThemeUtils.primaryColor(getAccount()), PorterDuff.Mode.SRC_ATOP); - getSupportActionBar().setBackgroundDrawable(new ColorDrawable(ThemeUtils.primaryColor(getAccount()))); + if (getSupportActionBar() != null) { + getSupportActionBar().setBackgroundDrawable(new ColorDrawable( + ThemeUtils.primaryColor(getAccount()))); + } ThemeUtils.colorStatusBar(this, ThemeUtils.primaryDarkColor(getAccount())); @@ -794,7 +798,6 @@ public class ReceiveExternalFilesActivity extends FileActivity mListView.setOnItemClickListener(this); } } - } protected void setupEmptyList() { mEmptyListContainer = (LinearLayout) findViewById(R.id.empty_list_view);