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(){
|
public void close(){
|
||||||
try {
|
if(mChannelOpenend && mNode != null){
|
||||||
mRunning = false;
|
try {
|
||||||
mOutputStream.close();
|
mRunning = false;
|
||||||
mOutputStreamOpened = false;
|
mOutputStream.close();
|
||||||
} catch (IOException e) {
|
mOutputStreamOpened = false;
|
||||||
e.printStackTrace();
|
} catch (IOException e) {
|
||||||
|
//e.printStackTrace();
|
||||||
|
Log.d(TAG, "Closing the outputstream failed!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user