在通过smsManager.sendTextMessage
发送短信时,用户的设备崩溃了(我自己无法重现)
用户的设备是Sony Xperia Z2,Android 5.1.1
Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.content.pm.PackageInfo.packageName' on a null object reference
at android.os.Parcel.readException(Parcel.java:1562)
at android.os.Parcel.readException(Parcel.java:1505)
at com.android.internal.telephony.ISms$Stub$Proxy.sendTextForSubscriber(ISms.java:1306)
at android.telephony.SmsManager.sendTextMessage(SmsManager.java:270)
at com.xabber.android.ui.sms.SmsVerificationManager.requestPhoneNumberVerification(SmsVerificationManager.java:80)
at com.xabber.android.ui.RegistrationFragment1PhoneAndName.onNextPressed(RegistrationFragment1PhoneAndName.java:193)
at com.xabber.android.ui.RegistrationActivity.onClick(RegistrationActivity.java:122)
at android.view.View.performClick(View.java:4856)
at android.view.View$PerformClick.run(View.java:19956)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5373)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
短信发送功能在我的设备和其他几个设备上运行良好。似乎是Android漏洞。
除了https://groups.google.com/forum/#!topic/automate-user/8gyfmMvPYDY之外我找不到类似的东西 但他们没有解决它。