Skip to content

Commit a319d65

Browse files
jsharkeyAndroid (Google) Code Review
authored andcommitted
Merge "Avoid runtime restart after vold reconnects." into jb-mr1.1-dev
2 parents 445767c + 0be607c commit a319d65

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

services/java/com/android/server/MountService.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ class VoldResponseCode {
198198
// Used as a lock for methods that register/unregister listeners.
199199
final private ArrayList<MountServiceBinderListener> mListeners =
200200
new ArrayList<MountServiceBinderListener>();
201-
private CountDownLatch mConnectedSignal = new CountDownLatch(1);
202-
private CountDownLatch mAsecsScanned = new CountDownLatch(1);
201+
private final CountDownLatch mConnectedSignal = new CountDownLatch(1);
202+
private final CountDownLatch mAsecsScanned = new CountDownLatch(1);
203203
private boolean mSendUmsConnectedOnBoot = false;
204204

205205
/**
@@ -495,10 +495,6 @@ private void waitForReady() {
495495
}
496496

497497
private void waitForLatch(CountDownLatch latch) {
498-
if (latch == null) {
499-
return;
500-
}
501-
502498
for (;;) {
503499
try {
504500
if (latch.await(5000, TimeUnit.MILLISECONDS)) {
@@ -738,14 +734,12 @@ public void run() {
738734
* the hounds!
739735
*/
740736
mConnectedSignal.countDown();
741-
mConnectedSignal = null;
742737

743738
// Let package manager load internal ASECs.
744739
mPms.scanAvailableAsecs();
745740

746741
// Notify people waiting for ASECs to be scanned that it's done.
747742
mAsecsScanned.countDown();
748-
mAsecsScanned = null;
749743
}
750744
}.start();
751745
}

0 commit comments

Comments
 (0)