mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-02 03:40:26 +00:00
精简:不需要获取 mImei 和 mImsi,避免异常
This commit is contained in:
parent
e0142ed351
commit
5c8d19f93c
@ -356,11 +356,11 @@ public class PhoneUtils {
|
|||||||
simInfo.mNumber = subscriptionInfo.getNumber();
|
simInfo.mNumber = subscriptionInfo.getNumber();
|
||||||
simInfo.mCountryIso = subscriptionInfo.getCountryIso();
|
simInfo.mCountryIso = subscriptionInfo.getCountryIso();
|
||||||
simInfo.mSubscriptionId = subscriptionInfo.getSubscriptionId();
|
simInfo.mSubscriptionId = subscriptionInfo.getSubscriptionId();
|
||||||
try {
|
/*try {
|
||||||
simInfo.mImei = getReflexMethodWithId(context, "getDeviceId", String.valueOf(simInfo.mSimSlotIndex));
|
simInfo.mImei = getReflexMethodWithId(context, "getDeviceId", String.valueOf(simInfo.mSimSlotIndex));
|
||||||
simInfo.mImsi = getReflexMethodWithId(context, "getSubscriberId", String.valueOf(subscriptionInfo.getSubscriptionId()));
|
simInfo.mImsi = getReflexMethodWithId(context, "getSubscriberId", String.valueOf(subscriptionInfo.getSubscriptionId()));
|
||||||
} catch (MethodNotFoundException ignored) {
|
} catch (MethodNotFoundException ignored) {
|
||||||
}
|
}*/
|
||||||
Log.d(TAG, String.valueOf(simInfo));
|
Log.d(TAG, String.valueOf(simInfo));
|
||||||
infos.add(simInfo);
|
infos.add(simInfo);
|
||||||
}
|
}
|
||||||
@ -380,12 +380,11 @@ public class PhoneUtils {
|
|||||||
simInfo.mNumber = cursor.getString(cursor.getColumnIndex("number"));
|
simInfo.mNumber = cursor.getString(cursor.getColumnIndex("number"));
|
||||||
simInfo.mCountryIso = cursor.getString(cursor.getColumnIndex("mcc"));
|
simInfo.mCountryIso = cursor.getString(cursor.getColumnIndex("mcc"));
|
||||||
String id = cursor.getString(cursor.getColumnIndex("_id"));
|
String id = cursor.getString(cursor.getColumnIndex("_id"));
|
||||||
|
/*try {
|
||||||
try {
|
|
||||||
simInfo.mImei = getReflexMethodWithId(context, "getDeviceId", String.valueOf(simInfo.mSimSlotIndex));
|
simInfo.mImei = getReflexMethodWithId(context, "getDeviceId", String.valueOf(simInfo.mSimSlotIndex));
|
||||||
simInfo.mImsi = getReflexMethodWithId(context, "getSubscriberId", String.valueOf(id));
|
simInfo.mImsi = getReflexMethodWithId(context, "getSubscriberId", String.valueOf(id));
|
||||||
} catch (MethodNotFoundException ignored) {
|
} catch (MethodNotFoundException ignored) {
|
||||||
}
|
}*/
|
||||||
Log.d(TAG, String.valueOf(simInfo));
|
Log.d(TAG, String.valueOf(simInfo));
|
||||||
infos.add(simInfo);
|
infos.add(simInfo);
|
||||||
} while (cursor.moveToNext());
|
} while (cursor.moveToNext());
|
||||||
|
Loading…
Reference in New Issue
Block a user