Fixed potential bug where throughput reporting would not stop
This commit is contained in:
parent
6417ef0c22
commit
d932716742
1 changed files with 4 additions and 2 deletions
|
|
@ -87,8 +87,8 @@ public class UeControlExecutor implements Runnable{
|
|||
}
|
||||
|
||||
private void terminateNonBlock(){
|
||||
handler.removeCallbacks(throughputUpdateRunnable);
|
||||
terminate = true;
|
||||
handler.removeCallbacks(throughputUpdateRunnable);
|
||||
if(currentlyActive != null)
|
||||
currentlyActive.terminate();
|
||||
}
|
||||
|
|
@ -196,8 +196,10 @@ public class UeControlExecutor implements Runnable{
|
|||
}
|
||||
if (throughputListener != null && uploadSpeed.isUpdated())
|
||||
throughputListener.throughputUpdate(downloadSpeed.getBitThroughput(), uploadSpeed.getBitThroughput());
|
||||
|
||||
// Rescedule this handler
|
||||
handler.postDelayed(this, 100);
|
||||
if(!terminate)
|
||||
handler.postDelayed(this, 100);
|
||||
}
|
||||
|
||||
protected boolean setRealDataUsage(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue