summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/MountService.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/java/com/android/server/MountService.java')
-rw-r--r--services/java/com/android/server/MountService.java26
1 files changed, 11 insertions, 15 deletions
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index c512bc1..2e0c977 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -57,6 +57,8 @@ import android.util.AttributeSet;
import android.util.Slog;
import android.util.Xml;
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.IMediaContainerService;
import com.android.internal.util.Preconditions;
import com.android.internal.util.XmlUtils;
@@ -103,9 +105,9 @@ class MountService extends IMountService.Stub
// TODO: listen for user creation/deletion
- private static final boolean LOCAL_LOGD = true;
- private static final boolean DEBUG_UNMOUNT = true;
- private static final boolean DEBUG_EVENTS = true;
+ private static final boolean LOCAL_LOGD = false;
+ private static final boolean DEBUG_UNMOUNT = false;
+ private static final boolean DEBUG_EVENTS = false;
private static final boolean DEBUG_OBB = false;
// Disable this since it messes up long-running cryptfs operations.
@@ -181,13 +183,13 @@ class MountService extends IMountService.Stub
/** When defined, base template for user-specific {@link StorageVolume}. */
private StorageVolume mEmulatedTemplate;
- // @GuardedBy("mVolumesLock")
+ @GuardedBy("mVolumesLock")
private final ArrayList<StorageVolume> mVolumes = Lists.newArrayList();
/** Map from path to {@link StorageVolume} */
- // @GuardedBy("mVolumesLock")
+ @GuardedBy("mVolumesLock")
private final HashMap<String, StorageVolume> mVolumesByPath = Maps.newHashMap();
/** Map from path to state */
- // @GuardedBy("mVolumesLock")
+ @GuardedBy("mVolumesLock")
private final HashMap<String, String> mVolumeStates = Maps.newHashMap();
private volatile boolean mSystemReady = false;
@@ -198,8 +200,8 @@ class MountService extends IMountService.Stub
// Used as a lock for methods that register/unregister listeners.
final private ArrayList<MountServiceBinderListener> mListeners =
new ArrayList<MountServiceBinderListener>();
- private CountDownLatch mConnectedSignal = new CountDownLatch(1);
- private CountDownLatch mAsecsScanned = new CountDownLatch(1);
+ private final CountDownLatch mConnectedSignal = new CountDownLatch(1);
+ private final CountDownLatch mAsecsScanned = new CountDownLatch(1);
private boolean mSendUmsConnectedOnBoot = false;
/**
@@ -495,10 +497,6 @@ class MountService extends IMountService.Stub
}
private void waitForLatch(CountDownLatch latch) {
- if (latch == null) {
- return;
- }
-
for (;;) {
try {
if (latch.await(5000, TimeUnit.MILLISECONDS)) {
@@ -738,14 +736,12 @@ class MountService extends IMountService.Stub
* the hounds!
*/
mConnectedSignal.countDown();
- mConnectedSignal = null;
// Let package manager load internal ASECs.
mPms.scanAvailableAsecs();
// Notify people waiting for ASECs to be scanned that it's done.
mAsecsScanned.countDown();
- mAsecsScanned = null;
}
}.start();
}
@@ -2571,7 +2567,7 @@ class MountService extends IMountService.Stub
}
}
- // @VisibleForTesting
+ @VisibleForTesting
public static String buildObbPath(final String canonicalPath, int userId, boolean forVold) {
// TODO: allow caller to provide Environment for full testing