Skip to content

Commit

Permalink
Merge branch 'release/v0.0.8'
Browse files Browse the repository at this point in the history
Conflicts:
	library/build.gradle
	library/repository/jp/kshoji/ble-midi/maven-metadata.xml
	library/repository/jp/kshoji/ble-midi/maven-metadata.xml.md5
	library/repository/jp/kshoji/ble-midi/maven-metadata.xml.sha1
  • Loading branch information
kshoji committed Apr 30, 2015
2 parents c473c5f + 9c92df8 commit 31cae54
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 22 deletions.
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ group = 'jp.kshoji'
uploadArchives {
repositories.mavenDeployer {
repository url: 'file://' + file('repository').absolutePath
pom.version = '0.0.7'
pom.version = '0.0.8'
pom.artifactId = 'ble-midi'
}
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
048aa6a9f4a15b9db0a4575aba633cf5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6d2eed4880ae4600d9f610851132fc05c0cd2203
24 changes: 24 additions & 0 deletions library/repository/jp/kshoji/ble-midi/0.0.8/ble-midi-0.0.8.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>jp.kshoji</groupId>
<artifactId>ble-midi</artifactId>
<version>0.0.8</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>jp.kshoji</groupId>
<artifactId>javax-sound-midi</artifactId>
<version>0.0.2</version>
<type>aar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-annotations</artifactId>
<version>21.0.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d2d07ca790e6f470690454e028d640ff
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2f6c3bbd88badd8d3f4402d01c96c73fbbc57d79
3 changes: 2 additions & 1 deletion library/repository/jp/kshoji/ble-midi/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<version>0.0.6-SNAPSHOT</version>
<version>0.0.6</version>
<version>0.0.7</version>
<version>0.0.8</version>
</versions>
<lastUpdated>20150331030008</lastUpdated>
<lastUpdated>20150430030503</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
04d16e77c877fa8e88460604ba735e40
026f2e59aa250d3ab9a576185506d04c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4231f69f67134ee0ecf6411f76f79fc284fc373c
243689f724241aba812ecf9ca614adfe6d78f71c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ private void disconnectByDeviceAddress(@NonNull String deviceAddress) {
synchronized (midiInputDevicesMap) {
Set<MidiInputDevice> midiInputDevices = midiInputDevicesMap.get(deviceAddress);
if (midiInputDevices != null) {
midiInputDevicesMap.remove(deviceAddress);

for (MidiInputDevice midiInputDevice : midiInputDevices) {
midiInputDevice.setOnMidiInputEventListener(null);

Expand All @@ -291,20 +293,20 @@ private void disconnectByDeviceAddress(@NonNull String deviceAddress) {

}
midiInputDevices.clear();
midiInputDevicesMap.remove(deviceAddress);
}
}

synchronized (midiOutputDevicesMap) {
Set<MidiOutputDevice> midiOutputDevices = midiOutputDevicesMap.get(deviceAddress);
if (midiOutputDevices != null) {
midiOutputDevicesMap.remove(deviceAddress);

for (MidiOutputDevice midiOutputDevice : midiOutputDevices) {
if (midiDeviceDetachedListener != null) {
midiDeviceDetachedListener.onMidiOutputDeviceDetached(midiOutputDevice);
}
}
midiOutputDevices.clear();
midiOutputDevicesMap.remove(deviceAddress);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,23 +262,25 @@ private void disconnectByDeviceAddress(@NonNull String deviceAddress) {
synchronized (midiInputDevicesMap) {
MidiInputDevice midiInputDevice = midiInputDevicesMap.get(deviceAddress);
if (midiInputDevice != null) {
midiInputDevicesMap.remove(deviceAddress);

midiInputDevice.setOnMidiInputEventListener(null);

if (midiDeviceDetachedListener != null) {
midiDeviceDetachedListener.onMidiInputDeviceDetached(midiInputDevice);
}
}
midiInputDevicesMap.remove(deviceAddress);
}

synchronized (midiOutputDevicesMap) {
MidiOutputDevice midiOutputDevice = midiOutputDevicesMap.get(deviceAddress);
if (midiOutputDevice != null) {
midiOutputDevicesMap.remove(deviceAddress);

if (midiDeviceDetachedListener != null) {
midiDeviceDetachedListener.onMidiOutputDeviceDetached(midiOutputDevice);
}
}
midiOutputDevicesMap.remove(deviceAddress);
}
}

Expand Down Expand Up @@ -359,30 +361,33 @@ public void onReceive(Context context, Intent intent) {
break;

case BluetoothProfile.STATE_DISCONNECTED:
if (midiDeviceAttachedListener != null) {
String deviceAddress = device.getAddress();

String deviceAddress = device.getAddress();
synchronized (midiInputDevicesMap) {
MidiInputDevice midiInputDevice = midiInputDevicesMap.get(deviceAddress);
if (midiInputDevice != null) {
midiInputDevicesMap.remove(deviceAddress);

synchronized (midiInputDevicesMap) {
MidiInputDevice midiInputDevice = midiInputDevicesMap.get(deviceAddress);
if (midiInputDevice != null) {
midiInputDevice.setOnMidiInputEventListener(null);
midiInputDevice.setOnMidiInputEventListener(null);
if (midiDeviceDetachedListener != null) {
midiDeviceDetachedListener.onMidiInputDeviceDetached(midiInputDevice);
midiInputDevicesMap.remove(deviceAddress);
}
}
}

synchronized (midiOutputDevicesMap) {
MidiOutputDevice midiOutputDevice = midiOutputDevicesMap.get(deviceAddress);
if (midiOutputDevice != null) {
synchronized (midiOutputDevicesMap) {
MidiOutputDevice midiOutputDevice = midiOutputDevicesMap.get(deviceAddress);
if (midiOutputDevice != null) {
midiOutputDevicesMap.remove(deviceAddress);

if (midiDeviceDetachedListener != null) {
midiDeviceDetachedListener.onMidiOutputDeviceDetached(midiOutputDevice);
midiOutputDevicesMap.remove(deviceAddress);
}
}
}

synchronized (bluetoothDevicesMap) {
bluetoothDevicesMap.remove(deviceAddress);
}
synchronized (bluetoothDevicesMap) {
bluetoothDevicesMap.remove(deviceAddress);
}
break;
}
Expand Down

0 comments on commit 31cae54

Please sign in to comment.