(Ffos Gecko & Gaia) OTA-Transfer to System APP

Source: Internet
Author: User

Code Location: Gaia/apps/system/js/update_manager.js

1. Update_manager.js exports an object Updatemanager to the Global Window object, and the other JS module can access the Updatemanager directly.

Exports. Updatemanager = Updatemanager;

2. Updatemanager monitors the settings for ' Gaia.system.checkForUpdates ' in the Settings app, which means that when the value of ' gaia.system.checkForUpdates ' is changed, Updatemanager will be notified and bind a function to handle the changed values.

false ,     this. Checkforupdates.bind (this));

3. Viewing the Checkforupdates function found that it did not do any real check work, but rather sent a ' Force-update-check ' event.

Checkforupdates:functionsu_checkforupdates (shouldcheck) {if(!Shouldcheck) {    return; }  This  . _dispatchevent (' Force-update-check '); if(! This. _settings) {    return; }  varLock = This. _settings.createlock (); Lock.set ({' Gaia.system.checkForUpdates ':false});},_dispatchevent:functionum_dispatchevent (type, result) {varevent = document.createevent (' customevent '); vardata ={Type:type}; if(Result) {Data.result=result; } event.initcustomevent (' Mozcontentevent ',true,true, data); Window.dispatchevent (event);},

(Ffos Gecko & Gaia) OTA-Transfer to System APP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.