mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2026-10-26 16:45:23 +00:00
Handle login error
This commit is contained in:
1 parent
33329189de
commit
7a9643566f
1 file changed
+9
-1
+9
-1
@@ -86,7 +86,7 @@ public class StartupActivity extends Activity {
|
||||
switch (serverResult.getState()) {
|
||||
case ServerSignIn:
|
||||
try {
|
||||
serverResult.getApiClient().AuthenticateUserAsync("Dad","1224", new Response<AuthenticationResult>() {
|
||||
serverResult.getApiClient().AuthenticateUserAsync("Dad","124", new Response<AuthenticationResult>() {
|
||||
@Override
|
||||
public void onResponse(AuthenticationResult authenticationResult) {
|
||||
logger.Debug("Signed in as Dad.");
|
||||
@@ -94,6 +94,14 @@ public class StartupActivity extends Activity {
|
||||
Intent intent = new Intent(activity, MainActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception exception) {
|
||||
super.onError(exception);
|
||||
logger.ErrorException("Error logging in", exception);
|
||||
Utils.showToast(activity, "Error logging in");
|
||||
System.exit(1);
|
||||
}
|
||||
});
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in new issue
Block a user