fixed a bug when watch is not connected to a phone, we closed the datastream even its wasn openend
This commit is contained in:
@@ -152,12 +152,15 @@ public class SensorDataFileStreamer implements Runnable{
|
||||
}
|
||||
|
||||
public void close(){
|
||||
try {
|
||||
mRunning = false;
|
||||
mOutputStream.close();
|
||||
mOutputStreamOpened = false;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
if(mChannelOpenend && mNode != null){
|
||||
try {
|
||||
mRunning = false;
|
||||
mOutputStream.close();
|
||||
mOutputStreamOpened = false;
|
||||
} catch (IOException e) {
|
||||
//e.printStackTrace();
|
||||
Log.d(TAG, "Closing the outputstream failed!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user