— a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/dwservice/DwSettingsService.java
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/dwservice/DwSettingsService.java
@@ -259,6 +259,8 @@ public class DwSettingsService extends Service {
//imei
dwSettingsFilter.addAction(“com.action.imei”);
dwSettingsFilter.addAction(“com.action.imei2”);
-
^M -
dwSettingsFilter.addAction("com.action.getimei"); ^M //apn //dwSettingsFilter.addAction("com.action.apn"); dwSettingsFilter.addAction("com.action.get.apn");
@@ -616,6 +618,13 @@ public class DwSettingsService extends Service {
}else if(action.equals(“com.action.imei2”)){
String imei2 = intent.getStringExtra(“keyimei2”);
setImei(imei2,2);
-
}else if(action.equals("com.action.getimei")){^M -
int simid = intent.getIntExtra("Simid",0);^M -
Log.d("DwSettingsService","==com.action.getimei==simid: "+simid);^M -
//String mImei = getIMEI(simid);^M -
Intent getIMEIturnIntent = new Intent("com.action.getimei.return");^M -
getIMEIturnIntent.putExtra("mImei",getIMEI(simid));^M -
mContext.sendBroadcast(getIMEIturnIntent);^M }else if(action.equals("com.action.get.apn")){ //获取apn Intent getApnReturnIntent = new Intent("com.action.get.apn.return");
@@ -1925,6 +1934,16 @@ public class DwSettingsService extends Service {
return stringBuilder.toString();
}
-
^M -
private String getIMEI(int simSlot) {^M -
String imei = "";^M -
TelephonyManager telephonyManager =^M -
(TelephonyManager) getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);^M -
if (telephonyManager != null) {^M -
imei = telephonyManager.getDeviceId(simSlot);^M -
}^M -
return imei;^M - }^M
}
741

被折叠的 条评论
为什么被折叠?



