attempt to fix sporadic unmarshalling problems by setting bundle

classloader on saveinstancestate
This commit is contained in:
Andrew Dolgov 2013-10-22 18:34:21 +04:00
parent 0aae49e569
commit 5e99572c78
6 changed files with 7 additions and 0 deletions

View File

@ -369,6 +369,7 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
public void onSaveInstanceState (Bundle out) {
super.onSaveInstanceState(out);
out.setClassLoader(getClass().getClassLoader());
out.putParcelable("article", m_article);
}

View File

@ -261,6 +261,7 @@ public class ArticlePager extends Fragment {
public void onSaveInstanceState(Bundle out) {
super.onSaveInstanceState(out);
out.setClassLoader(getClass().getClassLoader());
out.putParcelable("article", m_article);
out.putParcelable("feed", m_feed);
}

View File

@ -247,6 +247,7 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
public void onSaveInstanceState (Bundle out) {
super.onSaveInstanceState(out);
out.setClassLoader(getClass().getClassLoader());
out.putParcelable("selectedCat", m_selectedCat);
out.putParcelable("cats", m_cats);
}

View File

@ -290,6 +290,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
public void onSaveInstanceState (Bundle out) {
super.onSaveInstanceState(out);
out.setClassLoader(getClass().getClassLoader());
out.putParcelable("selectedFeed", m_selectedFeed);
out.putParcelable("feeds", m_feeds);
out.putBoolean("feedIconsChecked", m_feedIconsChecked);

View File

@ -32,6 +32,8 @@ public class GlobalState extends Application {
}
public void save(Bundle out) {
out.setClassLoader(getClass().getClassLoader());
out.putParcelableArrayList("gs:loadedArticles", m_loadedArticles);
out.putParcelable("gs:activeFeed", m_activeFeed);
out.putParcelable("gs:activeArticle", m_activeArticle);

View File

@ -499,6 +499,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
public void onSaveInstanceState (Bundle out) {
super.onSaveInstanceState(out);
out.setClassLoader(getClass().getClassLoader());
out.putParcelable("feed", m_feed);
//out.putParcelable("articles", m_articles);
out.putParcelable("activeArticle", m_activeArticle);