Release 2.0.7
This commit is contained in:
Родитель
4dfac79ead
Коммит
71128ac816
5
Makefile
5
Makefile
|
@ -58,3 +58,8 @@ sonar:
|
|||
|
||||
javadoc:
|
||||
./gradlew :lib:generateReleaseJavadoc
|
||||
|
||||
zip: release
|
||||
cp lib/build/outputs/aar/unity-ads-release.aar unity-ads.aar
|
||||
zip -9r builds.zip unity-ads.aar
|
||||
rm unity-ads.aar
|
|
@ -8,8 +8,8 @@ android {
|
|||
applicationId "com.unity3d.ads.example"
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 23
|
||||
versionCode = 2006
|
||||
versionName = "2.0.6"
|
||||
versionCode = 2007
|
||||
versionName = "2.0.7"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
|
|
@ -12,8 +12,8 @@ android {
|
|||
defaultConfig {
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 23
|
||||
versionCode = 2006
|
||||
versionName = "2.0.6"
|
||||
versionCode = 2007
|
||||
versionName = "2.0.7"
|
||||
|
||||
setProperty("archivesBaseName", "unity-ads")
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ import org.junit.After;
|
|||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
|
@ -109,6 +109,17 @@ public class MetaDataTest {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCommitWithoutMetaDataSet () throws Exception {
|
||||
WebViewApp.setCurrentApp(new MetaDataWebApp());
|
||||
MetaData metaData = new MetaData(ClientProperties.getApplicationContext());
|
||||
metaData.setCategory("test");
|
||||
metaData.commit();
|
||||
|
||||
assertNull("Entries should still be null", metaData.getEntries());
|
||||
}
|
||||
|
||||
|
||||
private class MetaDataWebApp extends WebViewApp {
|
||||
public Object[] PARAMS = null;
|
||||
public Enum EVENT_CATEOGRY = null;
|
||||
|
|
|
@ -49,17 +49,20 @@ public class MetaData {
|
|||
if (StorageManager.init(_context)) {
|
||||
Storage storage = StorageManager.getStorage(StorageManager.StorageType.PUBLIC);
|
||||
|
||||
for (String key : _metaData.keySet()) {
|
||||
if (_metaData != null) {
|
||||
for (String key : _metaData.keySet()) {
|
||||
if (storage != null) {
|
||||
storage.set(key, _metaData.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
if (storage != null) {
|
||||
storage.set(key, _metaData.get(key));
|
||||
storage.writeStorage();
|
||||
storage.sendEvent(StorageEvent.SET, _metaData);
|
||||
}
|
||||
}
|
||||
|
||||
if (storage != null) {
|
||||
storage.writeStorage();
|
||||
storage.sendEvent(StorageEvent.SET, _metaData);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
DeviceLog.error("Unity Ads could not commit metadata due to storage error");
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче