Fix build
This commit is contained in:
parent
184c7d3b90
commit
1505b77fea
2 changed files with 13 additions and 13 deletions
|
@ -18,7 +18,7 @@ apply plugin: 'com.android.application'
|
|||
// Less important
|
||||
|
||||
|
||||
def huawei = (!System.getenv("APP_FEATURES") || System.getenv("APP_FEATURES").contains("+huawei"))
|
||||
def huawei = (System.getenv("APP_FEATURES") && System.getenv("APP_FEATURES").contains("+huawei"))
|
||||
|
||||
task printc {
|
||||
configurations.each { if(it.isCanBeResolved()) println it.name }
|
||||
|
@ -255,10 +255,12 @@ task downloadWorldMiniBasemap {
|
|||
|
||||
task downloadHuaweiDrm {
|
||||
doLast {
|
||||
if (huawei) {
|
||||
ant.get(src: 'https://obs.cn-north-2.myhwclouds.com/hms-ds-wf/sdk/HwDRM_SDK_2.5.2.300_ADT.zip', dest: 'HwDRM_SDK_2.5.2.300_ADT.zip', skipexisting: 'true')
|
||||
ant.unzip(src: 'HwDRM_SDK_2.5.2.300_ADT.zip', dest: 'libs/')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task collectVoiceAssets(type: Sync) {
|
||||
from "../../resources/voice"
|
||||
|
@ -325,12 +327,9 @@ task collectExternalResources {
|
|||
updateNoTranslate,
|
||||
validateTranslate,
|
||||
copyWidgetIcons,
|
||||
downloadWorldMiniBasemap
|
||||
|
||||
if (huawei) {
|
||||
downloadWorldMiniBasemap,
|
||||
downloadHuaweiDrm
|
||||
}
|
||||
}
|
||||
|
||||
// Legacy core build
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package net.osmand.plus;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.huawei.android.sdk.drm.Drm;
|
||||
import com.huawei.android.sdk.drm.DrmCheckCallback;
|
||||
//import com.huawei.android.sdk.drm.Drm;
|
||||
//import com.huawei.android.sdk.drm.DrmCheckCallback;
|
||||
|
||||
public class HuaweiDrmHelper {
|
||||
private Activity activity;
|
||||
private DrmCheckCallback callback;
|
||||
//private DrmCheckCallback callback;
|
||||
|
||||
//Copyright protection id
|
||||
private static final String DRM_ID = "101048021";
|
||||
|
@ -17,6 +16,7 @@ public class HuaweiDrmHelper {
|
|||
|
||||
public HuaweiDrmHelper(final Activity activity) {
|
||||
this.activity = activity;
|
||||
/*
|
||||
callback = new DrmCheckCallback() {
|
||||
@Override
|
||||
public void onCheckSuccess() { }
|
||||
|
@ -26,10 +26,11 @@ public class HuaweiDrmHelper {
|
|||
activity.finish();
|
||||
}
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
||||
public void check() {
|
||||
Drm.check(getActivity(), getActivity().getPackageName(), DRM_ID, DRM_PUBLIC_KEY, callback);
|
||||
//Drm.check(getActivity(), getActivity().getPackageName(), DRM_ID, DRM_PUBLIC_KEY, callback);
|
||||
}
|
||||
|
||||
public Activity getActivity() {
|
||||
|
|
Loading…
Reference in a new issue