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
38
gaia/tv_apps/device-deck/js/bluetooth_loader.js
Executable file
38
gaia/tv_apps/device-deck/js/bluetooth_loader.js
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
(function (exports) {
|
||||
'use strict';
|
||||
exports.BluetoothLoader = {
|
||||
// on b2g-desktop, we don't have mozBluetooth API, so we inject fake one
|
||||
// just to make sure we won't break TV build on b2g-desktop
|
||||
_fakeMozBluetooth: {
|
||||
addEventListener: function() {},
|
||||
defaultAdapter: {
|
||||
_discoveryHandle: {
|
||||
addEventListener: function() {}
|
||||
},
|
||||
|
||||
state: 'disabled',
|
||||
enable: function() {
|
||||
return Promise.resolve();
|
||||
},
|
||||
disable: function() {
|
||||
return Promise.resolve();
|
||||
},
|
||||
startDiscovery: function() {
|
||||
return Promise.resolve(this._discoveryHandle);
|
||||
},
|
||||
stopDiscovery: function() {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getMozBluetooth: function() {
|
||||
if (navigator.mozBluetooth) {
|
||||
return navigator.mozBluetooth;
|
||||
} else {
|
||||
return this._fakeMozBluetooth;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}(window));
|
||||
Loading…
Reference in a new issue