diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index 75acb83563..97573622dd 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -363,6 +363,15 @@ task collectExternalResources { validateTranslate, copyWidgetIcons, downloadWorldMiniBasemap + + Gradle gradle = getGradle() + String tskReqStr = gradle.getStartParameter().getTaskRequests().toString().toLowerCase() + // Use Drm SDK only for huawei build + if (tskReqStr.contains("huawei")) { + dependsOn downloadPrebuiltHuaweiDrm + } else { + dependsOn cleanPrebuiltHuaweiDrm + } } // Legacy core build @@ -411,15 +420,6 @@ task cleanupDuplicatesInCore() { afterEvaluate { android.applicationVariants.all { variant -> variant.javaCompiler.dependsOn(collectExternalResources, buildOsmAndCore, cleanupDuplicatesInCore) - - // Use Drm strings only for huawei flavor - if ("huawei" == variant.productFlavors[0].name) { - variant.javaCompiler.dependsOn downloadPrebuiltHuaweiDrm - variant.preBuild.dependsOn downloadPrebuiltHuaweiDrm - } else { - variant.javaCompiler.dependsOn cleanPrebuiltHuaweiDrm - variant.preBuild.dependsOn cleanPrebuiltHuaweiDrm - } } } diff --git a/OsmAnd/src/net/osmand/plus/HuaweiDrmHelper.java b/OsmAnd/src/net/osmand/plus/HuaweiDrmHelper.java index 365078995d..7cc2f2798e 100644 --- a/OsmAnd/src/net/osmand/plus/HuaweiDrmHelper.java +++ b/OsmAnd/src/net/osmand/plus/HuaweiDrmHelper.java @@ -11,9 +11,9 @@ public class HuaweiDrmHelper { private static final String TAG = HuaweiDrmHelper.class.getSimpleName(); //Copyright protection id - private static final String DRM_ID = "101048021"; + private static final String DRM_ID = "101117397"; //Copyright protection public key - private static final String DRM_PUBLIC_KEY = "e0a6c798fddfd0927bd509dfeafcef4b61c4408d7ea0ca9dfb4b7766b964f801"; + private static final String DRM_PUBLIC_KEY = "9d6f861e7d46be167809a6a62302749a6753b3c1bd02c9729efb3973e268091d"; public static void check(Activity activity) { boolean succeed = false;