1. 前言
? 在9.0的系統(tǒng)rom定制化開發(fā)中,在進(jìn)行ota升級的過程中,由于在SettingsProvider中新增了系統(tǒng)屬性和修改某項(xiàng)系統(tǒng)屬性值,但是在ota升級以后發(fā)現(xiàn)沒有
更新,需要恢復(fù)出廠設(shè)置以后才會(huì)更改,但是恢復(fù)出廠設(shè)置 會(huì)丟掉一些數(shù)據(jù),這是應(yīng)為系統(tǒng)數(shù)據(jù)庫沒更新,所以需要在ota的時(shí)候同樣升級系統(tǒng)數(shù)據(jù)庫,
接下來看下如何實(shí)現(xiàn)相關(guān)的功能文章來源:http://www.zghlxwxcb.cn/news/detail-813857.html
2.ota升級關(guān)于SettingsProvider新增和修改系統(tǒng)數(shù)據(jù)相關(guān)功能實(shí)現(xiàn)的核心類
\frameworks\base\services\java\com\android\server\SystemServer.java
\frameworks\base\services\core\java\com\android\server\am\ActivityManagerService.java
\frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\SettingsProvider.java
\frameworks\base\packages\SettingsProvider\res\values\defaults.xml
3.ota升級關(guān)于SettingsProvider新增和修改系統(tǒng)數(shù)據(jù)相關(guān)功能實(shí)現(xiàn)的核心功能分析和實(shí)現(xiàn)
在系統(tǒng)中,SettingsProvider是系統(tǒng)設(shè)置的內(nèi)容提供者。它將設(shè)置類型分為三種
??? Global,全局,對系統(tǒng)中所有用戶公開,第三方App沒有寫權(quán)限
??? Secure,安全相關(guān)的用戶偏好設(shè)置,第三方App沒有寫權(quán)限
??? System,用戶偏好系統(tǒng)設(shè)置
SettingsProvider 顧名思義是一個(gè)提供設(shè)置數(shù)據(jù)共享的 P文章來源地址http://www.zghlxwxcb.cn/news/detail-813857.html
到了這里,關(guān)于Android 9.0 ota升級關(guān)于SettingsProvider新增和修改系統(tǒng)數(shù)據(jù)相關(guān)功能實(shí)現(xiàn)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!