mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Handle case when Authentication fails
This commit is contained in:
parent
b85cc9c0e5
commit
52b16d298e
2 changed files with 13 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
<string name="uploading_message">More witty text here!</string>
|
||||
<string name="uploading_success">Upload succeeded!</string>
|
||||
<string name="uploading_failed">Upload failed!</string>
|
||||
<string name="authentication_failed">Authentication failed!</string>
|
||||
<string name="uploading_started">Upload started!</string>
|
||||
|
||||
</resources>
|
||||
|
|
@ -69,6 +69,18 @@ public class ShareActivity extends AuthenticatedActivity {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onAuthFailure() {
|
||||
super.onAuthFailure();
|
||||
Toast failureToast = Toast.makeText(this, R.string.authentication_failed, Toast.LENGTH_LONG);
|
||||
failureToast.show();
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue