Update DfuBaseService.java
Add one second delay to avoid the traffic jam before the DFU mode is enabled
This commit is contained in:
parent
7d8b6a761d
commit
f8c01ee2d7
|
@ -804,6 +804,15 @@ public abstract class DfuBaseService extends IntentService {
|
||||||
mError = ERROR_CONNECTION_MASK | status;
|
mError = ERROR_CONNECTION_MASK | status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add one second delay to avoid the traffic jam before the DFU mode is enabled
|
||||||
|
synchronized (this) {
|
||||||
|
try {
|
||||||
|
wait(1000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Notify waiting thread
|
// Notify waiting thread
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
mLock.notifyAll();
|
mLock.notifyAll();
|
||||||
|
|
Loading…
Reference in New Issue