mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 11:58:09 +00:00
Prevent null pointer exception
This commit is contained in:
parent
3fbb7eeab4
commit
08bc8e2b4f
1 changed files with 6 additions and 3 deletions
|
|
@ -162,9 +162,12 @@ public class PhoneAccountValidationAssistantActivity extends AssistantActivity {
|
|||
public void onPrimaryClipChanged() {
|
||||
ClipData data = mClipboard.getPrimaryClip();
|
||||
if (data != null && data.getItemCount() > 0) {
|
||||
String clip = data.getItemAt(0).getText().toString();
|
||||
if (clip.length() == mActivationCodeLength) {
|
||||
mSmsCode.setText(clip);
|
||||
ClipData.Item item = data.getItemAt(0);
|
||||
if (item != null && item.getText() != null) {
|
||||
String clip = item.getText().toString();
|
||||
if (clip.length() == mActivationCodeLength) {
|
||||
mSmsCode.setText(clip);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue