added error message, proguard fix

This commit is contained in:
nuclearfog 2022-05-30 19:13:43 +02:00
parent ab9d2b747f
commit 47ca6fb209
No known key found for this signature in database
GPG Key ID: AA0271FBE406DB98
6 changed files with 11 additions and 4 deletions

View File

@ -20,6 +20,4 @@
-dontwarn javax.annotation.Nullable
-keepclassmembers class * implements android.os.Parcelable {
public static final ** CREATOR;
}
-keepclassmembers class * implements android.os.Parcelable {*;}

View File

@ -112,6 +112,9 @@ public class TwitterException extends Exception implements TwitterError {
case 261:
return ERROR_API_ACCESS_DENIED;
case 324:
return INVALID_MEDIA;
case 354:
return DM_TOO_LONG;

View File

@ -105,6 +105,9 @@ public final class ErrorHandler {
case TwitterError.REQUEST_FORBIDDEN:
return context.getString(R.string.error_forbidden_api_access);
case TwitterError.INVALID_MEDIA:
return context.getString(R.string.error_invalid_media);
case TwitterError.APP_SUSPENDED:
case TwitterError.ERROR_API_ACCESS_DENIED:
GlobalSettings settings = GlobalSettings.getInstance(context);
@ -147,6 +150,7 @@ public final class ErrorHandler {
int REQUEST_FORBIDDEN = 18;
int APP_SUSPENDED = 19;
int ERROR_API_ACCESS_DENIED = 20;
int INVALID_MEDIA = 21;
int getErrorType();

View File

@ -240,4 +240,5 @@
<string name="confirm_unknown_error">Unbekannter Fehler!</string>
<string name="dialog_confirm_remember">merken</string>
<string name="directmessage_media_button">Medienanhang</string>
<string name="error_invalid_media">Ungültige Mediendatei!</string>
</resources>

View File

@ -93,6 +93,7 @@
<string name="error_mention_exceed">Too much mentions!</string>
<string name="error_result_cancelled">Error, result cancelled!</string>
<string name="error_twitter_search">Error, search query is too long or contains illegal characters!</string>
<string name="error_invalid_media">Invalid media file!</string>
<string name="error_not_defined">Not specified error!</string>
<string name="error_forbidden_api_access">API does not support this operation!</string>
<string name="error_login_information">could not load login information!</string>

View File

@ -9,7 +9,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'io.michaelrocks:paranoid-gradle-plugin:0.3.7'
classpath 'gradle.plugin.ru.cleverpumpkin.proguard-dictionaries-generator:plugin:1.0.8'
}