Fixed array out of bound issue

This commit is contained in:
Sylvain Berfini 2019-01-23 12:45:52 +01:00
parent 355ecf7ec8
commit 818177e374

View file

@ -132,6 +132,7 @@ public class StatusFragment extends Fragment {
int unreadCount;
String data = content.getStringBuffer();
String[] voiceMail = data.split("voice-message: ");
if (voiceMail.length >= 2) {
final String[] intToParse = voiceMail[1].split("/", 0);
unreadCount = Integer.parseInt(intToParse[0]);
@ -144,6 +145,7 @@ public class StatusFragment extends Fragment {
mVoicemailCount.setVisibility(View.GONE);
}
}
}
};
mIsAttached = true;