|
1 | 1 | /*! |
2 | 2 | * ngCordova |
3 | | - * v0.1.15-alpha |
| 3 | + * v0.1.17-alpha |
4 | 4 | * Copyright 2014 Drifty Co. http://drifty.com/ |
5 | 5 | * See LICENSE in this repository for license information |
6 | 6 | */ |
@@ -243,6 +243,30 @@ ngCordovaMocks.factory('$cordovaBLE', ['$q', '$timeout', function ($q, $timeout) |
243 | 243 | }; |
244 | 244 | }]); |
245 | 245 |
|
| 246 | +ngCordovaMocks.factory('$cordovaBrightness', ['$q', function ($q) { |
| 247 | + var currentBrightness = 100; |
| 248 | + |
| 249 | + return { |
| 250 | + get: function () { |
| 251 | + var q = $q.defer(); |
| 252 | + q.resolve(currentBrightness); |
| 253 | + return q.promise; |
| 254 | + }, |
| 255 | + |
| 256 | + set: function (data) { |
| 257 | + var q = $q.defer(); |
| 258 | + currentBrightness = data; |
| 259 | + q.resolve('OK'); |
| 260 | + return q.promise; |
| 261 | + }, |
| 262 | + |
| 263 | + setKeepScreenOn: function (bool) { |
| 264 | + var q = $q.defer(); |
| 265 | + q.resolve('OK'); |
| 266 | + return q.promise; |
| 267 | + } |
| 268 | + }; |
| 269 | +}]); |
246 | 270 | /** |
247 | 271 | * @ngdoc service |
248 | 272 | * @name ngCordovaMocks.cordovaCamera |
@@ -685,7 +709,7 @@ ngCordovaMocks.factory('$cordovaDeviceMotion', ['$interval', '$q', function ($in |
685 | 709 | if (this.throwsError) { |
686 | 710 | defer.reject('There was an error watching the current acceleration.'); |
687 | 711 | } else { |
688 | | - var delay = 10000; // The default based on https://github.com/apache/cordova-plugin-device-motion/blob/master/doc/index.md |
| 712 | + var delay = 10000; // The default based on https://github.com/apache/cordova-plugin-device-motion |
689 | 713 | if (options && options.frequency) { |
690 | 714 | delay = options.frequency; |
691 | 715 | } |
@@ -823,7 +847,7 @@ ngCordovaMocks.factory('$cordovaDeviceOrientation', ['$interval', '$q', function |
823 | 847 | if (self.throwsError) { |
824 | 848 | defer.reject('There was an error getting the compass heading.'); |
825 | 849 | } else { |
826 | | - var delay = 100; // The default based on https://github.com/apache/cordova-plugin-device-orientation/blob/master/doc/index.md |
| 850 | + var delay = 100; // The default based on https://github.com/apache/cordova-plugin-device-orientation |
827 | 851 | if (options && options.frequency) { |
828 | 852 | delay = options.frequency; |
829 | 853 | } |
@@ -2170,7 +2194,7 @@ ngCordovaMocks.factory('$cordovaNetwork', function () { |
2170 | 2194 | * |
2171 | 2195 | * @description |
2172 | 2196 | * They type of connection. Values should match those found at |
2173 | | - * https://github.com/apache/cordova-plugin-network-information/blob/master/doc/index.md |
| 2197 | + * https://github.com/apache/cordova-plugin-network-information |
2174 | 2198 | * This property should only be used in automated tests. |
2175 | 2199 | **/ |
2176 | 2200 | connectionType: connectionType, |
@@ -2802,7 +2826,7 @@ ngCordovaMocks.factory('$cordovaVibration', ['$timeout', function ($timeout) { |
2802 | 2826 |
|
2803 | 2827 | /* jshint ignore:start */ |
2804 | 2828 | vibrateWithPattern: function (pattern, repeat) { |
2805 | | - // Based on the documentation (https://github.com/apache/cordova-plugin-vibration/blob/master/doc/index.md) |
| 2829 | + // Based on the documentation (https://github.com/apache/cordova-plugin-vibration) |
2806 | 2830 | // This method is deprecated. For that reason, this isn't implemented at this time. |
2807 | 2831 | }, |
2808 | 2832 | /* jshint ignore:end */ |
|
0 commit comments