Skip to content

Commit

Permalink
## 4.6.0.4
Browse files Browse the repository at this point in the history
* Bug Fixes
  * correct SRT appending an extra timeout at the end of the connection entry
  * correct issue with Ukraine text where the white space separation would disappear.
  • Loading branch information
takdeveloper committed Oct 18, 2024
2 parents fcae866 + 616b93e commit 0fe5233
Show file tree
Hide file tree
Showing 20 changed files with 113 additions and 86 deletions.
6 changes: 6 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Version History

## 4.6.0.4

* Bug Fixes
* correct SRT appending an extra timeout at the end of the connection entry
* correct issue with Ukraine text where the white space separation would disappear.

## 4.6.0.3

* Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion atak/ATAK/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ buildscript {
apply from: '../../gradle/versions.gradle', to: project

ext.ATAK_VERSION = "4.6.0"
ext.ATAK_VERSION_SUBMINOR = ".3"
ext.ATAK_VERSION_SUBMINOR = ".4"

ext.isDevKitEnabled = { ->
return getProperty('takRepoMavenUrl', null) != null &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,19 @@ public void connectionEntrySrt() {
ConnectionEntry ce3 = new ConnectionEntry("test",
"srt://compass.vidterra.com:1935?passphrase=Password123&streamid=play/68b7c23ce50a8816a208aaadf1c41d51");
Assert.assertEquals(ce3.getProtocol(), ConnectionEntry.Protocol.SRT);
Assert.assertEquals(ce1.getPassphrase(), "Password123");
Assert.assertEquals(ce3.getPassphrase(), "Password123");
Assert.assertEquals(ce3.getPath(),
"?streamid=play/68b7c23ce50a8816a208aaadf1c41d51");

}

@Test
public void connectionEntrySrt2() {
ConnectionEntry ce = new ConnectionEntry("test",
"srt://34.219.213.241:9005?timeout=12000000&passphrase=DemoOfSanta");
Assert.assertEquals(ce.getProtocol(), ConnectionEntry.Protocol.SRT);
Assert.assertEquals(ce.getNetworkTimeout(), 12000000);
Assert.assertEquals(ce.getPassphrase(), "DemoOfSanta");
Assert.assertEquals(ce.getPort(), 9005);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

package com.atakmap.comms;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import com.atakmap.android.androidtest.ATAKInstrumentedTest;
import com.atakmap.commoncommo.CommoException;
import com.atakmap.commoncommo.FileIOProvider;
Expand Down Expand Up @@ -31,13 +38,6 @@
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import androidx.test.ext.junit.runners.AndroidJUnit4;

/**
* This class tests the functionality of the native FileIOProvider by attempting a SimpleFileIO file
* transfer and verifying the channel is opened and that bytes are transferred.
Expand Down Expand Up @@ -90,7 +90,6 @@ public void beforeTest() throws CommoException {
*/
@After
public void afterTest() {
IOProviderFactory.unregisterProvider(_dummyProvider);
_tester.deregisterFileIOProvider(_testProvider);
_testChannel = null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

package com.atakmap.coremap.cot.event;

import com.atakmap.android.androidtest.ATAKInstrumentedTest;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import com.atakmap.android.androidtest.ATAKInstrumentedTest;

import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(AndroidJUnit4.class)
public class CotEventTester extends ATAKInstrumentedTest {

Expand Down Expand Up @@ -62,6 +62,15 @@ public void valid2() {
assertEquals("extra", testDetail.getInnerText());
}

@Test
public void validEncoded() {
CotEvent ce = CotEvent.parse(getValid4());
CotDetail cd = ce.getDetail();
CotDetail testDetail = cd.getChild(0);
assertEquals("test", testDetail.getElementName());
assertEquals("Бі не по", testDetail.getInnerText());
}

private String getInvalid1() {
return "invalid";
}
Expand Down Expand Up @@ -124,4 +133,16 @@ private String getValid3() {

}

private String getValid4() {
return "<?xml version=\"1.0\" standalone=\"yes\"?>" +
"<event version=\"2.0\" type=\"b-t-f\" access=\"\" uid=\"1649717607000\" " +
"time=\"2022-04-11T22:53:27.000Z\" start=\"2022-04-11T22:53:27.000Z\" " +
"stale=\"2022-04-11T22:53:42.000Z\" how=\"m-c\" qos=\"1-r-c\">" +
"<point lat=\"0\" lon=\"0\" hae=\"0\" ce=\"9999999\" le=\"9999999\"/>" +
"<detail><test>&#x411;&#x456; &#x43D;&#x435; &#x43F;&#x43E;</test></detail></event>";

}



}
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

package com.atakmap.coremap.io;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import com.atakmap.android.androidtest.ATAKInstrumentedTest;
import com.atakmap.android.androidtest.util.FileUtils;
import com.atakmap.coremap.filesystem.FileSystemUtils;
Expand Down Expand Up @@ -28,13 +35,6 @@
import java.net.URI;
import java.nio.channels.FileChannel;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import androidx.test.ext.junit.runners.AndroidJUnit4;

/**
* Test class for IOProviderFactory
*/
Expand Down Expand Up @@ -425,7 +425,6 @@ private void writeFile(File f, String fileText) throws IOException {
public void register_test() throws IOException {
IOProvider fiop;
IOProviderFactory.registerProvider(fiop = createDummyProvider());
IOProviderFactory.unregisterProvider(fiop);
}

@Test
Expand All @@ -444,7 +443,6 @@ public void test_stream() throws IOException {
Assert.assertTrue(new File("/sdcard/encrypted/test.txt").exists());
Assert.assertTrue(IOProviderFactory.delete(f, 0));
} finally {
IOProviderFactory.unregisterProvider(provider);
}
}

Expand All @@ -463,7 +461,6 @@ public void test_writer() throws IOException {
Assert.assertTrue(new File("/sdcard/encrypted/test.txt").exists());
Assert.assertTrue(IOProviderFactory.delete(f, 0));
} finally {
IOProviderFactory.unregisterProvider(provider);
}
}

Expand Down Expand Up @@ -506,7 +503,6 @@ public void filenamesToFiles_multipleFiles() throws IOException {
FileSystemUtils.UTF8_CHARSET);
Assert.assertEquals(file2Text, result);
} finally {
IOProviderFactory.unregisterProvider(provider);
}
}

Expand Down Expand Up @@ -543,7 +539,6 @@ public void listFiles_FilterReturnsSome() throws IOException {
Assert.assertEquals("listFiles1.txt", files[0].getName());
Assert.assertEquals("listFiles4.txt", files[1].getName());
} finally {
IOProviderFactory.unregisterProvider(provider);
}
}

Expand All @@ -557,7 +552,6 @@ public ProviderRegistration(IOProvider provider) {

@Override
public void close() {
IOProviderFactory.unregisterProvider(provider);
}
}

Expand All @@ -576,7 +570,7 @@ public DatabaseIface createDatabase(DatabaseInformation info) {
return super.createDatabase(info);
}
};
IOProviderFactory.registerProvider(mock, true);
IOProviderFactory.registerProvider(mock);
try {
try (FileUtils.AutoDeleteFile f = FileUtils.AutoDeleteFile
.createTempFile()) {
Expand All @@ -586,7 +580,6 @@ public DatabaseIface createDatabase(DatabaseInformation info) {
assertFalse(createDatabaseInvoked[0]);
}
} finally {
IOProviderFactory.unregisterProvider(mock);
}
}

Expand All @@ -603,14 +596,13 @@ public DatabaseIface createDatabase(DatabaseInformation info) {
return super.createDatabase(info);
}
};
IOProviderFactory.registerProvider(mock, false);
IOProviderFactory.registerProvider(mock);
try {
final Pointer pointer = IOProviderFactory
.DatabaseProvider_create("/dev/null");
assertNull(pointer);
assertTrue(createDatabaseInvoked[0]);
} finally {
IOProviderFactory.unregisterProvider(mock);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@

package com.atakmap.map.gdal;

import static org.junit.Assert.assertTrue;

import android.content.Context;

import androidx.test.platform.app.InstrumentationRegistry;

import com.atakmap.android.androidtest.ATAKInstrumentedTest;
import com.atakmap.coremap.io.DefaultIOProvider;
import com.atakmap.coremap.io.IOProviderFactory;
Expand All @@ -13,10 +17,6 @@
import java.io.File;
import java.util.ArrayList;

import androidx.test.platform.app.InstrumentationRegistry;

import static org.junit.Assert.assertTrue;

public class VSIFileFileSystemHandlerTest extends ATAKInstrumentedTest {
@BeforeClass
public static void init() {
Expand Down Expand Up @@ -47,7 +47,6 @@ public void testRoundtripRelativePath() {

assertTrue(records.contains(expectedRecord));
} finally {
IOProviderFactory.unregisterProvider(dbgprovider);
}
}

Expand All @@ -71,7 +70,6 @@ public void testRoundtripAbsolutePath() {

assertTrue(records.contains(expectedRecord));
} finally {
IOProviderFactory.unregisterProvider(dbgprovider);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

package com.atakmap.map.gdal;

import static org.gdal.gdalconst.gdalconstConstants.GA_Update;
import static org.gdal.gdalconst.gdalconstConstants.GDT_Byte;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;

import android.content.Context;

import androidx.test.platform.app.InstrumentationRegistry;
Expand All @@ -12,10 +19,6 @@
import com.atakmap.coremap.io.MockProvider;
import com.atakmap.map.gdal.MockVSIJFileFileSystemHandler.ExceptionalHandlerController;

import static org.gdal.gdalconst.gdalconstConstants.GA_Update;
import static org.gdal.gdalconst.gdalconstConstants.GDT_Byte;
import static org.junit.Assert.*;

import org.gdal.gdal.Band;
import org.gdal.gdal.Dataset;
import org.gdal.gdal.Driver;
Expand Down Expand Up @@ -634,7 +637,6 @@ public void test_kml_custom_provider() throws IOException {
try {
test_kml_no_vsi();
} finally {
IOProviderFactory.unregisterProvider(provider);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

package com.atakmap.map.layer.feature;

import static org.junit.Assert.assertTrue;

import com.atakmap.android.androidtest.ATAKInstrumentedTest;
import com.atakmap.android.androidtest.util.FileUtils;
import com.atakmap.coremap.io.DatabaseInformation;
Expand All @@ -15,8 +17,6 @@
import java.io.File;
import java.io.IOException;

import static org.junit.Assert.assertTrue;

public class PersistentDataSourceFeatureDataStoreTest
extends ATAKInstrumentedTest {
@Test
Expand Down Expand Up @@ -44,7 +44,6 @@ public DatabaseIface createDatabase(DatabaseInformation info) {
fds.dispose();
}
} finally {
IOProviderFactory.unregisterProvider(provider);
}
}

Expand Down Expand Up @@ -80,7 +79,6 @@ public DatabaseIface createDatabase(DatabaseInformation info) {
fds.dispose();
}
} finally {
IOProviderFactory.unregisterProvider(provider);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

package com.atakmap.map.layer.raster.gdal;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

import android.content.Context;

import androidx.test.platform.app.InstrumentationRegistry;
Expand All @@ -13,8 +16,6 @@
import com.atakmap.map.layer.raster.DatasetDescriptor;
import com.atakmap.map.layer.raster.DatasetDescriptorSpiArgs;

import static org.junit.Assert.*;

import org.junit.BeforeClass;
import org.junit.Test;

Expand All @@ -32,7 +33,7 @@ public static void setup() {
GdalLibrary.init(gdalDataDir);

MockIOProvider mockIOProvider = new MockIOProvider();
IOProviderFactory.registerProvider(mockIOProvider, false);
IOProviderFactory.registerProvider(mockIOProvider);
}

@Test
Expand Down
Loading

0 comments on commit 0fe5233

Please sign in to comment.