当前位置: 移动技术网 > IT编程>移动开发>Android > Android O版本上networkAttributes的说明分享

Android O版本上networkAttributes的说明分享

2018年09月29日  | 移动技术网IT编程  | 我要评论

fag进口轴承,巴黎公社,雅安志愿者

andoird o开始,由于mtk overlay机制,networkattributes的读取有改变。

aosp的networkattributes是放在framework目录下:

/frameworks/base/core/res/res/values/

250

251 "wifi,1,1,1,-1,true"

252 "mobile,0,0,0,-1,true"

253 "mobile_mms,2,0,2,60000,true"

254 "mobile_supl,3,0,2,60000,true"

255 "mobile_dun,4,0,2,60000,true"

256 "mobile_hipri,5,0,3,60000,true"

257 "mobile_fota,10,0,2,60000,true"

258 "mobile_ims,11,0,2,60000,true"

259 "mobile_cbs,12,0,2,60000,true"

260 "wifi_p2p,13,1,0,-1,true"

261 "mobile_ia,14,0,2,-1,true"

262 "mobile_emergency,15,0,2,-1,true"

263

android o并不会读取该位置下的array。

由于device.mk中增加了overlay:

3542# add for telephony resource overlay

3543device_package_overlays += device/mediatek/common/overlay/telephony

因此,networkattributes读取的是:

/device/mediatek/common/overlay/telephony/frameworks/base/core/res/res/values/

17

18 "wifi,1,1,1,-1,true"

19 "mobile,0,0,0,-1,true"

20 "mobile_mms,2,0,2,60000,true"

21 "mobile_supl,3,0,2,60000,true"

22 "mobile_dun,4,0,2,60000,true"

23 "mobile_hipri,5,0,3,60000,true"

24 "mobile_fota,10,0,2,60000,true"

25 "mobile_ims,11,0,-1,-1,true"

26 "mobile_cbs,12,0,2,60000,true"

27 "wifi_p2p,13,1,0,-1,true"

28 "mobile_ia,14,0,2,-1,true"

29 "mobile_emergency,15,0,2,-1,true"

30 "mobile_dm,20,0,3,60000,true"

31 "mobile_wap,21,0,3,60000,true"

32 "mobile_net,22,0,3,60000,true"

33 "mobile_cmmail,23,0,3,60000,true"

34 "mobile_rcse,24,0,3,60000,true"

35 "mobile_xcap,25,0,3,60000,true"

36 "mobile_rcs,26,0,3,60000,true"

37 "mobile_bip,27,0,3,60000,true"

38 "mobile_vsim,28,0,-1,60000,true"

39 "mobile_preempt,29,0,9,60000,true"

40

解决方法:

如果有需要用的自身overlay的话,需要参考mtk overlay中的networkattributes做适配,

因为aosp中的networkattributes支持的apn类型较少,像bip以及xcap都不支持。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网