diff options
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java | 52 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java | 62 |
2 files changed, 41 insertions, 73 deletions
diff --git a/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java b/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java index b5b35d6..7f099f3 100644 --- a/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java +++ b/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java @@ -3,6 +3,7 @@ package cgeo.geocaching.network; import butterknife.InjectView; import cgeo.geocaching.R; +import cgeo.geocaching.R.string; import cgeo.geocaching.activity.AbstractActivity; import cgeo.geocaching.utils.Log; import cgeo.geocaching.utils.MatcherWrapper; @@ -332,29 +333,56 @@ public abstract class OAuthAuthorizationActivity extends AbstractActivity { protected abstract String getAuthTitle(); - protected abstract String getAuthAgain(); + protected String getAuthAgain() { + return getString(R.string.auth_again); + } - protected abstract String getErrAuthInitialize(); + protected String getErrAuthInitialize() { + return getString(string.err_auth_initialize); + } - protected abstract String getAuthStart(); + protected String getAuthStart() { + return getString(R.string.auth_start); + } protected abstract String getAuthDialogCompleted(); - protected abstract String getErrAuthProcess(); + protected String getErrAuthProcess() { + return res.getString(R.string.err_auth_process); + } - protected abstract String getAuthDialogWait(); + protected String getAuthDialogWait() { + return res.getString(R.string.auth_dialog_waiting, getTitle()); + } - protected abstract String getAuthDialogPinTitle(); + protected String getAuthDialogPinTitle() { + assert false; + return null; + } - protected abstract String getAuthDialogPinMessage(); + protected String getAuthDialogPinMessage() { + assert false; + return null; + } - protected abstract String getAboutAuth1(); + protected String getAuthPinHint() { + assert false; + return null; + } - protected abstract String getAboutAuth2(); + protected String getAboutAuth1() { + return res.getString(R.string.auth_explain_short, getTitle()); + } - protected abstract String getAuthAuthorize(); + protected String getAboutAuth2() { + return res.getString(R.string.auth_explain_long, getTitle()); + } - protected abstract String getAuthPinHint(); + protected String getAuthAuthorize() { + return res.getString(R.string.auth_authorize, getTitle()); + } - protected abstract String getAuthFinish(); + protected String getAuthFinish() { + return res.getString(R.string.auth_finish, getTitle()); + } } diff --git a/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java b/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java index 80ee5f8..38c3fb8 100644 --- a/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java +++ b/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java @@ -40,68 +40,8 @@ public class TwitterAuthorizationActivity extends OAuthAuthorizationActivity { } @Override - protected String getAuthAgain() { - return res.getString(R.string.auth_again); - } - - @Override - protected String getErrAuthInitialize() { - return res.getString(R.string.err_auth_initialize); - } - - @Override - protected String getAuthStart() { - return res.getString(R.string.auth_start); - } - - @Override protected String getAuthDialogCompleted() { - return res.getString(R.string.auth_dialog_completed); - } - - @Override - protected String getErrAuthProcess() { - return res.getString(R.string.err_auth_process); - } - - @Override - protected String getAuthDialogWait() { - return res.getString(R.string.auth_dialog_wait); - } - - @Override - protected String getAuthDialogPinTitle() { - return res.getString(R.string.auth_dialog_pin_title); - } - - @Override - protected String getAuthDialogPinMessage() { - return res.getString(R.string.auth_dialog_pin_message); - } - - @Override - protected String getAboutAuth1() { - return res.getString(R.string.about_auth_1); - } - - @Override - protected String getAboutAuth2() { - return res.getString(R.string.about_auth_2); - } - - @Override - protected String getAuthAuthorize() { - return res.getString(R.string.auth_authorize); - } - - @Override - protected String getAuthPinHint() { - return res.getString(R.string.auth_pin_hint); - } - - @Override - protected String getAuthFinish() { - return res.getString(R.string.auth_finish); + return res.getString(R.string.auth_dialog_completed_twitter); } } |
