mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Merge pull request #166 from whym/authactivity-abstract
Make AuthenticatedActivity abstract (per lint)
This commit is contained in:
commit
86950cedfc
4 changed files with 3 additions and 11 deletions
|
|
@ -11,7 +11,7 @@ import android.support.v7.app.AppCompatActivity;
|
|||
import fr.free.nrw.commons.CommonsApplication;
|
||||
import fr.free.nrw.commons.Utils;
|
||||
|
||||
public class AuthenticatedActivity extends AppCompatActivity {
|
||||
public abstract class AuthenticatedActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
String accountType;
|
||||
|
|
@ -143,10 +143,6 @@ public class AuthenticatedActivity extends AppCompatActivity {
|
|||
outState.putString("authCookie", authCookie);
|
||||
}
|
||||
|
||||
protected void onAuthCookieAcquired(String authCookie) {
|
||||
|
||||
}
|
||||
protected void onAuthFailure() {
|
||||
|
||||
}
|
||||
protected abstract void onAuthCookieAcquired(String authCookie);
|
||||
protected abstract void onAuthFailure();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,7 +188,6 @@ public class ContributionsActivity
|
|||
|
||||
@Override
|
||||
protected void onAuthFailure() {
|
||||
super.onAuthFailure();
|
||||
finish(); // If authentication failed, we just exit
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -236,7 +236,6 @@ public class MultipleShareActivity
|
|||
|
||||
@Override
|
||||
protected void onAuthFailure() {
|
||||
super.onAuthFailure();
|
||||
Toast failureToast = Toast.makeText(this, R.string.authentication_failed, Toast.LENGTH_LONG);
|
||||
failureToast.show();
|
||||
finish();
|
||||
|
|
|
|||
|
|
@ -158,7 +158,6 @@ public class ShareActivity
|
|||
|
||||
@Override
|
||||
protected void onAuthCookieAcquired(String authCookie) {
|
||||
super.onAuthCookieAcquired(authCookie);
|
||||
app.getApi().setAuthCookie(authCookie);
|
||||
|
||||
|
||||
|
|
@ -176,7 +175,6 @@ public class ShareActivity
|
|||
|
||||
@Override
|
||||
protected void onAuthFailure() {
|
||||
super.onAuthFailure();
|
||||
Toast failureToast = Toast.makeText(this, R.string.authentication_failed, Toast.LENGTH_LONG);
|
||||
failureToast.show();
|
||||
finish();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue