Global

Members

_stepReady :Boolean

Indicates if we had run the date-time step in ftu or not.

Indicates if we had run the date-time step in ftu or not.

Type:
  • Boolean
Source:

active :Boolean

Indicates the emergency callback state

.

Indicates the emergency callback state

Type:
  • Boolean
Source:

connected :Boolean

Indicate there is active tethering client

.

Indicate there is active tethering client

Type:
  • Boolean
Source:

enabled :Boolean

Indicate if the tethering is enabled

.

Indicate if the tethering is enabled

Type:
  • Boolean
Source:

FxaModuleCoppa

This module allow the user to select her age from a date picker and checks that she is old enough to create a Firefox account.

This module allow the user to select her age from a date picker and checks that she is old enough to create a Firefox account. Otherwise, it shows an error.

Source:

FxaModuleEnterEmail

This module checks the validity of an email address, and if valid, determines which screen to go next.

This module checks the validity of an email address, and if valid, determines which screen to go next.

Source:

FxaModuleEnterPassword

This module checks the validity of password given email address, and if valid, determine which screen to go next.

This module checks the validity of password given email address, and if valid, determine which screen to go next.

Source:

FxaModuleSetPassword

Takes care of a new user's set password screen.

Takes care of a new user's set password screen. If password is valid, attempt to stage the user.

Source:

FxaModuleSigninSuccess

Display the signup success message to the user.

Display the signup success message to the user.

Source:

FxaModuleSignupSuccess

Display the signup success message to the user.

Display the signup success message to the user.

Source:

idb

Support different browser versions of IndexedDB

.

Support different browser versions of IndexedDB

Source:

IGNORED_INPUT_TYPES

For some flow diagrams related to input management, please refer to https://wiki.mozilla.org/Gaia/System/InputManagement#Flow_Diagrams .

For some flow diagrams related to input management, please refer to https://wiki.mozilla.org/Gaia/System/InputManagement#Flow_Diagrams .

Source:

lockScreen

Source:

PRIORITIES :Array

Predefined priorities per module by module name.

Predefined priorities per module by module name.

Type:
  • Array
Source:

SpinDatePicker

SpinDatePicker is a html/js "widget" which enables users pick a specific date.

SpinDatePicker is a html/js "widget" which enables users pick a specific date. It display the date in the way based on the language setting.

The SpinDatePicker itself contains no UI for the controls.

Example usage:

// All necessary UI elements are contained in the root element. var picker = new SpinDatePicker(root); picker.value = new Date(); // after users pick a date var newDate = picker.value;

Source:

ValuePicker

base widget used in ValueSelector and SpinDatePicker widget

.

base widget used in ValueSelector and SpinDatePicker widget

Source:

Methods

"_observe_vibration.enabled"(value)

Observer the value of vibration.enabled settings.

Observer the value of vibration.enabled settings.

Parameters:
Name Type Description
value Boolean

The value of the settings.

Source:

_choiceFromDefaultAction(defaultChoice) → {Integer}

This gets the index from the defaultChoice in the choices list.

This gets the index from the defaultChoice in the choices list.

Parameters:
Name Type Description
defaultChoice Object

The default choice

Source:
Returns:

The index where the default choice is located. -1 if it is not found

Type
Integer

_debug()

Debug method

.

Debug method

Source:

_deleteAudioChannelFromInterruptedAudioChannels(audioChannel)

Delete the audio channel from _interruptedAudioChannels array.

Delete the audio channel from _interruptedAudioChannels array.

Parameters:
Name Type Description
audioChannel AudioChannelController

The audio channel want to delete.

Source:

_fadeInFadedOutAudioChannels()

Fade in all faded out audio channels.

Fade in all faded out audio channels.

Source:

_getDefaultPreferredNetworkType()

Returns the default preferred network types based on the hardware supported network types.

Returns the default preferred network types based on the hardware supported network types.

Source:

_getDefaultPreferredNetworkTypes()

Returns an array specifying the default preferred network types of all mobile connections.

Returns an array specifying the default preferred network types of all mobile connections.

Source:

_handle_audiochanneldestroyed(evt)

Remove the window's audio channels from _activeAudioChannels and _interruptedAudioChannels when the window is terminated.

Remove the window's audio channels from _activeAudioChannels and _interruptedAudioChannels when the window is terminated.

Parameters:
Name Type Description
evt Event

The event to handle.

Source:

_handle_audiochannelstatechanged(evt)

Handle the audio chanel when it is active or in inactive.

Handle the audio chanel when it is active or in inactive.

Parameters:
Name Type Description
evt Event

The event to handle.

Source:

_handle_hierarchytopmostwindowchanged()

Handle the audio chanel when the app is in foreground or background.

Handle the audio chanel when the app is in foreground or background.

Source:

_handle_mozChromeEvent(evt)

Handle MozChromeEvent.

Handle MozChromeEvent.

Parameters:
Name Type Description
evt Event

The event to handle.

Source:

_handleAudioChannel(audioChannel)

Handle the audio channel and update _activeAudioChannels and _interruptedAudioChannels.

Handle the audio channel and update _activeAudioChannels and _interruptedAudioChannels.

Parameters:
Name Type Description
audioChannel AudioChannelController

The audio channel.

Source:

_isAudioChannelInBackground(audioChannel)

Check the audio channel is in background or not.

Check the audio channel is in background or not.

Parameters:
Name Type Description
audioChannel AudioChannelController

The audio channel.

Source:

_isNeededToFadeOutForActiveAudioChannel(activeChannelName, newChannelName) → {Boolean}

Get the policy of fading out the active audio channel.

Get the policy of fading out the active audio channel.

Parameters:
Name Type Description
activeChannelName String

The active audio channel name.

newChannelName String

The new audio channel name.

Source:
Returns:
Type
Boolean

_isNeededToFadeOutForNewAudioChannel(activeChannelName, newChannelName) → {Boolean}

Get the policy of fading out the new audio channel.

Get the policy of fading out the new audio channel.

Parameters:
Name Type Description
activeChannelName String

The active audio channel name.

newChannelName String

The new audio channel name.

Source:
Returns:
Type
Boolean

_isNeededToResumeWhenOtherEndsForActiveAudioChannel(activeChannelName, newChannelName) → {Boolean}

Get the policy of resuming the active audio channel when any other audio channel ends.

Get the policy of resuming the active audio channel when any other audio channel ends.

Parameters:
Name Type Description
activeChannelName String

The active audio channel name.

newChannelName String

The new audio channel name.

Source:
Returns:
Type
Boolean

_isNeededToVibrateForActiveAudioChannel(activeChannelName, newChannelName) → {Boolean}

Get the policy of vibrating for the active audio channel.

Get the policy of vibrating for the active audio channel.

Parameters:
Name Type Description
activeChannelName String

The active audio channel name.

newChannelName String

The new audio channel name.

Source:
Returns:
Type
Boolean

_manageAudioChannels(audioChannel)

Play or pause the new audio channel and the active audio channels.

Play or pause the new audio channel and the active audio channels.

Parameters:
Name Type Description
audioChannel AudioChannelController

The new audio channel.

Source:

_resetAudioChannel(audioChannel)

Set the audio channel as default state as muted, and fade in the faded out audio channels.

Set the audio channel as default state as muted, and fade in the faded out audio channels.

Parameters:
Name Type Description
audioChannel AudioChannelController

The audio channel.

Source:

_resumeAudioChannels(appopt)

Resume interrupted audio channels.

Resume interrupted audio channels.

Parameters:
Name Type Attributes Description
app AppWindow <optional>

The app window in foreground.

Source:

_sendContentEvent(detail)

Send MozContentEvent to control the audio chanenl in System app.

Send MozContentEvent to control the audio chanenl in System app.

Parameters:
Name Type Description
detail Object

The arguments for passing to Gecko.

Properties
Name Type Description
type Object

The operation for the audio channel.

Source:

_start()

Initial the module.

Initial the module.

Source:

_start()

Initial the module.

Initial the module.

Source:

addObserver(name, context)

addObserver provides a "addEventListener"-like interface to observe settings change.

addObserver provides a "addEventListener"-like interface to observe settings change.

Parameters:
Name Type Description
name String

The settings name

context Object

The object which wants to observe the settings. It should have a method named for 'observe'.

Source:
Example
var s = new SettingsCore();
s.start();
var MyModule = {
  init: function() {
    s.addObserver('lockscreen.enabled', this);
    s.addObserver('lockscreen.locked', this);
  },
  observe: function(name, value) {
    console.log('settings of ' + name + ' had changed to ' + value);
  }
};
MyModule.init();

applyPolicy(newAudioChannel, activeAudioChannels, optionsopt)

Get the policies of handling the new audio channel and active audio channels.

Get the policies of handling the new audio channel and active audio channels.

Parameters:
Name Type Attributes Description
newAudioChannel AudioChannelController

A new audio channel you want to handle.

activeAudioChannels Map

Active audio channels playing noew.

options Object <optional>

Options.

Properties
Name Type Attributes Description
isNewAudioChannelInBackground Boolean <optional>

Is the new audio channel in background.

Source:

broadcast(evt)

Broadcast hierarchy based event until it's blocked

.

Broadcast hierarchy based event until it's blocked

Parameters:
Name Type Description
evt DOMEvent

Event to be broadcast

Source:

checkTopSites()

Check if we need to render a screenshot of the current visit in the case that it is in the top most visited sites

.

Check if we need to render a screenshot of the current visit in the case that it is in the top most visited sites

Source:

destroy()

Remove all event listeners.

Remove all event listeners. This is mainly used in unit tests.

Source:

DownloadNotification(download)

This is the constructor that will represent a download notification in the system

.

This is the constructor that will represent a download notification in the system

Parameters:
Name Type Description
download Object

object provided by the API.

Source:

encodeEmptyHandoverSelect() → {Array}

Returns an empty Handover Select NDEF message (i.e., a Hs message with no AC).

Returns an empty Handover Select NDEF message (i.e., a Hs message with no AC).

Source:
Returns:

NDEF records for an empty handover select message.

Type
Array

encodeHandoverRequest(mac, cps) → {Array}

Returns a Bluetooth Handover Request message.

Returns a Bluetooth Handover Request message. This method DOES NOT implement a full set of arguments as defined in NFCForum-AD-BTSSP_1.0.1.

First record is a Handover Request Record (type="Hr"). It contains CPS and 2-byte random value used for collision detection (autogenerated).

Second record contains Bluetooth OOB data. For explanation,

Parameters:
Name Type Description
mac String

MAC address, ie.: "01:23:45:67:89:AB".

cps Integer

Carrier Power State.

Source:
See:
  • encodeHandoverSelect() and specification.
Returns:

NDEF records for handover select message.

Type
Array

encodeHandoverSelect(mac, cps, btDeviceName) → {Array}

Returns a Bluetooth Handover Select message.

Returns a Bluetooth Handover Select message. This method DOES NOT implement the full spec as defined in NFCForum-AD-BTSSP_1.0.1. In particular, this method supports only Bluetooth device MAC address and Local Name in the Bluetooth Carrier Configuration Record.

First record is Handover Select Record (type="Hs"). It contains, among other things, the CPS (Carrier Power State).

Second record of this message contains Bluetooth Out of Band (OOB) data. It contains following fields:

  • [2 octets] OOB Data Length - Mandatory. Total length of OOB data,
                             including this field itself.
  • [6 octets] BT Device Address - Mandatory. BT device address (MAC).
  • [N octets] OOB Optional Data - The remaining data in EIR format.
                               This method supports only device name
                               here.

EIR data, as of this implementation, is optional. It will be ommited if you do not pass btDeviceName parameter. If you do, OOB Optional Data will be in a form:

  • [1 octet] EIR Data Length - Does not include this field.
  • [1 octet] EIR Data Type - only 0x09 (BT Local Name) supported.
  • [N octets] Contents - BT Local Name
Parameters:
Name Type Description
mac String

MAC address, ie.: "01:23:45:67:89:AB".

cps Integer

Carrier Power State.

btDeviceName UInt8Array

Optional, user-friendly name of Bluetooth device.

Source:
Returns:

NDEF records for handover select message.

Type
Array

ensureValueUnderKeyIsArray()

Helper function.

Helper function. Ensure the value stored under the specified key is an array.

Source:

formatMAC(Array) → {String}

Formats MAC address as a MAC-48 string (colon-separated).

Formats MAC address as a MAC-48 string (colon-separated).

Parameters:
Name Type Description
Array Array

of six numbers representing MAC.

Source:
Returns:

MAC address.

Type
String

getTopMostWindow() → {AppWindow|undefined}

Provide the top most window information.

Provide the top most window information. Usually used by integration tests.

Source:
Returns:

The top most window instance.

Type
AppWindow | undefined

hasActiveCall(index) → {Boolean}

Check if there is active call

.

Check if there is active call

Parameters:
Name Type Description
index Number

If not specified, it means any active call; if specified, it means the active call at this SIM slot.

Source:
Returns:

There is active call or not.

Type
Boolean

initCallerIdPreference()

Initializes caller id restriction based on user setting.

Initializes caller id restriction based on user setting.

CLIR_DEFAULT: 0 CLIR_INVOCATION: 1 CLIR_SUPPRESSION: 2

Source:

initPreferredNetworkType()

Initialize preferred network type.

Initialize preferred network type. If the default value is null, we should use the option that makes the device able to connect all supported netwrok types.

Source:

initRoaming()

Initializes roaming based on user setting.

Initializes roaming based on user setting.

Source:

initVoicePrivacy()

Initializes voice privacy based on user setting.

Initializes voice privacy based on user setting.

Source:

launch(manifestURL, openOnStart)

This service will be requested by Launcher.

This service will be requested by Launcher.

Parameters:
Name Type Description
manifestURL String

The manifest URL of homescreen

openOnStart Boolean

If this is true, we will open the window right away

Source:

launch(manifestURL)

The function will be requested by the global Launcher when it gets the ftu manifestURL.

The function will be requested by the global Launcher when it gets the ftu manifestURL.

Parameters:
Name Type Description
manifestURL String

The manifest URL of ftu

Source:

parseBluetoothSSP(cdr) → {Object}

Parses a Carrier Data Record according to NFCForum-AD-BTSSP_1.0.

Parses a Carrier Data Record according to NFCForum-AD-BTSSP_1.0. This method will parse MAC address. In addition to that, it will parse, if found in EIR data, Bluetooth Local Name. Other EIR fields are currently unsupported.

Parameters:
Name Type Description
cdr Object

Carrier Data Record. It's payload field should contain Bluetooth OOB data.

Source:
Returns:

Parsed record. Will always contain 'mac' property. If BT local name was present in cdr, will also have 'localName' property. Null if cdr was invalid.

Type
Object

parseHandoverNDEF(ndefMsg) → {Object}

Parse Handover Request NDEF message.

Parse Handover Request NDEF message. Only 'Hr' and 'Hs' records are supported (NFCForum-TS-ConnectionHandover_1_2.doc).

Returns handover object similar to: { majorVersion: 1, minorVersion: 2, type: 'Hr' // or 'Hs' cr: 123 // 'Hr' only ac: [ // Array of BT OOB records { cps: 1, cdr: ... // MozNDEFRecord with details, i.e. }, // Bluetooth MAC address. ... ] }

Parameters:
Name Type Description
ndefMsg Array

NDEF message (array of MozNDEFRecords)

Source:
Returns:

Parsed handover request or null if ndefMsg was not valid or well formatted.

Type
Object

parseMAC(MAC) → {Array}

Parses Bluetooth MAC-48 address.

Parses Bluetooth MAC-48 address.

Parameters:
Name Type Description
MAC String

address.

Source:
Returns:

Array of six numbers representing MAC or null if it was not valid.

Type
Array

registerHierarchy()

This function is used for any UI module who wants to occupy the hierachy.

This function is used for any UI module who wants to occupy the hierachy.

Source:

searchForBluetoothAC(h) → {Object}

Returns first record from handover message which contains Bluetooth OOB (Out of Band) data.

Returns first record from handover message which contains Bluetooth OOB (Out of Band) data.

Parameters:
Name Type Description
h Array

Handover message (array of records).

Source:
Returns:

MozNDEFRecord with Bluetooth OOB.

Type
Object

sendNDEFMessageToNFCPeer(message, nfcEvent)

Send NDEF message to NFC peer.

Send NDEF message to NFC peer.

Parameters:
Name Type Description
message MozNDEFRecord

non-null Array of NDEF records.

nfcEvent Events

an event from mozNfc.onpeerready.

Source:

setVisits()

Manually set the previous visits array of timestamps, used for migrations

.

Manually set the previous visits array of timestamps, used for migrations

Source:

unregisterHierarchy()

Remove the module reference from the living UI list.

Remove the module reference from the living UI list.

Source:

validateCPS() → {Boolean}

According to [CH] (Connection Handover Technical Specification), CPS can be one of the following:

  • 0 - Inactive
  • 1 - Active
  • 2 - Activating
  • 3 - Unknown
.

According to [CH] (Connection Handover Technical Specification), CPS can be one of the following:

  • 0 - Inactive
  • 1 - Active
  • 2 - Activating
  • 3 - Unknown
Source:
Returns:

True when cps valid. False otherwise.

Type
Boolean

Type Definitions

ActivityConfig

Activity Config

.

Activity Config

Type:
  • Object
Properties:
Name Type Description
manifestURL String

The manifestURL of the activity

url String

The URL of the activity handling page

isActivity Boolean
inline Boolean

The disposition of the activty is inline or not

Source:

BrowserConfig

Browser Configuration

.

Browser Configuration

Type:
  • Object
Properties:
Name Type Description
origin String

the same as appURL.

manifestURL String

the same as manifestURL.

manifest Object

the parsed manifest object. If the app is not an entry point app, the manifest would be the reference of application manifest stored in Applications module. But if the app is an entry point app, we will do deep clone to generate a new object and replace the properties of entry point to proper position.

name String

the name of the app, retrieved from manifest.

oop Boolean

Indicate it's running out of process or in process.

Source: