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(){
|
private void terminateNonBlock(){
|
||||||
handler.removeCallbacks(throughputUpdateRunnable);
|
|
||||||
terminate = true;
|
terminate = true;
|
||||||
|
handler.removeCallbacks(throughputUpdateRunnable);
|
||||||
if(currentlyActive != null)
|
if(currentlyActive != null)
|
||||||
currentlyActive.terminate();
|
currentlyActive.terminate();
|
||||||
}
|
}
|
||||||
|
|
@ -196,8 +196,10 @@ public class UeControlExecutor implements Runnable{
|
||||||
}
|
}
|
||||||
if (throughputListener != null && uploadSpeed.isUpdated())
|
if (throughputListener != null && uploadSpeed.isUpdated())
|
||||||
throughputListener.throughputUpdate(downloadSpeed.getBitThroughput(), uploadSpeed.getBitThroughput());
|
throughputListener.throughputUpdate(downloadSpeed.getBitThroughput(), uploadSpeed.getBitThroughput());
|
||||||
|
|
||||||
// Rescedule this handler
|
// Rescedule this handler
|
||||||
handler.postDelayed(this, 100);
|
if(!terminate)
|
||||||
|
handler.postDelayed(this, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean setRealDataUsage(){
|
protected boolean setRealDataUsage(){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue