moved classes

This commit is contained in:
Mariotaku Lee 2016-04-04 17:22:36 +08:00
parent 962c682e37
commit b3d79c67fc
16 changed files with 79 additions and 23 deletions

View File

@ -0,0 +1,11 @@
package org.mariotaku.twidere.api.twitter.annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Created by mariotaku on 16/4/4.
*/
@Retention(RetentionPolicy.CLASS)
public @interface NoObfuscate {
}

View File

@ -31,6 +31,7 @@ import java.text.SimpleDateFormat;
import java.util.Locale; import java.util.Locale;
/** /**
* ObjectMapper for Activity object
* Created by mariotaku on 15/10/21. * Created by mariotaku on 15/10/21.
*/ */
public class Activity$$JsonObjectMapper extends JsonMapper<Activity> { public class Activity$$JsonObjectMapper extends JsonMapper<Activity> {
@ -74,6 +75,7 @@ public class Activity$$JsonObjectMapper extends JsonMapper<Activity> {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public void parseField(Activity instance, String fieldName, JsonParser jsonParser) throws IOException { public void parseField(Activity instance, String fieldName, JsonParser jsonParser) throws IOException {
if ("action".equals(fieldName)) { if ("action".equals(fieldName)) {
//noinspection ResourceType //noinspection ResourceType

View File

@ -23,11 +23,17 @@ import android.support.annotation.NonNull;
import android.support.annotation.StringDef; import android.support.annotation.StringDef;
import android.text.TextUtils; import android.text.TextUtils;
import org.mariotaku.twidere.api.twitter.annotation.NoObfuscate;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
/**
* Twitter Activity object
*/
@NoObfuscate
public class Activity extends TwitterResponseObject implements TwitterResponse, Comparable<Activity> { public class Activity extends TwitterResponseObject implements TwitterResponse, Comparable<Activity> {
@Action @Action

View File

@ -61,6 +61,7 @@ public class IDs$$JsonObjectMapper extends JsonMapper<IDs> {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public void parseField(IDs instance, String fieldName, JsonParser jsonParser) throws IOException { public void parseField(IDs instance, String fieldName, JsonParser jsonParser) throws IOException {
if ("ids".equals(fieldName)) { if ("ids".equals(fieldName)) {
parseIDsArray(instance, jsonParser); parseIDsArray(instance, jsonParser);

View File

@ -25,11 +25,14 @@ import com.bluelinelabs.logansquare.typeconverters.TypeConverter;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonParser;
import org.mariotaku.twidere.api.twitter.annotation.NoObfuscate;
import java.io.IOException; import java.io.IOException;
/** /**
* Created by mariotaku on 15/5/10. * Created by mariotaku on 15/5/10.
*/ */
@NoObfuscate
public class IDs extends TwitterResponseObject implements TwitterResponse, CursorSupport { public class IDs extends TwitterResponseObject implements TwitterResponse, CursorSupport {
long previousCursor; long previousCursor;

View File

@ -19,9 +19,13 @@
package org.mariotaku.twidere.api.twitter.model; package org.mariotaku.twidere.api.twitter.model;
import org.mariotaku.twidere.api.twitter.annotation.NoObfuscate;
/** /**
* Response list supports cursor pagination
* Created by mariotaku on 15/5/7. * Created by mariotaku on 15/5/7.
*/ */
@NoObfuscate
public class PageableResponseList<T> extends ResponseList<T> implements TwitterResponse, CursorSupport { public class PageableResponseList<T> extends ResponseList<T> implements TwitterResponse, CursorSupport {
long previousCursor; long previousCursor;

View File

@ -20,6 +20,7 @@
package org.mariotaku.twidere.api.twitter.model; package org.mariotaku.twidere.api.twitter.model;
import org.mariotaku.restfu.http.HttpResponse; import org.mariotaku.restfu.http.HttpResponse;
import org.mariotaku.twidere.api.twitter.annotation.NoObfuscate;
import org.mariotaku.twidere.api.twitter.util.InternalParseUtil; import org.mariotaku.twidere.api.twitter.util.InternalParseUtil;
import java.util.AbstractList; import java.util.AbstractList;
@ -27,8 +28,10 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* Response list
* Created by mariotaku on 15/5/7. * Created by mariotaku on 15/5/7.
*/ */
@NoObfuscate
public class ResponseList<T> extends AbstractList<T> implements TwitterResponse { public class ResponseList<T> extends AbstractList<T> implements TwitterResponse {
private List<T> list; private List<T> list;

View File

@ -64,6 +64,7 @@ android {
testOptions { testOptions {
unitTests.returnDefaultValues = true unitTests.returnDefaultValues = true
} }
} }
repositories { repositories {

View File

@ -18,23 +18,40 @@
#-dontobfuscate #-dontobfuscate
-dontwarn sun.net.spi.**
-dontwarn java.nio.file.**
-dontwarn org.codehaus.mojo.**
-dontwarn com.makeramen.roundedimageview.**
-dontwarn com.squareup.haha.** -dontwarn com.squareup.haha.**
-dontwarn com.google.android.gms.** -dontwarn com.makeramen.roundedimageview.**
-dontwarn com.google.android.youtube.**
-dontwarn jnamed** -dontwarn jnamed**
-dontwarn org.xbill.DNS.**
-dontwarn com.bluelinelabs.logansquare.** -dontwarn com.bluelinelabs.logansquare.**
-dontwarn okio.**
-dontwarn android.support.**
-dontwarn com.afollestad.**
-dontwarn com.facebook.stetho.**
-dontwarn com.google.android.**
-dontwarn okhttp3.**
-dontwarn sun.net.spi.**
-dontwarn sun.misc.**
-dontwarn sun.nio.**
-dontwarn java.nio.file.**
-keepattributes *Annotation* -keepattributes *Annotation*
-keepattributes EnclosingMethod -keepattributes EnclosingMethod
-keepattributes SourceFile
-keepattributes LineNumberTable
-keepattributes Signature
-keepattributes InnetClasses
# https://github.com/bluelinelabs/LoganSquare # https://github.com/bluelinelabs/LoganSquare
-keep class com.bluelinelabs.logansquare.** { *; } -keep class com.bluelinelabs.logansquare.annotation.JsonObject
-keep class * extends com.bluelinelabs.logansquare.JsonMapper
-keep @com.bluelinelabs.logansquare.annotation.JsonObject class * -keep @com.bluelinelabs.logansquare.annotation.JsonObject class *
-keep class **$$JsonObjectMapper { *; }
-keep class org.mariotaku.twidere.api.twitter.annotation.NoObfuscate
-keep @org.mariotaku.twidere.api.twitter.annotation.NoObfuscate class *
# https://github.com/mariotaku/RestFu
-keep class org.mariotaku.restfu.annotation.** { *; }
# http://square.github.io/otto/ # http://square.github.io/otto/
-keepclassmembers class ** { -keepclassmembers class ** {
@ -42,10 +59,15 @@
@com.squareup.otto.Produce public *; @com.squareup.otto.Produce public *;
} }
-keepclassmembers class org.mariotaku.twidere.activity.BrowserSignInActivity$InjectorJavaScriptInterface { -keep class * extends android.support.v4.view.ActionProvider
public *; -keepclassmembers class * extends android.support.v4.view.ActionProvider {
<init>(android.content.Context);
} }
# Fuck shitsung http://stackoverflow.com/a/34896262/859190 -keepclassmembers class * {
# ... and fuck xiaomi http://crashes.to/s/675ac9aff5e private <fields>;
-keep class !android.support.v7.view.menu.*MenuBuilder*, !org.apache.commons.** { *; } }
-keepclassmembers class org.mariotaku.twidere.activity.BrowserSignInActivity$InjectorJavaScriptInterface {
public *;
}

View File

@ -76,7 +76,7 @@ import org.mariotaku.twidere.activity.HomeActivity;
import org.mariotaku.twidere.activity.QuickSearchBarActivity; import org.mariotaku.twidere.activity.QuickSearchBarActivity;
import org.mariotaku.twidere.activity.SettingsActivity; import org.mariotaku.twidere.activity.SettingsActivity;
import org.mariotaku.twidere.annotation.CustomTabType; import org.mariotaku.twidere.annotation.CustomTabType;
import org.mariotaku.twidere.menu.support.AccountToggleProvider; import org.mariotaku.twidere.menu.AccountToggleProvider;
import org.mariotaku.twidere.model.ParcelableAccount; import org.mariotaku.twidere.model.ParcelableAccount;
import org.mariotaku.twidere.model.SupportTabSpec; import org.mariotaku.twidere.model.SupportTabSpec;
import org.mariotaku.twidere.model.UserKey; import org.mariotaku.twidere.model.UserKey;

View File

@ -100,7 +100,7 @@ import org.mariotaku.twidere.api.twitter.model.Status;
import org.mariotaku.twidere.api.twitter.model.TranslationResult; import org.mariotaku.twidere.api.twitter.model.TranslationResult;
import org.mariotaku.twidere.loader.ConversationLoader; import org.mariotaku.twidere.loader.ConversationLoader;
import org.mariotaku.twidere.loader.ParcelableStatusLoader; import org.mariotaku.twidere.loader.ParcelableStatusLoader;
import org.mariotaku.twidere.menu.support.FavoriteItemProvider; import org.mariotaku.twidere.menu.FavoriteItemProvider;
import org.mariotaku.twidere.model.ParcelableAccount; import org.mariotaku.twidere.model.ParcelableAccount;
import org.mariotaku.twidere.model.ParcelableActivity; import org.mariotaku.twidere.model.ParcelableActivity;
import org.mariotaku.twidere.model.ParcelableActivityCursorIndices; import org.mariotaku.twidere.model.ParcelableActivityCursorIndices;

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mariotaku.twidere.menu.support; package org.mariotaku.twidere.menu;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;

View File

@ -1,4 +1,4 @@
package org.mariotaku.twidere.menu.support; package org.mariotaku.twidere.menu;
import android.content.Context; import android.content.Context;
import android.graphics.PorterDuff; import android.graphics.PorterDuff;

View File

@ -55,7 +55,7 @@ import org.mariotaku.twidere.fragment.SetUserNicknameDialogFragment;
import org.mariotaku.twidere.graphic.ActionIconDrawable; import org.mariotaku.twidere.graphic.ActionIconDrawable;
import org.mariotaku.twidere.graphic.PaddingDrawable; import org.mariotaku.twidere.graphic.PaddingDrawable;
import org.mariotaku.twidere.menu.SupportStatusShareProvider; import org.mariotaku.twidere.menu.SupportStatusShareProvider;
import org.mariotaku.twidere.menu.support.FavoriteItemProvider; import org.mariotaku.twidere.menu.FavoriteItemProvider;
import org.mariotaku.twidere.model.ParcelableCredentials; import org.mariotaku.twidere.model.ParcelableCredentials;
import org.mariotaku.twidere.model.ParcelableStatus; import org.mariotaku.twidere.model.ParcelableStatus;
import org.mariotaku.twidere.model.util.ParcelableCredentialsUtils; import org.mariotaku.twidere.model.util.ParcelableCredentialsUtils;

View File

@ -18,13 +18,15 @@
--> -->
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<item <item
android:id="@id/compose" android:id="@id/compose"
android:icon="@drawable/ic_action_status_compose" android:icon="@drawable/ic_action_status_compose"
android:title="@string/compose" android:title="@string/compose"
app:showAsAction="always" /> app:showAsAction="always"
tools:ignore="AlwaysShowAction"/>
<item <item
android:id="@id/select_account" android:id="@id/select_account"
@ -32,8 +34,9 @@
android:icon="@drawable/ic_action_more_vertical" android:icon="@drawable/ic_action_more_vertical"
android:title="@string/select_account" android:title="@string/select_account"
android:visible="false" android:visible="false"
app:actionProviderClass="org.mariotaku.twidere.menu.support.AccountToggleProvider" app:actionProviderClass="org.mariotaku.twidere.menu.AccountToggleProvider"
app:showAsAction="always" /> app:showAsAction="always"
tools:ignore="AlwaysShowAction"/>
</menu> </menu>

View File

@ -18,7 +18,7 @@
android:id="@id/favorite" android:id="@id/favorite"
android:icon="@drawable/ic_action_heart" android:icon="@drawable/ic_action_heart"
android:title="@string/like" android:title="@string/like"
app:actionProviderClass="org.mariotaku.twidere.menu.support.FavoriteItemProvider" app:actionProviderClass="org.mariotaku.twidere.menu.FavoriteItemProvider"
app:showAsAction="always"/> app:showAsAction="always"/>
<item <item
android:id="@id/share" android:id="@id/share"