mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-17 15:32:48 +00:00
faster recovery from slow input connection
This commit is contained in:
parent
cbb1798dc1
commit
935dd77cf1
1 changed files with 4 additions and 0 deletions
|
@ -468,6 +468,10 @@ public final class RichInputConnection implements PrivateCommandPerformer {
|
||||||
Log.w(TAG, "Slow InputConnection: " + operationName + " took " + duration + " ms.");
|
Log.w(TAG, "Slow InputConnection: " + operationName + " took " + duration + " ms.");
|
||||||
StatsUtils.onInputConnectionLaggy(operation, duration);
|
StatsUtils.onInputConnectionLaggy(operation, duration);
|
||||||
mLastSlowInputConnectionTime = SystemClock.uptimeMillis();
|
mLastSlowInputConnectionTime = SystemClock.uptimeMillis();
|
||||||
|
} else if (duration < timeout / 5 && hasSlowInputConnection()) {
|
||||||
|
// we have a fast connection now, maybe the slowness was just a hickup
|
||||||
|
mLastSlowInputConnectionTime -= SLOW_INPUTCONNECTION_PERSIST_MS / 2;
|
||||||
|
Log.d(TAG, "InputConnection: much faster now, reducing persist time");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue