blob: 1878b3c111556f6ad6a30bc79dbdaae017376c91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
package org.fox.ttrss;
import android.os.Bundle;
import org.acra.ACRA;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;
import org.fox.ttrss.types.ArticleList;
@ReportsCrashes(formKey = "", mode = ReportingInteractionMode.DIALOG,
excludeMatchingSharedPreferencesKeys = {"password"},
resDialogText = R.string.crash_dialog_text,
formUri = "http://tt-rss.org/acra/submit/")
public class Application extends android.app.Application {
private static Application m_singleton;
public ArticleList tmpArticleList;
//public Feed m_activeFeed;
//public Article m_activeArticle;
public int m_selectedArticleId;
public String m_sessionId;
public int m_apiLevel;
public boolean m_canUseProgress;
public static Application getInstance(){
return m_singleton;
}
@Override
public final void onCreate() {
super.onCreate();
if (!BuildConfig.DEBUG) {
ACRA.init(this);
}
m_singleton = this;
}
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);
out.putString("gs:sessionId", m_sessionId);
out.putInt("gs:apiLevel", m_apiLevel);
out.putBoolean("gs:canUseProgress", m_canUseProgress);
out.putInt("gs:selectedArticleId", m_selectedArticleId);
}
public void load(Bundle in) {
if (/* m_loadedArticles.size() == 0 && */ in != null) {
/* ArrayList<Parcelable> list = in.getParcelableArrayList("gs:loadedArticles");
for (Parcelable p : list) {
m_loadedArticles.add((Article)p);
} */
//m_activeFeed = (Feed) in.getParcelable("gs:activeFeed");
//m_activeArticle = (Article) in.getParcelable("gs:activeArticle");
m_sessionId = in.getString("gs:sessionId");
m_apiLevel = in.getInt("gs:apiLevel");
m_canUseProgress = in.getBoolean("gs:canUseProgress");
m_selectedArticleId = in.getInt("gs:selectedArticleId");
}
}
}
|