forked from upstream-mirrors/quik
Make less calls within loop
This commit is contained in:
@@ -1432,6 +1432,11 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa
|
|||||||
// QKSMS battery drain of 2015
|
// QKSMS battery drain of 2015
|
||||||
long time = System.currentTimeMillis();
|
long time = System.currentTimeMillis();
|
||||||
while (!mOpened) {
|
while (!mOpened) {
|
||||||
|
try {
|
||||||
|
Thread.sleep(100);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
if (System.currentTimeMillis() - time > 10000) {
|
if (System.currentTimeMillis() - time > 10000) {
|
||||||
Log.w(TAG, "Task running for over 10 seconds, something is wrong");
|
Log.w(TAG, "Task running for over 10 seconds, something is wrong");
|
||||||
cancel(true);
|
cancel(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user