diff --git a/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp b/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp index 036e69f3e3e8..769ec955cd51 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp @@ -113,7 +113,15 @@ InitListUpdateRequest(ThreatType aThreatType, ListUpdateRequest* aListUpdateRequest) { aListUpdateRequest->set_threat_type(aThreatType); - aListUpdateRequest->set_platform_type(GetPlatformType()); + PlatformType platform = GetPlatformType(); +#if defined(ANDROID) + // Temporary hack to fix bug 1441345. + if ((aThreatType == SOCIAL_ENGINEERING_PUBLIC) || + (aThreatType == SOCIAL_ENGINEERING)) { + platform = LINUX_PLATFORM; + } +#endif + aListUpdateRequest->set_platform_type(platform); aListUpdateRequest->set_threat_entry_type(URL); Constraints* contraints = new Constraints(); @@ -419,6 +427,8 @@ nsUrlClassifierUtils::MakeFindFullHashRequestV4(const char** aListNames, // Set up FindFullHashesRequest.threat_info. auto threatInfo = r.mutable_threat_info(); + PlatformType platform = GetPlatformType(); + // 1) Set threat types. for (uint32_t i = 0; i < aListCount; i++) { // Add threat types. @@ -434,6 +444,14 @@ nsUrlClassifierUtils::MakeFindFullHashRequestV4(const char** aListNames, } threatInfo->add_threat_types((ThreatType)threatType); +#if defined(ANDROID) + // Temporary hack to fix bug 1441345. + if (((ThreatType)threatType == SOCIAL_ENGINEERING_PUBLIC) || + ((ThreatType)threatType == SOCIAL_ENGINEERING)) { + platform = LINUX_PLATFORM; + } +#endif + // Add client states for index 'i' only when the threat type is available // on current platform. nsCString stateBinary; @@ -443,7 +461,7 @@ nsUrlClassifierUtils::MakeFindFullHashRequestV4(const char** aListNames, } // 2) Set platform type. - threatInfo->add_platform_types(GetPlatformType()); + threatInfo->add_platform_types(platform); // 3) Set threat entry type. threatInfo->add_threat_entry_types(URL);