Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
79
gaia/apps/ringtones/js/null_ringtone.js
Executable file
79
gaia/apps/ringtones/js/null_ringtone.js
Executable file
|
|
@ -0,0 +1,79 @@
|
|||
/* global Promise */
|
||||
/* exported NullRingtone */
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Create a ringtone with no audio data backing it.
|
||||
*/
|
||||
function NullRingtone() {}
|
||||
|
||||
NullRingtone.prototype = {
|
||||
/**
|
||||
* @return {String} The localized name of the ringtone. Assumes mozL10n has
|
||||
* been initialized.
|
||||
*/
|
||||
get name() {
|
||||
return navigator.mozL10n.get(this.l10nID);
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {String} The filename of the ringtone (null in this case).
|
||||
*/
|
||||
get filename() {
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {String} The l10n ID of the ringtone.
|
||||
*/
|
||||
get l10nID() {
|
||||
return 'ringtone-none';
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {String} A unique ID for the ringtone.
|
||||
*/
|
||||
get id() {
|
||||
return 'none:none';
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {String} The type of the tone (null in this case).
|
||||
*/
|
||||
get type() {
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {String} The URL of the ringtone (null in this case).
|
||||
*/
|
||||
get url() {
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {Boolean} Whether this ringtone is shareable (always false).
|
||||
*/
|
||||
get shareable() {
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {Boolean} Whether this ringtone is deletable (always false).
|
||||
*/
|
||||
get deletable() {
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets a blob for this tone.
|
||||
*
|
||||
* @return {Promise} A promise returning the audio data (always null, since
|
||||
* this is a null ringtone).
|
||||
*/
|
||||
getBlob: function() {
|
||||
return new Promise(function(resolve, reject) {
|
||||
resolve(null);
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue