diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 0c816ffb..59a3223e 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -24,7 +24,7 @@ + android:name=".offline.OfflineActivity" > + android:name=".org.fox.ttrss.offline.OfflineDownloadServicedService" /> + android:name=".org.fox.ttrss.offline.OfflineUploadServiceineUploadService" /> + android:name=".util.ImageCacheService" /> - + - + - + - - \ No newline at end of file + \ No newline at end of file diff --git a/src/org/fox/ttrss/ApiRequest.java b/src/org/fox/ttrss/ApiRequest.java index 26e7f270..39b5a576 100644 --- a/src/org/fox/ttrss/ApiRequest.java +++ b/src/org/fox/ttrss/ApiRequest.java @@ -20,6 +20,7 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.protocol.BasicHttpContext; import org.apache.http.protocol.HttpContext; +import org.fox.ttrss.util.EasySSLSocketFactory; import android.content.Context; import android.content.SharedPreferences; diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java index d4677203..098ff6f9 100644 --- a/src/org/fox/ttrss/ArticleFragment.java +++ b/src/org/fox/ttrss/ArticleFragment.java @@ -6,6 +6,8 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; +import org.fox.ttrss.types.Article; +import org.fox.ttrss.types.Attachment; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; diff --git a/src/org/fox/ttrss/ArticleList.java b/src/org/fox/ttrss/ArticleList.java index 77024c74..2ff61e59 100644 --- a/src/org/fox/ttrss/ArticleList.java +++ b/src/org/fox/ttrss/ArticleList.java @@ -2,6 +2,8 @@ package org.fox.ttrss; import java.util.ArrayList; +import org.fox.ttrss.types.Article; + import android.os.Parcel; import android.os.Parcelable; diff --git a/src/org/fox/ttrss/ArticlePager.java b/src/org/fox/ttrss/ArticlePager.java index 904d8a88..6cf62836 100644 --- a/src/org/fox/ttrss/ArticlePager.java +++ b/src/org/fox/ttrss/ArticlePager.java @@ -1,5 +1,8 @@ package org.fox.ttrss; +import org.fox.ttrss.types.Article; +import org.fox.ttrss.util.FragmentStatePagerAdapter; + import android.app.Activity; import android.app.Fragment; import android.app.FragmentManager; diff --git a/src/org/fox/ttrss/FeedCategoriesFragment.java b/src/org/fox/ttrss/FeedCategoriesFragment.java index eb1cd0a8..b2b378bc 100644 --- a/src/org/fox/ttrss/FeedCategoriesFragment.java +++ b/src/org/fox/ttrss/FeedCategoriesFragment.java @@ -7,6 +7,8 @@ import java.util.Comparator; import java.util.HashMap; import java.util.List; +import org.fox.ttrss.types.FeedCategory; + import android.app.Activity; import android.app.Fragment; import android.content.Context; diff --git a/src/org/fox/ttrss/FeedCategoryList.java b/src/org/fox/ttrss/FeedCategoryList.java index e78f8747..71e99161 100644 --- a/src/org/fox/ttrss/FeedCategoryList.java +++ b/src/org/fox/ttrss/FeedCategoryList.java @@ -2,6 +2,9 @@ package org.fox.ttrss; import java.util.ArrayList; +import org.fox.ttrss.types.Feed; +import org.fox.ttrss.types.FeedCategory; + import android.os.Parcel; import android.os.Parcelable; diff --git a/src/org/fox/ttrss/FeedList.java b/src/org/fox/ttrss/FeedList.java index c54ef780..2d3f0933 100644 --- a/src/org/fox/ttrss/FeedList.java +++ b/src/org/fox/ttrss/FeedList.java @@ -2,6 +2,8 @@ package org.fox.ttrss; import java.util.ArrayList; +import org.fox.ttrss.types.Feed; + import android.os.Parcel; import android.os.Parcelable; diff --git a/src/org/fox/ttrss/FeedsFragment.java b/src/org/fox/ttrss/FeedsFragment.java index 2ad43550..38e8b48c 100644 --- a/src/org/fox/ttrss/FeedsFragment.java +++ b/src/org/fox/ttrss/FeedsFragment.java @@ -24,6 +24,9 @@ import org.apache.http.conn.scheme.Scheme; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.protocol.BasicHttpContext; import org.apache.http.protocol.HttpContext; +import org.fox.ttrss.types.Feed; +import org.fox.ttrss.types.FeedCategory; +import org.fox.ttrss.util.EasySSLSocketFactory; import android.app.Activity; import android.app.Fragment; diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index 9141f48f..acfeeb27 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -11,6 +11,9 @@ import java.util.HashMap; import java.util.List; import java.util.TimeZone; +import org.fox.ttrss.types.Article; +import org.fox.ttrss.types.Attachment; +import org.fox.ttrss.types.Feed; import org.jsoup.Jsoup; import android.app.Activity; diff --git a/src/org/fox/ttrss/Label.java b/src/org/fox/ttrss/Label.java deleted file mode 100644 index eccc1e66..00000000 --- a/src/org/fox/ttrss/Label.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.fox.ttrss; - -public class Label { - int id; - String caption; - String fg_color; - String bg_color; - boolean checked; -} diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index 154a19df..23e06513 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -6,6 +6,18 @@ import java.util.List; import java.util.Timer; import java.util.TimerTask; +import org.fox.ttrss.billing.BillingHelper; +import org.fox.ttrss.billing.BillingService; +import org.fox.ttrss.offline.OfflineActivity; +import org.fox.ttrss.offline.OfflineDownloadService; +import org.fox.ttrss.offline.OfflineUploadService; +import org.fox.ttrss.types.Article; +import org.fox.ttrss.types.Feed; +import org.fox.ttrss.types.FeedCategory; +import org.fox.ttrss.types.Label; +import org.fox.ttrss.util.AppRater; +import org.fox.ttrss.util.DatabaseHelper; + import android.animation.LayoutTransition; import android.app.Activity; import android.app.AlertDialog; diff --git a/src/org/fox/ttrss/OnlineServices.java b/src/org/fox/ttrss/OnlineServices.java index a4a10f08..3f61276a 100644 --- a/src/org/fox/ttrss/OnlineServices.java +++ b/src/org/fox/ttrss/OnlineServices.java @@ -1,5 +1,9 @@ package org.fox.ttrss; +import org.fox.ttrss.types.Article; +import org.fox.ttrss.types.Feed; +import org.fox.ttrss.types.FeedCategory; + public interface OnlineServices { public enum RelativeArticle { BEFORE, AFTER }; diff --git a/src/org/fox/ttrss/BillingConstants.java b/src/org/fox/ttrss/billing/BillingConstants.java similarity index 96% rename from src/org/fox/ttrss/BillingConstants.java rename to src/org/fox/ttrss/billing/BillingConstants.java index ea8b454c..eb440219 100644 --- a/src/org/fox/ttrss/BillingConstants.java +++ b/src/org/fox/ttrss/billing/BillingConstants.java @@ -1,4 +1,4 @@ -package org.fox.ttrss; +package org.fox.ttrss.billing; public class BillingConstants { diff --git a/src/org/fox/ttrss/BillingHelper.java b/src/org/fox/ttrss/billing/BillingHelper.java similarity index 95% rename from src/org/fox/ttrss/BillingHelper.java rename to src/org/fox/ttrss/billing/BillingHelper.java index e29fd2f7..dcf29322 100644 --- a/src/org/fox/ttrss/BillingHelper.java +++ b/src/org/fox/ttrss/billing/BillingHelper.java @@ -1,4 +1,4 @@ -package org.fox.ttrss; +package org.fox.ttrss.billing; import java.util.ArrayList; @@ -12,8 +12,9 @@ import android.os.RemoteException; import android.util.Log; import com.android.vending.billing.IMarketBillingService; -import org.fox.ttrss.BillingSecurity.VerifiedPurchase; -import org.fox.ttrss.BillingConstants.ResponseCode; + +import org.fox.ttrss.billing.BillingConstants.ResponseCode; +import org.fox.ttrss.billing.BillingSecurity.VerifiedPurchase; public class BillingHelper { @@ -34,7 +35,7 @@ public class BillingHelper { mCompletedHandler = handler; } - protected static boolean isBillingSupported() { + public static boolean isBillingSupported() { if (amIDead()) { return false; } @@ -67,7 +68,7 @@ public class BillingHelper { * @param activityContext * @param itemId */ - protected static void requestPurchase(Context activityContext, String itemId){ + public static void requestPurchase(Context activityContext, String itemId){ if (amIDead()) { return; } diff --git a/src/org/fox/ttrss/BillingReceiver.java b/src/org/fox/ttrss/billing/BillingReceiver.java similarity index 74% rename from src/org/fox/ttrss/BillingReceiver.java rename to src/org/fox/ttrss/billing/BillingReceiver.java index 3371f97b..9b772054 100644 --- a/src/org/fox/ttrss/BillingReceiver.java +++ b/src/org/fox/ttrss/billing/BillingReceiver.java @@ -1,13 +1,13 @@ -package org.fox.ttrss; +package org.fox.ttrss.billing; -import static org.fox.ttrss.BillingConstants.ACTION_NOTIFY; -import static org.fox.ttrss.BillingConstants.ACTION_PURCHASE_STATE_CHANGED; -import static org.fox.ttrss.BillingConstants.ACTION_RESPONSE_CODE; -import static org.fox.ttrss.BillingConstants.INAPP_REQUEST_ID; -import static org.fox.ttrss.BillingConstants.INAPP_RESPONSE_CODE; -import static org.fox.ttrss.BillingConstants.INAPP_SIGNATURE; -import static org.fox.ttrss.BillingConstants.INAPP_SIGNED_DATA; -import static org.fox.ttrss.BillingConstants.NOTIFICATION_ID; +import static org.fox.ttrss.billing.BillingConstants.ACTION_NOTIFY; +import static org.fox.ttrss.billing.BillingConstants.ACTION_PURCHASE_STATE_CHANGED; +import static org.fox.ttrss.billing.BillingConstants.ACTION_RESPONSE_CODE; +import static org.fox.ttrss.billing.BillingConstants.INAPP_REQUEST_ID; +import static org.fox.ttrss.billing.BillingConstants.INAPP_RESPONSE_CODE; +import static org.fox.ttrss.billing.BillingConstants.INAPP_SIGNATURE; +import static org.fox.ttrss.billing.BillingConstants.INAPP_SIGNED_DATA; +import static org.fox.ttrss.billing.BillingConstants.NOTIFICATION_ID; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; diff --git a/src/org/fox/ttrss/BillingSecurity.java b/src/org/fox/ttrss/billing/BillingSecurity.java similarity index 99% rename from src/org/fox/ttrss/BillingSecurity.java rename to src/org/fox/ttrss/billing/BillingSecurity.java index 26e19b3e..513d6f34 100644 --- a/src/org/fox/ttrss/BillingSecurity.java +++ b/src/org/fox/ttrss/billing/BillingSecurity.java @@ -1,6 +1,6 @@ // Copyright 2010 Google Inc. All Rights Reserved. -package org.fox.ttrss; +package org.fox.ttrss.billing; import java.security.InvalidKeyException; import java.security.KeyFactory; @@ -21,7 +21,7 @@ import org.json.JSONObject; import android.text.TextUtils; import android.util.Log; -import org.fox.ttrss.BillingConstants.PurchaseState; +import org.fox.ttrss.billing.BillingConstants.PurchaseState; import org.fox.ttrss.util.Base64; import org.fox.ttrss.util.Base64DecoderException; diff --git a/src/org/fox/ttrss/BillingService.java b/src/org/fox/ttrss/billing/BillingService.java similarity index 94% rename from src/org/fox/ttrss/BillingService.java rename to src/org/fox/ttrss/billing/BillingService.java index e003df32..2ae53234 100644 --- a/src/org/fox/ttrss/BillingService.java +++ b/src/org/fox/ttrss/billing/BillingService.java @@ -1,4 +1,4 @@ -package org.fox.ttrss; +package org.fox.ttrss.billing; import android.app.Service; import android.content.ComponentName; diff --git a/src/org/fox/ttrss/OfflineActivity.java b/src/org/fox/ttrss/offline/OfflineActivity.java similarity index 98% rename from src/org/fox/ttrss/OfflineActivity.java rename to src/org/fox/ttrss/offline/OfflineActivity.java index 6221dd72..8849d67e 100644 --- a/src/org/fox/ttrss/OfflineActivity.java +++ b/src/org/fox/ttrss/offline/OfflineActivity.java @@ -1,6 +1,18 @@ -package org.fox.ttrss; +package org.fox.ttrss.offline; +import org.fox.ttrss.DummyFragment; +import org.fox.ttrss.MainActivity; +import org.fox.ttrss.OnlineServices; +import org.fox.ttrss.PreferencesActivity; +import org.fox.ttrss.R; import org.fox.ttrss.OnlineServices.RelativeArticle; +import org.fox.ttrss.R.anim; +import org.fox.ttrss.R.id; +import org.fox.ttrss.R.layout; +import org.fox.ttrss.R.menu; +import org.fox.ttrss.R.string; +import org.fox.ttrss.R.style; +import org.fox.ttrss.util.DatabaseHelper; import android.animation.LayoutTransition; import android.app.Activity; diff --git a/src/org/fox/ttrss/OfflineArticleFragment.java b/src/org/fox/ttrss/offline/OfflineArticleFragment.java similarity index 93% rename from src/org/fox/ttrss/OfflineArticleFragment.java rename to src/org/fox/ttrss/offline/OfflineArticleFragment.java index 241a6ea0..893a7d28 100644 --- a/src/org/fox/ttrss/OfflineArticleFragment.java +++ b/src/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -1,8 +1,14 @@ -package org.fox.ttrss; +package org.fox.ttrss.offline; import java.text.SimpleDateFormat; import java.util.Date; +import org.fox.ttrss.R; +import org.fox.ttrss.R.attr; +import org.fox.ttrss.R.id; +import org.fox.ttrss.R.layout; +import org.fox.ttrss.R.menu; +import org.fox.ttrss.util.ImageCacheService; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; diff --git a/src/org/fox/ttrss/OfflineArticlePager.java b/src/org/fox/ttrss/offline/OfflineArticlePager.java similarity index 90% rename from src/org/fox/ttrss/OfflineArticlePager.java rename to src/org/fox/ttrss/offline/OfflineArticlePager.java index d51d9067..0e3d87ee 100644 --- a/src/org/fox/ttrss/OfflineArticlePager.java +++ b/src/org/fox/ttrss/offline/OfflineArticlePager.java @@ -1,4 +1,9 @@ -package org.fox.ttrss; +package org.fox.ttrss.offline; + +import org.fox.ttrss.R; +import org.fox.ttrss.R.id; +import org.fox.ttrss.R.layout; +import org.fox.ttrss.util.FragmentStatePagerAdapter; import android.app.Activity; import android.app.Fragment; diff --git a/src/org/fox/ttrss/OfflineDownloadService.java b/src/org/fox/ttrss/offline/OfflineDownloadService.java similarity index 93% rename from src/org/fox/ttrss/OfflineDownloadService.java rename to src/org/fox/ttrss/offline/OfflineDownloadService.java index ba5aba1f..f9dc0bc1 100644 --- a/src/org/fox/ttrss/OfflineDownloadService.java +++ b/src/org/fox/ttrss/offline/OfflineDownloadService.java @@ -1,9 +1,18 @@ -package org.fox.ttrss; +package org.fox.ttrss.offline; import java.lang.reflect.Type; import java.util.HashMap; import java.util.List; +import org.fox.ttrss.ApiRequest; +import org.fox.ttrss.MainActivity; +import org.fox.ttrss.R; +import org.fox.ttrss.R.drawable; +import org.fox.ttrss.R.string; +import org.fox.ttrss.types.Article; +import org.fox.ttrss.types.Feed; +import org.fox.ttrss.util.DatabaseHelper; +import org.fox.ttrss.util.ImageCacheService; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; diff --git a/src/org/fox/ttrss/OfflineFeedsFragment.java b/src/org/fox/ttrss/offline/OfflineFeedsFragment.java similarity index 94% rename from src/org/fox/ttrss/OfflineFeedsFragment.java rename to src/org/fox/ttrss/offline/OfflineFeedsFragment.java index 41ef6e02..abdfe756 100644 --- a/src/org/fox/ttrss/OfflineFeedsFragment.java +++ b/src/org/fox/ttrss/offline/OfflineFeedsFragment.java @@ -1,7 +1,13 @@ -package org.fox.ttrss; +package org.fox.ttrss.offline; import java.io.File; +import org.fox.ttrss.R; +import org.fox.ttrss.R.drawable; +import org.fox.ttrss.R.id; +import org.fox.ttrss.R.layout; +import org.fox.ttrss.R.menu; + import android.app.Activity; import android.app.Fragment; import android.content.Context; diff --git a/src/org/fox/ttrss/OfflineHeadlinesFragment.java b/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java similarity index 95% rename from src/org/fox/ttrss/OfflineHeadlinesFragment.java rename to src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index e4a40b13..59dc7046 100644 --- a/src/org/fox/ttrss/OfflineHeadlinesFragment.java +++ b/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -1,10 +1,16 @@ -package org.fox.ttrss; +package org.fox.ttrss.offline; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; +import org.fox.ttrss.R; +import org.fox.ttrss.R.drawable; +import org.fox.ttrss.R.id; +import org.fox.ttrss.R.layout; +import org.fox.ttrss.R.menu; +import org.fox.ttrss.R.string; import org.jsoup.Jsoup; import android.app.Activity; diff --git a/src/org/fox/ttrss/OfflineServices.java b/src/org/fox/ttrss/offline/OfflineServices.java similarity index 80% rename from src/org/fox/ttrss/OfflineServices.java rename to src/org/fox/ttrss/offline/OfflineServices.java index e5fdb92e..0ad6bd8c 100644 --- a/src/org/fox/ttrss/OfflineServices.java +++ b/src/org/fox/ttrss/offline/OfflineServices.java @@ -1,4 +1,7 @@ -package org.fox.ttrss; +package org.fox.ttrss.offline; + +import org.fox.ttrss.OnlineServices; +import org.fox.ttrss.OnlineServices.RelativeArticle; import android.database.sqlite.SQLiteDatabase; diff --git a/src/org/fox/ttrss/OfflineUploadService.java b/src/org/fox/ttrss/offline/OfflineUploadService.java similarity index 92% rename from src/org/fox/ttrss/OfflineUploadService.java rename to src/org/fox/ttrss/offline/OfflineUploadService.java index 9eb028ac..54446669 100644 --- a/src/org/fox/ttrss/OfflineUploadService.java +++ b/src/org/fox/ttrss/offline/OfflineUploadService.java @@ -1,7 +1,14 @@ -package org.fox.ttrss; +package org.fox.ttrss.offline; import java.util.HashMap; +import org.fox.ttrss.ApiRequest; +import org.fox.ttrss.MainActivity; +import org.fox.ttrss.R; +import org.fox.ttrss.R.drawable; +import org.fox.ttrss.R.string; +import org.fox.ttrss.util.DatabaseHelper; + import com.google.gson.JsonElement; import android.app.IntentService; diff --git a/src/org/fox/ttrss/Article.java b/src/org/fox/ttrss/types/Article.java similarity index 78% rename from src/org/fox/ttrss/Article.java rename to src/org/fox/ttrss/types/Article.java index 05ddcb49..28e54d51 100644 --- a/src/org/fox/ttrss/Article.java +++ b/src/org/fox/ttrss/types/Article.java @@ -1,25 +1,26 @@ -package org.fox.ttrss; +package org.fox.ttrss.types; import java.util.ArrayList; import java.util.List; + import android.os.Parcel; import android.os.Parcelable; // TODO: serialize Labels public class Article implements Parcelable { - int id; - boolean unread; - boolean marked; - boolean published; - int updated; - boolean is_updated; - String title; - String link; - int feed_id; - List tags; - List attachments; - String content; - List> labels; + public int id; + public boolean unread; + public boolean marked; + public boolean published; + public int updated; + public boolean is_updated; + public String title; + public String link; + public int feed_id; + public List tags; + public List attachments; + public String content; + public List> labels; public Article(Parcel in) { readFromParcel(in); diff --git a/src/org/fox/ttrss/Attachment.java b/src/org/fox/ttrss/types/Attachment.java similarity index 85% rename from src/org/fox/ttrss/Attachment.java rename to src/org/fox/ttrss/types/Attachment.java index 37c4a08a..7b77d5db 100644 --- a/src/org/fox/ttrss/Attachment.java +++ b/src/org/fox/ttrss/types/Attachment.java @@ -1,4 +1,4 @@ -package org.fox.ttrss; +package org.fox.ttrss.types; import java.io.File; import java.net.MalformedURLException; @@ -8,12 +8,12 @@ import android.os.Parcel; import android.os.Parcelable; public class Attachment implements Parcelable { - int id; - String content_url; - String content_type; - String title; - String duration; - int post_id; + public int id; + public String content_url; + public String content_type; + public String title; + public String duration; + public int post_id; public Attachment(Parcel in) { readFromParcel(in); diff --git a/src/org/fox/ttrss/Feed.java b/src/org/fox/ttrss/types/Feed.java similarity index 82% rename from src/org/fox/ttrss/Feed.java rename to src/org/fox/ttrss/types/Feed.java index 1f0af4cc..25077686 100644 --- a/src/org/fox/ttrss/Feed.java +++ b/src/org/fox/ttrss/types/Feed.java @@ -1,18 +1,18 @@ -package org.fox.ttrss; +package org.fox.ttrss.types; import android.os.Parcel; import android.os.Parcelable; public class Feed implements Comparable, Parcelable { - String feed_url; - String title; - int id; - int unread; - boolean has_icon; - int cat_id; - int last_updated; - int order_id; - boolean is_cat; + public String feed_url; + public String title; + public int id; + public int unread; + public boolean has_icon; + public int cat_id; + public int last_updated; + public int order_id; + public boolean is_cat; public Feed(int id, String title, boolean is_cat) { this.id = id; diff --git a/src/org/fox/ttrss/FeedCategory.java b/src/org/fox/ttrss/types/FeedCategory.java similarity index 86% rename from src/org/fox/ttrss/FeedCategory.java rename to src/org/fox/ttrss/types/FeedCategory.java index 48c3b554..d4f68bfb 100644 --- a/src/org/fox/ttrss/FeedCategory.java +++ b/src/org/fox/ttrss/types/FeedCategory.java @@ -1,13 +1,13 @@ -package org.fox.ttrss; +package org.fox.ttrss.types; import android.os.Parcel; import android.os.Parcelable; public class FeedCategory implements Parcelable { - int id; - String title; - int unread; - int order_id; + public int id; + public String title; + public int unread; + public int order_id; public FeedCategory(Parcel in) { readFromParcel(in); diff --git a/src/org/fox/ttrss/types/Label.java b/src/org/fox/ttrss/types/Label.java new file mode 100644 index 00000000..fd4ce930 --- /dev/null +++ b/src/org/fox/ttrss/types/Label.java @@ -0,0 +1,9 @@ +package org.fox.ttrss.types; + +public class Label { + public int id; + public String caption; + public String fg_color; + public String bg_color; + public boolean checked; +} diff --git a/src/org/fox/ttrss/AppRater.java b/src/org/fox/ttrss/util/AppRater.java similarity index 96% rename from src/org/fox/ttrss/AppRater.java rename to src/org/fox/ttrss/util/AppRater.java index 2bce4248..a50cc9d9 100644 --- a/src/org/fox/ttrss/AppRater.java +++ b/src/org/fox/ttrss/util/AppRater.java @@ -1,4 +1,4 @@ -package org.fox.ttrss; +package org.fox.ttrss.util; // From http://androidsnippets.com/prompt-engaged-users-to-rate-your-app-in-the-android-market-appirater diff --git a/src/org/fox/ttrss/DatabaseHelper.java b/src/org/fox/ttrss/util/DatabaseHelper.java similarity index 96% rename from src/org/fox/ttrss/DatabaseHelper.java rename to src/org/fox/ttrss/util/DatabaseHelper.java index 71020078..b8560589 100644 --- a/src/org/fox/ttrss/DatabaseHelper.java +++ b/src/org/fox/ttrss/util/DatabaseHelper.java @@ -1,4 +1,4 @@ -package org.fox.ttrss; +package org.fox.ttrss.util; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; diff --git a/src/org/fox/ttrss/EasySSLSocketFactory.java b/src/org/fox/ttrss/util/EasySSLSocketFactory.java similarity index 96% rename from src/org/fox/ttrss/EasySSLSocketFactory.java rename to src/org/fox/ttrss/util/EasySSLSocketFactory.java index 2bb6ea14..f0c2d3ad 100644 --- a/src/org/fox/ttrss/EasySSLSocketFactory.java +++ b/src/org/fox/ttrss/util/EasySSLSocketFactory.java @@ -1,4 +1,4 @@ -package org.fox.ttrss; +package org.fox.ttrss.util; import java.io.IOException; import java.net.InetAddress; diff --git a/src/org/fox/ttrss/EasyX509TrustManager.java b/src/org/fox/ttrss/util/EasyX509TrustManager.java similarity index 93% rename from src/org/fox/ttrss/EasyX509TrustManager.java rename to src/org/fox/ttrss/util/EasyX509TrustManager.java index 6842a1a6..5ffc19bb 100644 --- a/src/org/fox/ttrss/EasyX509TrustManager.java +++ b/src/org/fox/ttrss/util/EasyX509TrustManager.java @@ -1,5 +1,5 @@ -package org.fox.ttrss; +package org.fox.ttrss.util; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; diff --git a/src/org/fox/ttrss/FragmentStatePagerAdapter.java b/src/org/fox/ttrss/util/FragmentStatePagerAdapter.java similarity index 99% rename from src/org/fox/ttrss/FragmentStatePagerAdapter.java rename to src/org/fox/ttrss/util/FragmentStatePagerAdapter.java index 1d7210df..26494fdc 100644 --- a/src/org/fox/ttrss/FragmentStatePagerAdapter.java +++ b/src/org/fox/ttrss/util/FragmentStatePagerAdapter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.fox.ttrss; +package org.fox.ttrss.util; import android.app.Fragment; import android.app.FragmentManager; diff --git a/src/org/fox/ttrss/ImageCacheService.java b/src/org/fox/ttrss/util/ImageCacheService.java similarity index 90% rename from src/org/fox/ttrss/ImageCacheService.java rename to src/org/fox/ttrss/util/ImageCacheService.java index 6b0dc139..1541c249 100644 --- a/src/org/fox/ttrss/ImageCacheService.java +++ b/src/org/fox/ttrss/util/ImageCacheService.java @@ -1,4 +1,4 @@ -package org.fox.ttrss; +package org.fox.ttrss.util; import java.io.File; import java.io.FileOutputStream; @@ -10,6 +10,12 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Date; +import org.fox.ttrss.MainActivity; +import org.fox.ttrss.R; +import org.fox.ttrss.R.drawable; +import org.fox.ttrss.R.string; +import org.fox.ttrss.offline.OfflineDownloadService; + import android.app.ActivityManager; import android.app.IntentService; import android.app.Notification; @@ -53,7 +59,7 @@ public class ImageCacheService extends IntentService { m_nmgr = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); } - protected static boolean isUrlCached(String url) { + public static boolean isUrlCached(String url) { String hashedUrl = md5(url); File storage = Environment.getExternalStorageDirectory(); @@ -63,7 +69,7 @@ public class ImageCacheService extends IntentService { return file.exists(); } - protected static String getCacheFileName(String url) { + public static String getCacheFileName(String url) { String hashedUrl = md5(url); File storage = Environment.getExternalStorageDirectory(); @@ -73,7 +79,7 @@ public class ImageCacheService extends IntentService { return file.getAbsolutePath(); } - protected static void cleanupCache(boolean deleteAll) { + public static void cleanupCache(boolean deleteAll) { if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) { File storage = Environment.getExternalStorageDirectory(); File cachePath = new File(storage.getAbsolutePath() + CACHE_PATH); diff --git a/src/org/fox/ttrss/PrefsBackupAgent.java b/src/org/fox/ttrss/util/PrefsBackupAgent.java similarity index 92% rename from src/org/fox/ttrss/PrefsBackupAgent.java rename to src/org/fox/ttrss/util/PrefsBackupAgent.java index 0a7e5dec..a786be56 100644 --- a/src/org/fox/ttrss/PrefsBackupAgent.java +++ b/src/org/fox/ttrss/util/PrefsBackupAgent.java @@ -1,4 +1,4 @@ -package org.fox.ttrss; +package org.fox.ttrss.util; import android.app.backup.BackupAgentHelper; import android.app.backup.SharedPreferencesBackupHelper;