频道栏目
首页 > 资讯 > Android > 正文

Android O版本上networkAttributes的说明分享

18-07-31        来源:[db:作者]  
收藏   我要投稿

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都不支持。

相关TAG标签
上一篇:使用QGIS将shp数据导入postgresql空间数据库的操作教程
下一篇:使用Python为自然语言处理加速度的教程
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站