categorize source files
This commit is contained in:
parent
01151df966
commit
08397a47af
@ -24,7 +24,7 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:name=".OfflineActivity" >
|
android:name=".offline.OfflineActivity" >
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
@ -42,15 +42,15 @@
|
|||||||
|
|
||||||
<service
|
<service
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:name=".OfflineDownloadService" />
|
android:name=".org.fox.ttrss.offline.OfflineDownloadServicedService" />
|
||||||
<service
|
<service
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:name=".OfflineUploadService" />
|
android:name=".org.fox.ttrss.offline.OfflineUploadServiceineUploadService" />
|
||||||
<service
|
<service
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:name=".ImageCacheService" />
|
android:name=".util.ImageCacheService" />
|
||||||
|
|
||||||
<service android:name="BillingService" />
|
<service android:name=".billing.BillingService" />
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.google.android.backup.api_key"
|
android:name="com.google.android.backup.api_key"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent" >
|
android:layout_height="fill_parent" >
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/loading_container"
|
android:id="@+id/loading_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -16,12 +16,11 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/loading_message" />
|
android:text="@string/loading_message" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/loading_progress"
|
android:id="@+id/loading_progress"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
@ -48,4 +47,4 @@
|
|||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent" >
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</LinearLayout>
|
@ -20,6 +20,7 @@ import org.apache.http.entity.StringEntity;
|
|||||||
import org.apache.http.impl.client.BasicCredentialsProvider;
|
import org.apache.http.impl.client.BasicCredentialsProvider;
|
||||||
import org.apache.http.protocol.BasicHttpContext;
|
import org.apache.http.protocol.BasicHttpContext;
|
||||||
import org.apache.http.protocol.HttpContext;
|
import org.apache.http.protocol.HttpContext;
|
||||||
|
import org.fox.ttrss.util.EasySSLSocketFactory;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
@ -6,6 +6,8 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.fox.ttrss.types.Article;
|
||||||
|
import org.fox.ttrss.types.Attachment;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
||||||
|
@ -2,6 +2,8 @@ package org.fox.ttrss;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.fox.ttrss.types.Article;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss;
|
||||||
|
|
||||||
|
import org.fox.ttrss.types.Article;
|
||||||
|
import org.fox.ttrss.util.FragmentStatePagerAdapter;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.app.FragmentManager;
|
import android.app.FragmentManager;
|
||||||
|
@ -7,6 +7,8 @@ import java.util.Comparator;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.fox.ttrss.types.FeedCategory;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -2,6 +2,9 @@ package org.fox.ttrss;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.fox.ttrss.types.Feed;
|
||||||
|
import org.fox.ttrss.types.FeedCategory;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@ package org.fox.ttrss;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.fox.ttrss.types.Feed;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ import org.apache.http.conn.scheme.Scheme;
|
|||||||
import org.apache.http.impl.client.BasicCredentialsProvider;
|
import org.apache.http.impl.client.BasicCredentialsProvider;
|
||||||
import org.apache.http.protocol.BasicHttpContext;
|
import org.apache.http.protocol.BasicHttpContext;
|
||||||
import org.apache.http.protocol.HttpContext;
|
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.Activity;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
|
@ -11,6 +11,9 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
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 org.jsoup.Jsoup;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
package org.fox.ttrss;
|
|
||||||
|
|
||||||
public class Label {
|
|
||||||
int id;
|
|
||||||
String caption;
|
|
||||||
String fg_color;
|
|
||||||
String bg_color;
|
|
||||||
boolean checked;
|
|
||||||
}
|
|
@ -6,6 +6,18 @@ import java.util.List;
|
|||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
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.animation.LayoutTransition;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package org.fox.ttrss;
|
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 interface OnlineServices {
|
||||||
public enum RelativeArticle { BEFORE, AFTER };
|
public enum RelativeArticle { BEFORE, AFTER };
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.billing;
|
||||||
|
|
||||||
|
|
||||||
public class BillingConstants {
|
public class BillingConstants {
|
@ -1,4 +1,4 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.billing;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -12,8 +12,9 @@ import android.os.RemoteException;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.vending.billing.IMarketBillingService;
|
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 {
|
public class BillingHelper {
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ public class BillingHelper {
|
|||||||
mCompletedHandler = handler;
|
mCompletedHandler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean isBillingSupported() {
|
public static boolean isBillingSupported() {
|
||||||
if (amIDead()) {
|
if (amIDead()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -67,7 +68,7 @@ public class BillingHelper {
|
|||||||
* @param activityContext
|
* @param activityContext
|
||||||
* @param itemId
|
* @param itemId
|
||||||
*/
|
*/
|
||||||
protected static void requestPurchase(Context activityContext, String itemId){
|
public static void requestPurchase(Context activityContext, String itemId){
|
||||||
if (amIDead()) {
|
if (amIDead()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
@ -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.billing.BillingConstants.ACTION_NOTIFY;
|
||||||
import static org.fox.ttrss.BillingConstants.ACTION_PURCHASE_STATE_CHANGED;
|
import static org.fox.ttrss.billing.BillingConstants.ACTION_PURCHASE_STATE_CHANGED;
|
||||||
import static org.fox.ttrss.BillingConstants.ACTION_RESPONSE_CODE;
|
import static org.fox.ttrss.billing.BillingConstants.ACTION_RESPONSE_CODE;
|
||||||
import static org.fox.ttrss.BillingConstants.INAPP_REQUEST_ID;
|
import static org.fox.ttrss.billing.BillingConstants.INAPP_REQUEST_ID;
|
||||||
import static org.fox.ttrss.BillingConstants.INAPP_RESPONSE_CODE;
|
import static org.fox.ttrss.billing.BillingConstants.INAPP_RESPONSE_CODE;
|
||||||
import static org.fox.ttrss.BillingConstants.INAPP_SIGNATURE;
|
import static org.fox.ttrss.billing.BillingConstants.INAPP_SIGNATURE;
|
||||||
import static org.fox.ttrss.BillingConstants.INAPP_SIGNED_DATA;
|
import static org.fox.ttrss.billing.BillingConstants.INAPP_SIGNED_DATA;
|
||||||
import static org.fox.ttrss.BillingConstants.NOTIFICATION_ID;
|
import static org.fox.ttrss.billing.BillingConstants.NOTIFICATION_ID;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2010 Google Inc. All Rights Reserved.
|
// Copyright 2010 Google Inc. All Rights Reserved.
|
||||||
|
|
||||||
package org.fox.ttrss;
|
package org.fox.ttrss.billing;
|
||||||
|
|
||||||
import java.security.InvalidKeyException;
|
import java.security.InvalidKeyException;
|
||||||
import java.security.KeyFactory;
|
import java.security.KeyFactory;
|
||||||
@ -21,7 +21,7 @@ import org.json.JSONObject;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
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.Base64;
|
||||||
import org.fox.ttrss.util.Base64DecoderException;
|
import org.fox.ttrss.util.Base64DecoderException;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.billing;
|
||||||
|
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
@ -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.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.animation.LayoutTransition;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
@ -1,8 +1,14 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.offline;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
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.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
@ -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.Activity;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
@ -1,9 +1,18 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.offline;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
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.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
@ -1,7 +1,13 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.offline;
|
||||||
|
|
||||||
import java.io.File;
|
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.Activity;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
@ -1,10 +1,16 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.offline;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.TimeZone;
|
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 org.jsoup.Jsoup;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
@ -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;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
|
@ -1,7 +1,14 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.offline;
|
||||||
|
|
||||||
import java.util.HashMap;
|
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 com.google.gson.JsonElement;
|
||||||
|
|
||||||
import android.app.IntentService;
|
import android.app.IntentService;
|
@ -1,25 +1,26 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.types;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
// TODO: serialize Labels
|
// TODO: serialize Labels
|
||||||
public class Article implements Parcelable {
|
public class Article implements Parcelable {
|
||||||
int id;
|
public int id;
|
||||||
boolean unread;
|
public boolean unread;
|
||||||
boolean marked;
|
public boolean marked;
|
||||||
boolean published;
|
public boolean published;
|
||||||
int updated;
|
public int updated;
|
||||||
boolean is_updated;
|
public boolean is_updated;
|
||||||
String title;
|
public String title;
|
||||||
String link;
|
public String link;
|
||||||
int feed_id;
|
public int feed_id;
|
||||||
List<String> tags;
|
public List<String> tags;
|
||||||
List<Attachment> attachments;
|
public List<Attachment> attachments;
|
||||||
String content;
|
public String content;
|
||||||
List<List<String>> labels;
|
public List<List<String>> labels;
|
||||||
|
|
||||||
public Article(Parcel in) {
|
public Article(Parcel in) {
|
||||||
readFromParcel(in);
|
readFromParcel(in);
|
@ -1,4 +1,4 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.types;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
@ -8,12 +8,12 @@ import android.os.Parcel;
|
|||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
public class Attachment implements Parcelable {
|
public class Attachment implements Parcelable {
|
||||||
int id;
|
public int id;
|
||||||
String content_url;
|
public String content_url;
|
||||||
String content_type;
|
public String content_type;
|
||||||
String title;
|
public String title;
|
||||||
String duration;
|
public String duration;
|
||||||
int post_id;
|
public int post_id;
|
||||||
|
|
||||||
public Attachment(Parcel in) {
|
public Attachment(Parcel in) {
|
||||||
readFromParcel(in);
|
readFromParcel(in);
|
@ -1,18 +1,18 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.types;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
public class Feed implements Comparable<Feed>, Parcelable {
|
public class Feed implements Comparable<Feed>, Parcelable {
|
||||||
String feed_url;
|
public String feed_url;
|
||||||
String title;
|
public String title;
|
||||||
int id;
|
public int id;
|
||||||
int unread;
|
public int unread;
|
||||||
boolean has_icon;
|
public boolean has_icon;
|
||||||
int cat_id;
|
public int cat_id;
|
||||||
int last_updated;
|
public int last_updated;
|
||||||
int order_id;
|
public int order_id;
|
||||||
boolean is_cat;
|
public boolean is_cat;
|
||||||
|
|
||||||
public Feed(int id, String title, boolean is_cat) {
|
public Feed(int id, String title, boolean is_cat) {
|
||||||
this.id = id;
|
this.id = id;
|
@ -1,13 +1,13 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.types;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
public class FeedCategory implements Parcelable {
|
public class FeedCategory implements Parcelable {
|
||||||
int id;
|
public int id;
|
||||||
String title;
|
public String title;
|
||||||
int unread;
|
public int unread;
|
||||||
int order_id;
|
public int order_id;
|
||||||
|
|
||||||
public FeedCategory(Parcel in) {
|
public FeedCategory(Parcel in) {
|
||||||
readFromParcel(in);
|
readFromParcel(in);
|
9
src/org/fox/ttrss/types/Label.java
Normal file
9
src/org/fox/ttrss/types/Label.java
Normal file
@ -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;
|
||||||
|
}
|
@ -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
|
// From http://androidsnippets.com/prompt-engaged-users-to-rate-your-app-in-the-android-market-appirater
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.util;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
import android.database.sqlite.SQLiteOpenHelper;
|
import android.database.sqlite.SQLiteOpenHelper;
|
@ -1,4 +1,4 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.util;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
package org.fox.ttrss;
|
package org.fox.ttrss.util;
|
||||||
|
|
||||||
import java.security.cert.CertificateException;
|
import java.security.cert.CertificateException;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.fox.ttrss;
|
package org.fox.ttrss.util;
|
||||||
|
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.app.FragmentManager;
|
import android.app.FragmentManager;
|
@ -1,4 +1,4 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.util;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
@ -10,6 +10,12 @@ import java.security.MessageDigest;
|
|||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.Date;
|
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.ActivityManager;
|
||||||
import android.app.IntentService;
|
import android.app.IntentService;
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
@ -53,7 +59,7 @@ public class ImageCacheService extends IntentService {
|
|||||||
m_nmgr = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
|
m_nmgr = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean isUrlCached(String url) {
|
public static boolean isUrlCached(String url) {
|
||||||
String hashedUrl = md5(url);
|
String hashedUrl = md5(url);
|
||||||
|
|
||||||
File storage = Environment.getExternalStorageDirectory();
|
File storage = Environment.getExternalStorageDirectory();
|
||||||
@ -63,7 +69,7 @@ public class ImageCacheService extends IntentService {
|
|||||||
return file.exists();
|
return file.exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static String getCacheFileName(String url) {
|
public static String getCacheFileName(String url) {
|
||||||
String hashedUrl = md5(url);
|
String hashedUrl = md5(url);
|
||||||
|
|
||||||
File storage = Environment.getExternalStorageDirectory();
|
File storage = Environment.getExternalStorageDirectory();
|
||||||
@ -73,7 +79,7 @@ public class ImageCacheService extends IntentService {
|
|||||||
return file.getAbsolutePath();
|
return file.getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void cleanupCache(boolean deleteAll) {
|
public static void cleanupCache(boolean deleteAll) {
|
||||||
if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
|
if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
|
||||||
File storage = Environment.getExternalStorageDirectory();
|
File storage = Environment.getExternalStorageDirectory();
|
||||||
File cachePath = new File(storage.getAbsolutePath() + CACHE_PATH);
|
File cachePath = new File(storage.getAbsolutePath() + CACHE_PATH);
|
@ -1,4 +1,4 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss.util;
|
||||||
|
|
||||||
import android.app.backup.BackupAgentHelper;
|
import android.app.backup.BackupAgentHelper;
|
||||||
import android.app.backup.SharedPreferencesBackupHelper;
|
import android.app.backup.SharedPreferencesBackupHelper;
|
Loading…
Reference in New Issue
Block a user