From ca35d9aa078e44bb41b4ede89e11bfc1af438948 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Tue, 30 Jul 2013 15:38:01 -0400 Subject: [PATCH] Bug 832960 - Geolocation and desktop notification should require a manifest entry for apps on Android. r=mfinkle --- mobile/android/components/ContentPermissionPrompt.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mobile/android/components/ContentPermissionPrompt.js b/mobile/android/components/ContentPermissionPrompt.js index 683c458cbf34..993e105568b8 100644 --- a/mobile/android/components/ContentPermissionPrompt.js +++ b/mobile/android/components/ContentPermissionPrompt.js @@ -31,6 +31,12 @@ ContentPermissionPrompt.prototype = { request.cancel(); return true; } + + if (request.principal.appId !== Ci.nsIScriptSecurityManager.NO_APP_ID && request.principal.appId !== Ci.nsIScriptSecurityManager.UNKNOWN_APP_ID && (result == Ci.nsIPermissionManager.UNKNOWN_ACTION && !!kEntities[request.type])) { + request.cancel(); + return true; + } + return false; },