diff --git a/app/app-release.apk b/app/app-release.apk index 3b80008..79a7392 100644 Binary files a/app/app-release.apk and b/app/app-release.apk differ diff --git a/app/build.gradle b/app/build.gradle index 67fc2c4..a9847dd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,12 +8,12 @@ android { applicationId "me.aerovulpe.crawler" minSdkVersion 16 targetSdkVersion 22 - versionCode 3 + versionCode 4 versionName "1.0" } buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index d2f567a..6103373 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -15,3 +15,18 @@ #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} +-keep public class com.google.android.gms.ads.** { + public *; +} + +-keep public class com.google.ads.** { + public *; +} + +-keep public class org.jsoup.** { + public *; +} + +-keep public class me.aerovulpe.crawler.fragments.PhotoViewerFragment { + private void changePagerScroller(); +} \ No newline at end of file diff --git a/app/src/main/java/me/aerovulpe/crawler/adapter/ExplorerTabAdapter.java b/app/src/main/java/me/aerovulpe/crawler/adapter/ExplorerTabAdapter.java index fd7c57b..68f9edc 100644 --- a/app/src/main/java/me/aerovulpe/crawler/adapter/ExplorerTabAdapter.java +++ b/app/src/main/java/me/aerovulpe/crawler/adapter/ExplorerTabAdapter.java @@ -4,16 +4,15 @@ import android.app.FragmentManager; import me.aerovulpe.crawler.fragments.ExplorerFragment; -import me.aerovulpe.crawler.request.FlickrRequest; -import me.aerovulpe.crawler.request.PicasaAlbumsRequest; +import me.aerovulpe.crawler.util.AccountsUtil; /** * Created by Aaron on 12/05/2015. */ public class ExplorerTabAdapter extends SmartFragmentStatePagerAdapter { private static final String[] mTabNames = {"Tumblr", "Flickr", "Picasa"}; - private static final String[] mCategories = {"accessories", FlickrRequest.class.getName(), - PicasaAlbumsRequest.class.getName()}; + private static final String[] mCategories = {"accessories", AccountsUtil.CATEGORY_FLICKR, + AccountsUtil.CATEGORY_PICASA}; public ExplorerTabAdapter(FragmentManager fragmentManager) { super(fragmentManager); diff --git a/app/src/main/java/me/aerovulpe/crawler/fragments/AddEditAccountFragment.java b/app/src/main/java/me/aerovulpe/crawler/fragments/AddEditAccountFragment.java index 4fcb104..f57c725 100644 --- a/app/src/main/java/me/aerovulpe/crawler/fragments/AddEditAccountFragment.java +++ b/app/src/main/java/me/aerovulpe/crawler/fragments/AddEditAccountFragment.java @@ -43,10 +43,10 @@ public class AddEditAccountFragment extends DialogFragment { - private static final String ARG_FRAGMENT_TYPE = AddEditAccountFragment.class.getName() + "arg_fragment_type"; - private static final String ARG_ACCOUNT_TYPE = AddEditAccountFragment.class.getName() + "arg_account_type"; - private static final String ARG_ID = AddEditAccountFragment.class.getName() + "arg_id"; - private static final String ARG_NAME = AddEditAccountFragment.class.getName() + "arg_name"; + private static final String ARG_FRAGMENT_TYPE = "AddEditAccountFragment.arg_fragment_type"; + private static final String ARG_ACCOUNT_TYPE = "AddEditAccountFragment.arg_account_type"; + private static final String ARG_ID = "AddEditAccountFragment.arg_id"; + private static final String ARG_NAME = "AddEditAccountFragment.arg_name"; public static int ADD_ACCOUNT = 0; public static int EDIT_ACCOUNT = 1; diff --git a/app/src/main/java/me/aerovulpe/crawler/request/CategoriesRequest.java b/app/src/main/java/me/aerovulpe/crawler/request/CategoriesRequest.java index 780d925..de3c4be 100644 --- a/app/src/main/java/me/aerovulpe/crawler/request/CategoriesRequest.java +++ b/app/src/main/java/me/aerovulpe/crawler/request/CategoriesRequest.java @@ -105,13 +105,13 @@ private void addCategories(Document document) { flickrValues.put(CrawlerContract.CategoryEntry.COLUMN_ACCOUNT_TYPE, AccountsUtil.ACCOUNT_TYPE_FLICKR); flickrValues.put(CrawlerContract.CategoryEntry.COLUMN_CATEGORY_ID, - FlickrRequest.class.getName()); + AccountsUtil.CATEGORY_FLICKR); ContentValues picasaValues = new ContentValues(); picasaValues.put(CrawlerContract.CategoryEntry.COLUMN_ACCOUNT_TYPE, AccountsUtil.ACCOUNT_TYPE_PICASA); picasaValues.put(CrawlerContract.CategoryEntry.COLUMN_CATEGORY_ID, - PicasaAlbumsRequest.class.getName()); + AccountsUtil.CATEGORY_PICASA); addValues(flickrValues); addValues(picasaValues); diff --git a/app/src/main/java/me/aerovulpe/crawler/request/ExplorerRequestWorker.java b/app/src/main/java/me/aerovulpe/crawler/request/ExplorerRequestWorker.java index d44da69..53596a8 100644 --- a/app/src/main/java/me/aerovulpe/crawler/request/ExplorerRequestWorker.java +++ b/app/src/main/java/me/aerovulpe/crawler/request/ExplorerRequestWorker.java @@ -36,7 +36,7 @@ */ public class ExplorerRequestWorker implements Runnable { private int mCacheSize = 25; - private final String LOG_TAG = ExplorerRequestWorker.class.getSimpleName(); + private final String LOG_TAG = "ExplorerRequestWorker"; private ContentProviderClient mProvider; private Vector mContentCache; private final ExplorerRequest mRequest; diff --git a/app/src/main/java/me/aerovulpe/crawler/request/Request.java b/app/src/main/java/me/aerovulpe/crawler/request/Request.java index 22df213..6623c20 100644 --- a/app/src/main/java/me/aerovulpe/crawler/request/Request.java +++ b/app/src/main/java/me/aerovulpe/crawler/request/Request.java @@ -43,7 +43,7 @@ public abstract class Request implements Runnable { private static final String LAST_PHOTO_ID_SUFFIX = ".LAST_PHOTO_ID"; private static final String NUM_OF_PHOTOS_SUFFIX = ".NUM_OF_PHOTOS"; private static final String INITIAL_PAGE_SUFFIX = ".INITIAL_PAGE"; - private static final String LOG_TAG = Request.class.getSimpleName(); + private static final String LOG_TAG = "Request"; private int mCacheSize = 3000; private final String mAlbumID; private final RequestService mRequestService; diff --git a/app/src/main/java/me/aerovulpe/crawler/ui/TouchImageView.java b/app/src/main/java/me/aerovulpe/crawler/ui/TouchImageView.java index d002fd8..3487945 100644 --- a/app/src/main/java/me/aerovulpe/crawler/ui/TouchImageView.java +++ b/app/src/main/java/me/aerovulpe/crawler/ui/TouchImageView.java @@ -40,7 +40,7 @@ public class TouchImageView extends ImageView { - private static final String DEBUG = TouchImageView.class.getSimpleName(); + private static final String DEBUG = "TouchImageView"; // // SuperMin and SuperMax multipliers. Determine how much the image can be diff --git a/app/src/main/java/me/aerovulpe/crawler/util/AccountsUtil.java b/app/src/main/java/me/aerovulpe/crawler/util/AccountsUtil.java index e08531a..609b6db 100644 --- a/app/src/main/java/me/aerovulpe/crawler/util/AccountsUtil.java +++ b/app/src/main/java/me/aerovulpe/crawler/util/AccountsUtil.java @@ -11,6 +11,8 @@ public final class AccountsUtil { public static final int ACCOUNT_TYPE_TUMBLR = 0; public static final int ACCOUNT_TYPE_FLICKR = 1; public static final int ACCOUNT_TYPE_PICASA = 2; + public static final String CATEGORY_FLICKR = "flickr_category"; + public static final String CATEGORY_PICASA = "picasa_category"; private static final String TUMBLR_BASE_SUFFIX = ".tumblr.com"; private static final String FLICKR_BASE = "https://www.flickr.com/photos/"; private static final String PICASA_BASE = "http://picasaweb.google.com/data/feed/api/user/"; diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index aada321..074bc92 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -3,7 +3,7 @@ @color/md_indigo_500 @color/md_indigo_700 @color/md_pink_700 - @color/md_grey_500 + @color/md_grey_400 @color/md_white_1000 @color/md_grey_700 @color/md_indigo_A700