Lines Matching defs:path

188     /** Map from path to {@link StorageVolume} */
191 /** Map from path to state */
340 final String path;
345 UnmountCallBack(String path, boolean force, boolean removeEncryption) {
347 this.path = path;
353 if (DEBUG_UNMOUNT) Slog.i(TAG, "Unmounting " + path);
354 doUnmountVolume(path, true, removeEncryption);
361 UmsEnableCallBack(String path, String method, boolean force) {
362 super(path, force, false);
369 doShareUnshareVolume(path, method, true);
375 ShutdownCallBack(String path, IMountShutdownObserver observer) {
376 super(path, true, false);
382 int ret = doUnmountVolume(path, true, removeEncryption);
429 String path = ucb.path;
434 int pids[] = getStorageUsers(path);
441 pids = getStorageUsers(path);
523 final String path = entry.getKey();
527 int rc = doMountVolume(path);
537 notifyVolumeStateChange(null, path, VolumeState.NoMedia,
616 private void doShareUnshareVolume(String path, String method, boolean enable) {
623 mConnector.execute("volume", enable ? "share" : "unshare", path, method);
630 final String path = volume.getPath();
633 oldState = mVolumeStates.put(path, state);
638 state, state, path));
642 Slog.d(TAG, "volume state changed for " + path + " (" + oldState + " -> " + state + ")");
656 OBB_FLUSH_MOUNT_STATE, path));
666 bl.mListener.onStorageStateChanged(path, oldState, state);
698 String path = tok[1];
703 volume = mVolumesByPath.get(path);
768 * Format: "NNN Volume <label> <path> state changed
782 final String path = cooked[3];
798 volume = mVolumesByPath.get(path);
799 state = mVolumeStates.get(path);
808 if ((rc = doMountVolume(path)) != StorageResultCode.OperationSucceeded) {
820 if (getVolumeState(path).equals(Environment.MEDIA_BAD_REMOVAL)) {
854 private void notifyVolumeStateChange(String label, String path, int oldState, int newState) {
858 volume = mVolumesByPath.get(path);
859 state = getVolumeState(path);
921 private int doMountVolume(String path) {
926 volume = mVolumesByPath.get(path);
929 if (DEBUG_EVENTS) Slog.i(TAG, "doMountVolume: Mouting " + path);
931 mConnector.execute("volume", "mount", path);
985 private int doUnmountVolume(String path, boolean force, boolean removeEncryption) {
986 if (!getVolumeState(path).equals(Environment.MEDIA_MOUNTED)) {
1001 final Command cmd = new Command("volume", "unmount", path);
1027 private int doFormatVolume(String path) {
1029 mConnector.execute("volume", "format", path);
1043 private boolean doGetVolumeShared(String path, String method) {
1046 event = mConnector.execute("volume", "shared", path, method);
1048 Slog.e(TAG, "Failed to read response to volume shared " + path + " " + method);
1084 final String path = primary.getPath();
1094 doShareUnshareVolume(path, "ums", false);
1095 if ((rc = doMountVolume(path)) != StorageResultCode.OperationSucceeded) {
1098 path, rc));
1153 String path = a.getString(
1173 Slog.d(TAG, "got storage path: " + path + " description: " + description +
1191 if (path == null || description == null) {
1192 Slog.e(TAG, "Missing storage path or description in readStorageList");
1194 final StorageVolume volume = new StorageVolume(new File(path),
1231 final File path = userEnv.getExternalStorageDirectory();
1232 final StorageVolume volume = StorageVolume.fromTemplate(mEmulatedTemplate, path, user);
1361 for (String path : mVolumeStates.keySet()) {
1362 String state = mVolumeStates.get(path);
1396 ShutdownCallBack ucb = new ShutdownCallBack(path, observer);
1449 String path = primary.getPath();
1450 String vs = getVolumeState(path);
1455 UmsEnableCallBack umscb = new UmsEnableCallBack(path, method, true);
1464 doShareUnshareVolume(path, method, enable);
1465 if (doMountVolume(path) != StorageResultCode.OperationSucceeded) {
1466 Slog.e(TAG, "Failed to remount " + path +
1512 public int mountVolume(String path) {
1516 return doMountVolume(path);
1519 public void unmountVolume(String path, boolean force, boolean removeEncryption) {
1523 String volState = getVolumeState(path);
1525 Slog.i(TAG, "Unmounting " + path
1537 UnmountCallBack ucb = new UnmountCallBack(path, force, removeEncryption);
1541 public int formatVolume(String path) {
1545 return doFormatVolume(path);
1548 public int[] getStorageUsers(String path) {
1553 mConnector.executeForList("storage", "users", path),
1812 event = mConnector.execute("asec", "path", id);
1887 event = mConnector.execute("obb", "path", state.voldPath);
2261 final String path = (String) msg.obj;
2264 Slog.i(TAG, "Flushing all OBB state for path " + path);
2274 * If this entry's source file is in the volume path
2278 if (state.canonicalPath.startsWith(path)) {
2579 String path = canonicalPath.toString();
2590 if (path.startsWith(externalPath)) {
2591 path = path.substring(externalPath.length() + 1);
2592 } else if (path.startsWith(legacyExternalPath)) {
2593 path = path.substring(legacyExternalPath.length() + 1);
2600 if (path.startsWith(obbPath)) {
2601 path = path.substring(obbPath.length() + 1);
2604 return new File(Environment.getEmulatedStorageObbSource(), path).toString();
2607 return new File(ownerEnv.getExternalStorageObbDirectory(), path).toString();
2613 return new File(Environment.getEmulatedStorageSource(userId), path).toString();
2615 return new File(userEnv.getExternalStorageDirectory(), path).toString();