Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dingjikerbo committed Apr 19, 2017
1 parent a2639e7 commit 5ac2fc5
Show file tree
Hide file tree
Showing 54 changed files with 20 additions and 1,139 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Expand Up @@ -6,7 +6,7 @@ android {

defaultConfig {
applicationId "com.inuker.bluetooth"
minSdkVersion 18
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
Expand All @@ -29,6 +29,6 @@ dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
// compile 'com.inuker.bluetooth:library:1.3.8'
// compile 'com.inuker.bluetooth:library:1.3.8'
compile project(path: ':library')
}
18 changes: 16 additions & 2 deletions app/src/main/java/com/inuker/bluetooth/DeviceDetailActivity.java
Expand Up @@ -17,6 +17,9 @@
import com.inuker.bluetooth.library.search.SearchResult;
import com.inuker.bluetooth.library.utils.BluetoothLog;
import com.inuker.bluetooth.library.utils.BluetoothUtils;
import com.xiaomi.smarthome.mibtservice.library.channel.Channel;
import com.xiaomi.smarthome.mibtservice.library.channel.ChannelCallback;

import static com.inuker.bluetooth.library.Constants.*;

import java.util.UUID;
Expand Down Expand Up @@ -119,12 +122,23 @@ public void onResponse(int code, BleGattProfile profile) {
if (code == REQUEST_SUCCESS) {
mAdapter.setGattProfile(profile);
}

SecureConnector.processStep1(mDevice);
}
});
}

private class MyChannel extends Channel {

@Override
public void write(byte[] bytes, ChannelCallback channelCallback) {

}

@Override
public void onRecv(byte[] bytes) {

}
}

private void connectDeviceIfNeeded() {
if (!mConnected) {
connectDevice();
Expand Down
Expand Up @@ -91,9 +91,9 @@ public class BluetoothClientImpl implements IBluetoothClient, ProxyInterceptor,

private Context mContext;

private IBluetoothService mBluetoothService;
private volatile IBluetoothService mBluetoothService;

private static IBluetoothClient sInstance;
private volatile static IBluetoothClient sInstance;

private CountDownLatch mCountDownLatch;

Expand Down
4 changes: 0 additions & 4 deletions settings.gradle
@@ -1,5 +1 @@
<<<<<<< Updated upstream
include ':app', ':library', ':wave', ':test', ':testgattserver', ':testj'
=======
include ':app', ':library'
>>>>>>> Stashed changes
1 change: 0 additions & 1 deletion test/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions test/build.gradle

This file was deleted.

142 changes: 0 additions & 142 deletions test/src/main/java/com/example/MyClass.java

This file was deleted.

1 change: 0 additions & 1 deletion testgattserver/.gitignore

This file was deleted.

30 changes: 0 additions & 30 deletions testgattserver/build.gradle

This file was deleted.

17 changes: 0 additions & 17 deletions testgattserver/proguard-rules.pro

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions testgattserver/src/main/AndroidManifest.xml

This file was deleted.

0 comments on commit 5ac2fc5

Please sign in to comment.