|
|
@@ -414,6 +414,13 @@ exports.hasPermission = function (callback, scope) {
|
|
|
* The callback function's scope
|
|
|
*/
|
|
|
exports.registerPermission = function (callback, scope) {
|
|
|
+
|
|
|
+ if (this._registered) {
|
|
|
+ return this.hasPermission(callback, scope);
|
|
|
+ } else {
|
|
|
+ this._registered = true;
|
|
|
+ }
|
|
|
+
|
|
|
var fn = this.createCallbackFn(callback, scope);
|
|
|
|
|
|
if (device.platform != 'iOS') {
|