Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datagramSocket.disconnect() Deadlock #93

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
81a95f8
out of memotu fix
dmayboroda Oct 26, 2015
5b89c17
Merge pull request #80 from dmayboroda/outofmemory
iadnan Oct 26, 2015
0cf0c6c
Switched to robolectric 3.0
dmayboroda Oct 31, 2015
7f65c9e
Merge pull request #81 from dmayboroda/issue#298
iadnan Nov 3, 2015
426e051
robolectric tests fixed
dmayboroda Nov 16, 2015
4317ec0
Merge pull request #84 from dmayboroda/issue#298
iadnan Nov 16, 2015
54bfc37
fixed network on main thread exception
dmayboroda Dec 8, 2015
48b90f7
ZeroConf filter nullpointer fix
dmayboroda Dec 8, 2015
243f213
Merge pull request #86 from dmayboroda/issue#330
iadnan Dec 8, 2015
64f92a9
Merge pull request #87 from dmayboroda/issue#324
iadnan Dec 8, 2015
98d3753
Fix for RejectedExecutionException on SSDPDiscoveryProvider
dmayboroda Dec 9, 2015
3bd9bcd
Merge pull request #88 from dmayboroda/issue##331
iadnan Dec 9, 2015
edc686a
call to datagramSocket.disconnect() results in deadlock with receive …
sprehn Mar 14, 2016
6f5a71b
Merge branch 'dev' of https://github.com/ConnectSDK/Connect-SDK-Andro…
sprehn Oct 25, 2016
e2e7cb9
synchronized all changes in openhab plugin to this repository
sprehn Oct 29, 2016
db52d76
added fake antroid classes and converted project to maven
sprehn Oct 29, 2016
b9dee14
updated eclipse project according to mvn configuration
sprehn Oct 29, 2016
d7d04fe
actually include src in build
sprehn Oct 29, 2016
1ac150c
further anrdroid cleanup
sprehn Nov 13, 2016
4908579
removed more android dependencies
sprehn Nov 16, 2016
4a7b9a3
removed applicationinfo packageinfo and packagemanager
sprehn Dec 8, 2016
6ae3bea
removed base64 dependency
sprehn Dec 8, 2016
dd7f2cb
removed environment dependency
sprehn Dec 8, 2016
e71f66d
removed drawable dependency
sprehn Dec 8, 2016
128a0f2
removed drawable dependency
sprehn Dec 8, 2016
56dee1f
removed comments
sprehn Dec 8, 2016
18ff5aa
removed dependency to environment
sprehn Dec 8, 2016
562fc29
removed display dependency
sprehn Dec 8, 2016
db47280
removed sparsearray dependency
sprehn Dec 8, 2016
09f410c
removed sparsearray dependency
sprehn Dec 8, 2016
56bbb40
removed dependencies to context bitmap bitmapfactory xml. context now…
sprehn Dec 8, 2016
60d5c75
removed dependency to html and spanned
sprehn Dec 8, 2016
5178173
removed dependency to html and spanned
sprehn Dec 8, 2016
c4f7e81
moved log to core
sprehn Dec 8, 2016
2f2eb51
moved nonull to core
sprehn Dec 8, 2016
f2c64d3
moved PointF to core
sprehn Dec 8, 2016
19cd60a
fixed javadoc
sprehn Feb 22, 2017
77b5180
site deployment to github added
sprehn Feb 22, 2017
c3fd539
repo renamed
sprehn Feb 22, 2017
7f46f72
link to project page added, setup instructions removed
sprehn Feb 22, 2017
e6a9ab0
site reporting section
sprehn Feb 22, 2017
53e931a
findbugs analyis - many high and medium findings removed
sprehn Feb 23, 2017
47956d2
removed all high findings
sprehn Feb 24, 2017
fa83ae0
removed all high findings
sprehn Feb 24, 2017
e8d60f5
fixed bug in ssdp parsing
sprehn Feb 25, 2017
f368b63
small simplifications
sprehn Feb 25, 2017
58823f6
1.0 release
sprehn Apr 12, 2017
370fd0d
next snapshot for 1.1
sprehn Apr 12, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ local.properties
.buildpath
*.DS_Store
bin/jarlist.cache
test/test-reports/
test/test-reports/
/target/
16 changes: 3 additions & 13 deletions .project
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Connect-SDK-Android-Core</name>
<name>Connect-SDK-Java-Core</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
13 changes: 0 additions & 13 deletions AndroidManifest.xml

This file was deleted.

8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#Connect SDK Core (Android)
#Connect SDK Core

This is a fork from the Android version of Connect SDK. In this version all dependencies to android are removed.

The Connect SDK Core contains all of the core classes required for basic operation of Connect SDK. The core also includes support for some select protocols which do not have any heavy and/or external dependencies. These protocols include:
- Apple TV
- DIAL
Expand All @@ -10,8 +13,7 @@ The Connect SDK Core contains all of the core classes required for basic operati
##General Information
For more information about Connect SDK, visit the [main repository](https://github.com/ConnectSDK/Connect-SDK-Android).

##Setup
Unless you are doing very specialized work to extend the SDK, you should not need to make direct use of this repository. Instead, clone the [main repository](https://github.com/ConnectSDK/Connect-SDK-Android), which includes this repository as a submodule.
For details on this fork, visit the [project page](http://sprehn.github.io/Connect-SDK-Java-Core/).

##License
Copyright (c) 2013-2015 LG Electronics.
Expand Down
Binary file removed libs/java-websocket-patch.jar
Binary file not shown.
Binary file removed libs/javax.jmdns_3.4.1-patch2.jar
Binary file not shown.
114 changes: 114 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Connect-SDK-Java-Core</groupId>
<artifactId>Connect-SDK-Java-Core</artifactId>
<version>1.1-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<!-- required for java-websocket 1.3.1 -->
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
</repositories>

<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<configuration>
<skipDeploy>true</skipDeploy>
</configuration>
</plugin>
<plugin>
<!-- Deploy the web site -->
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<executions>
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>site-deploy</phase>
<configuration>
<server>github</server>
<message>site built</message>
<path>${site.path}</path>
<merge>true</merge>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.4</version>
<configuration>
<effort>Max</effort>
<!--threshold>Low</threshold-->
</configuration>
</plugin>
</plugins>
</reporting>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>
<dependency>
<groupId>javax.jmdns</groupId>
<artifactId>jmdns</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>org.java-websocket</groupId>
<artifactId>java-websocket</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.xpp3</artifactId>
<version>1.1.4c_7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
</dependencies>
<scm>
<url>https://github.com/sprehn/Connect-SDK-Java-Core</url>
<connection>scm:git:https://github.com/sprehn/Connect-SDK-Java-Core.git</connection>
</scm>
</project>
16 changes: 0 additions & 16 deletions project.properties

This file was deleted.

Binary file removed res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed res/drawable-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed res/drawable-xhdpi/ic_launcher.png
Binary file not shown.
11 changes: 0 additions & 11 deletions res/values-v11/styles.xml

This file was deleted.

12 changes: 0 additions & 12 deletions res/values-v14/styles.xml

This file was deleted.

5 changes: 0 additions & 5 deletions res/values/strings.xml

This file was deleted.

20 changes: 0 additions & 20 deletions res/values/styles.xml

This file was deleted.

45 changes: 29 additions & 16 deletions src/com/connectsdk/core/AppInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public AppInfo(String id) {
* Gets the ID of the app on the first screen device. Format is different
* depending on the platform. (ex. youtube.leanback.v4, 0000001134, netflix,
* etc).
* @return ID of the app on the first screen device
*/
public String getId() {
return id;
Expand All @@ -66,6 +67,7 @@ public String getId() {
* Sets the ID of the app on the first screen device. Format is different
* depending on the platform. (ex. youtube.leanback.v4, 0000001134, netflix,
* etc).
* @param id ID of the app on the first screen device
*/
public void setId(String id) {
this.id = id;
Expand All @@ -74,6 +76,7 @@ public void setId(String id) {
/**
* Gets the user-friendly name of the app (ex. YouTube, Browser, Netflix,
* etc).
* @return user-friendly name of the app
*/
public String getName() {
return name;
Expand All @@ -82,17 +85,18 @@ public String getName() {
/**
* Sets the user-friendly name of the app (ex. YouTube, Browser, Netflix,
* etc).
* @param name user-friendly name of the app
*/
public void setName(String name) {
this.name = name.trim();
}

/** Gets the raw data from the first screen device about the app. */
/** @return the raw data from the first screen device about the app. */
public JSONObject getRawData() {
return raw;
}

/** Sets the raw data from the first screen device about the app. */
/** @param data the raw data from the first screen device about the app. */
public void setRawData(JSONObject data) {
raw = data;
}
Expand All @@ -110,20 +114,29 @@ public JSONObject toJSONObject() throws JSONException {

// @endcond

/**
* Compares two AppInfo objects.
*
* @param o
* Other AppInfo object to compare.
*
* @return true if both AppInfo id values are equal
*/
@Override
public boolean equals(Object o) {
if (o instanceof AppInfo) {
AppInfo ai = (AppInfo) o;
return this.id.equals(ai.id);
}
return super.equals(o);
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}

@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
AppInfo other = (AppInfo) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}

}
Loading