Only post message if connection to child was lost

If the connection to the child was intentionally severed, do not
post a "disconnected" message, as the activity is likely closing.
This commit is contained in:
Branden Archer
2015-12-28 17:11:58 -05:00
parent 6dd26b70fe
commit 0d829708c7

View File

@@ -139,6 +139,9 @@ public class ListenActivity extends Activity
Log.e(TAG, "Failed to stream audio", e); Log.e(TAG, "Failed to stream audio", e);
} }
if(Thread.currentThread().isInterrupted() == false)
{
ListenActivity.this.runOnUiThread(new Runnable() ListenActivity.this.runOnUiThread(new Runnable()
{ {
@Override @Override
@@ -152,6 +155,7 @@ public class ListenActivity extends Activity
} }
}); });
} }
}
}); });
_listenThread.start(); _listenThread.start();