Handle Google API Connection Problems

This commit is contained in:
Wang Han
2017-01-03 18:01:57 +08:00
committed by topjohnwu
parent 05c063b61d
commit bb2467d2ac
3 changed files with 14 additions and 0 deletions

View File

@@ -221,6 +221,16 @@ public class StatusFragment extends Fragment implements CallbackHandler.EventLis
int image, color;
safetyNetProgress.setVisibility(View.GONE);
switch (SNCheckResult) {
case -3:
color = colorNeutral;
image = R.drawable.ic_help;
safetyNetStatusText.setText(R.string.safetyNet_connection_suspended);
break;
case -2:
color = colorNeutral;
image = R.drawable.ic_help;
safetyNetStatusText.setText(R.string.safetyNet_connection_failed);
break;
case -1:
color = colorNeutral;
image = R.drawable.ic_help;