Fix build
This commit is contained in:
parent
e861741fe6
commit
05b87e1ed8
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,8 +255,10 @@ task downloadWorldMiniBasemap {
|
|||
|
||||
task downloadHuaweiDrm {
|
||||
doLast {
|
||||
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/')
|
||||
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/')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -325,11 +327,8 @@ task collectExternalResources {
|
|||
updateNoTranslate,
|
||||
validateTranslate,
|
||||
copyWidgetIcons,
|
||||
downloadWorldMiniBasemap
|
||||
|
||||
if (huawei) {
|
||||
downloadHuaweiDrm
|
||||
}
|
||||
downloadWorldMiniBasemap,
|
||||
downloadHuaweiDrm
|
||||
}
|
||||
|
||||
// Legacy core build
|
||||
|
|
|
@ -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