Commit 2250d56a authored by Sudheer Shanka's avatar Sudheer Shanka

Rename MountService to StorageManagerService.

Bug: 30977067
Test: Existing tests pass
Change-Id: Ieac0f11c2b249dcd60441b14c1f391e6f8131d42
parent 3bfef018
......@@ -245,9 +245,9 @@ LOCAL_SRC_FILES += \
core/java/android/os/IUpdateLock.aidl \
core/java/android/os/IUserManager.aidl \
core/java/android/os/IVibratorService.aidl \
core/java/android/os/storage/IMountService.aidl \
core/java/android/os/storage/IMountServiceListener.aidl \
core/java/android/os/storage/IMountShutdownObserver.aidl \
core/java/android/os/storage/IStorageManager.aidl \
core/java/android/os/storage/IStorageEventListener.aidl \
core/java/android/os/storage/IStorageShutdownObserver.aidl \
core/java/android/os/storage/IObbActionListener.aidl \
core/java/android/security/IKeystoreService.aidl \
core/java/android/security/keymaster/IKeyAttestationApplicationIdProvider.aidl \
......
......@@ -241,6 +241,7 @@ $(call add-clean-step, rm -f $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framewo
$(call add-clean-step, rm -f $(OUT_DIR)/target/common/obj/APPS/FeatureSplit1_intermediates/src/com/android/test/split/feature/R.java)
$(call add-clean-step, rm -f $(OUT_DIR)/target/common/obj/APPS/FeatureSplit2_intermediates/src/com/android/test/split/feature/R.java)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/hardware)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/core/java/android/os/storage/*)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
......
......@@ -20,7 +20,7 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.storage.DiskInfo;
import android.os.storage.IMountService;
import android.os.storage.IStorageManager;
import android.os.storage.StorageManager;
import android.os.storage.VolumeInfo;
import android.util.Log;
......@@ -28,7 +28,7 @@ import android.util.Log;
public final class Sm {
private static final String TAG = "Sm";
IMountService mSm;
IStorageManager mSm;
private String[] mArgs;
private int mNextArg;
......@@ -55,7 +55,7 @@ public final class Sm {
throw new IllegalArgumentException();
}
mSm = IMountService.Stub.asInterface(ServiceManager.getService("mount"));
mSm = IStorageManager.Stub.asInterface(ServiceManager.getService("mount"));
if (mSm == null) {
throw new RemoteException("Failed to find running mount service");
}
......
......@@ -3223,17 +3223,17 @@ android.os.health.HealthStatsParceler
android.os.health.SystemHealthManager
android.os.storage.DiskInfo
android.os.storage.DiskInfo$1
android.os.storage.IMountService
android.os.storage.IMountService$Stub
android.os.storage.IMountService$Stub$Proxy
android.os.storage.IMountServiceListener
android.os.storage.IMountServiceListener$Stub
android.os.storage.IMountServiceListener$Stub$Proxy
android.os.storage.IMountShutdownObserver
android.os.storage.IStorageManager
android.os.storage.IStorageManager$Stub
android.os.storage.IStorageManager$Stub$Proxy
android.os.storage.IStorageEventListener
android.os.storage.IStorageEventListener$Stub
android.os.storage.IStorageEventListener$Stub$Proxy
android.os.storage.IStorageShutdownObserver
android.os.storage.IObbActionListener
android.os.storage.IObbActionListener$Stub
android.os.storage.MountServiceInternal
android.os.storage.MountServiceInternal$ExternalStorageMountPolicy
android.os.storage.StorageManagerInternal
android.os.storage.StorageManagerInternal$ExternalStorageMountPolicy
android.os.storage.StorageEventListener
android.os.storage.StorageManager
android.os.storage.StorageManager$ObbActionListener
......
......@@ -61,7 +61,7 @@ import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
import android.os.storage.IMountService;
import android.os.storage.IStorageManager;
import android.system.ErrnoException;
import android.system.Os;
import android.system.OsConstants;
......@@ -2213,10 +2213,11 @@ class ContextImpl extends Context {
if (!dir.exists()) {
// Failing to mkdir() may be okay, since we might not have
// enough permissions; ask vold to create on our behalf.
final IMountService mount = IMountService.Stub.asInterface(
final IStorageManager storageManager = IStorageManager.Stub.asInterface(
ServiceManager.getService("mount"));
try {
final int res = mount.mkdirs(getPackageName(), dir.getAbsolutePath());
final int res = storageManager.mkdirs(
getPackageName(), dir.getAbsolutePath());
if (res != 0) {
Log.w(TAG, "Failed to ensure " + dir + ": " + res);
dir = null;
......
......@@ -492,7 +492,7 @@ interface IPackageManager {
/**
* Update status of external media on the package manager to scan and
* install packages installed on the external media. Like say the
* MountService uses this to call into the package manager to update
* StorageManagerService uses this to call into the package manager to update
* status of sdcard.
*/
void updateExternalMediaStatus(boolean mounted, boolean reportStatus);
......
......@@ -17,7 +17,7 @@
package android.os.storage;
/**
* Callback class for receiving events from MountService about Opaque Binary
* Callback class for receiving events from StorageManagerService about Opaque Binary
* Blobs (OBBs).
*
* Don't change the existing transaction Ids as they could be used in the native code.
......
......@@ -21,15 +21,15 @@ import android.os.storage.VolumeInfo;
import android.os.storage.VolumeRecord;
/**
* Callback class for receiving events from MountService.
* Callback class for receiving events from StorageManagerService.
*
* Don't change the existing transaction Ids as they could be used in the native code.
* When adding a new method, assign the next available transaction id.
*
* @hide - Applications should use IStorageEventListener for storage event
* callbacks.
* @hide - Applications should use {@link android.os.storage.StorageEventListener} class for
* storage event callbacks.
*/
oneway interface IMountServiceListener {
oneway interface IStorageEventListener {
/**
* Detection state of USB Mass Storage has changed
*
......
......@@ -19,8 +19,8 @@ package android.os.storage;
import android.content.pm.IPackageMoveObserver;
import android.os.ParcelFileDescriptor;
import android.os.storage.DiskInfo;
import android.os.storage.IMountServiceListener;
import android.os.storage.IMountShutdownObserver;
import android.os.storage.IStorageEventListener;
import android.os.storage.IStorageShutdownObserver;
import android.os.storage.IObbActionListener;
import android.os.storage.StorageVolume;
import android.os.storage.VolumeInfo;
......@@ -34,15 +34,15 @@ import android.os.storage.VolumeRecord;
* @hide - Applications should use android.os.storage.StorageManager to access
* storage functions.
*/
interface IMountService {
interface IStorageManager {
/**
* Registers an IMountServiceListener for receiving async notifications.
* Registers an IStorageEventListener for receiving async notifications.
*/
void registerListener(IMountServiceListener listener) = 0;
void registerListener(IStorageEventListener listener) = 0;
/**
* Unregisters an IMountServiceListener
* Unregisters an IStorageEventListener
*/
void unregisterListener(IMountServiceListener listener) = 1;
void unregisterListener(IStorageEventListener listener) = 1;
/**
* Returns true if a USB mass storage host is connected
*/
......@@ -58,7 +58,7 @@ interface IMountService {
boolean isUsbMassStorageEnabled() = 4;
/**
* Mount external storage at given mount point. Returns an int consistent
* with MountServiceResultCode
* with StorageResultCode
*/
int mountVolume(in String mountPoint) = 5;
/**
......@@ -74,7 +74,7 @@ interface IMountService {
void unmountVolume(in String mountPoint, boolean force, boolean removeEncryption) = 6;
/**
* Format external storage given a mount point. Returns an int consistent
* with MountServiceResultCode
* with StorageResultCode
*/
int formatVolume(in String mountPoint) = 7;
/**
......@@ -87,30 +87,30 @@ interface IMountService {
String getVolumeState(in String mountPoint) = 9;
/*
* Creates a secure container with the specified parameters. Returns an int
* consistent with MountServiceResultCode
* consistent with StorageResultCode
*/
int createSecureContainer(in String id, int sizeMb, in String fstype, in String key,
int ownerUid, boolean external) = 10;
/*
* Finalize a container which has just been created and populated. After
* finalization, the container is immutable. Returns an int consistent with
* MountServiceResultCode
* StorageResultCode
*/
int finalizeSecureContainer(in String id) = 11;
/*
* Destroy a secure container, and free up all resources associated with it.
* NOTE: Ensure all references are released prior to deleting. Returns an
* int consistent with MountServiceResultCode
* int consistent with StorageResultCode
*/
int destroySecureContainer(in String id, boolean force) = 12;
/*
* Mount a secure container with the specified key and owner UID. Returns an
* int consistent with MountServiceResultCode
* int consistent with StorageResultCode
*/
int mountSecureContainer(in String id, in String key, int ownerUid, boolean readOnly) = 13;
/*
* Unount a secure container. Returns an int consistent with
* MountServiceResultCode
* StorageResultCode
*/
int unmountSecureContainer(in String id, boolean force) = 14;
/*
......@@ -119,7 +119,7 @@ interface IMountService {
boolean isSecureContainerMounted(in String id) = 15;
/*
* Rename an unmounted secure container. Returns an int consistent with
* MountServiceResultCode
* StorageResultCode
*/
int renameSecureContainer(in String oldId, in String newId) = 16;
/*
......@@ -131,19 +131,19 @@ interface IMountService {
*/
String[] getSecureContainerList() = 18;
/**
* Shuts down the MountService and gracefully unmounts all external media.
* Shuts down the StorageManagerService and gracefully unmounts all external media.
* Invokes call back once the shutdown is complete.
*/
void shutdown(IMountShutdownObserver observer) = 19;
void shutdown(IStorageShutdownObserver observer) = 19;
/**
* Call into MountService by PackageManager to notify that its done
* Call into StorageManagerService by PackageManager to notify that its done
* processing the media status update request.
*/
void finishMediaUpdate() = 20;
/**
* Mounts an Opaque Binary Blob (OBB) with the specified decryption key and
* only allows the calling process's UID access to the contents.
* MountService will call back to the supplied IObbActionListener to inform
* StorageManagerService will call back to the supplied IObbActionListener to inform
* it of the terminal state of the call.
*/
void mountObb(in String rawPath, in String canonicalPath, in String key,
......@@ -151,7 +151,7 @@ interface IMountService {
/**
* Unmounts an Opaque Binary Blob (OBB). When the force flag is specified,
* any program using it will be forcibly killed to unmount the image.
* MountService will call back to the supplied IObbActionListener to inform
* StorageManagerService will call back to the supplied IObbActionListener to inform
* it of the terminal state of the call.
*/
void unmountObb(in String rawPath, boolean force, IObbActionListener token, int nonce) = 22;
......@@ -209,7 +209,7 @@ interface IMountService {
int verifyEncryptionPassword(in String password) = 32;
/*
* Fix permissions in a container which has just been created and populated.
* Returns an int consistent with MountServiceResultCode
* Returns an int consistent with StorageResultCode
*/
int fixPermissionsSecureContainer(in String id, int gid, in String filename) = 33;
/**
......
......@@ -24,9 +24,9 @@ package android.os.storage;
*
* @hide - For internal consumption only.
*/
interface IMountShutdownObserver {
interface IStorageShutdownObserver {
/**
* This method is called when the shutdown of MountService completed.
* This method is called when the shutdown of StorageManagerService completed.
*
* @param statusCode indicates success or failure of the shutdown.
*/
......
......@@ -21,7 +21,7 @@ package android.os.storage;
*
* @hide Only for use within the system server.
*/
public abstract class MountServiceInternal {
public abstract class StorageManagerInternal {
/**
* Policy that influences how external storage is mounted and reported.
......
......@@ -18,7 +18,7 @@ package android.os.storage;
/**
* Class that provides access to constants returned from StorageManager
* and lower level MountService APIs.
* and lower level StorageManagerService APIs.
*
* @hide
*/
......
......@@ -5854,7 +5854,8 @@ public final class Settings {
"search_per_source_concurrent_query_limit";
/**
* Whether or not alert sounds are played on MountService events. (0 = false, 1 = true)
* Whether or not alert sounds are played on StorageManagerService events.
* (0 = false, 1 = true)
* @hide
*/
public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd";
......
......@@ -29,7 +29,7 @@ import android.os.FileUtils;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.storage.IMountService;
import android.os.storage.IStorageManager;
import android.os.storage.StorageManager;
import android.os.storage.StorageResultCode;
import android.os.storage.StorageVolume;
......@@ -53,7 +53,7 @@ import java.util.zip.ZipOutputStream;
/**
* Constants used internally between the PackageManager
* and media container service transports.
* Some utility methods to invoke MountService api.
* Some utility methods to invoke StorageManagerService api.
*/
public class PackageHelper {
public static final int RECOMMEND_INSTALL_INTERNAL = 1;
......@@ -74,13 +74,13 @@ public class PackageHelper {
public static final int APP_INSTALL_INTERNAL = 1;
public static final int APP_INSTALL_EXTERNAL = 2;
public static IMountService getMountService() throws RemoteException {
public static IStorageManager getStorageManager() throws RemoteException {
IBinder service = ServiceManager.getService("mount");
if (service != null) {
return IMountService.Stub.asInterface(service);
return IStorageManager.Stub.asInterface(service);
} else {
Log.e(TAG, "Can't get mount service");
throw new RemoteException("Could not contact mount service");
Log.e(TAG, "Can't get storagemanager service");
throw new RemoteException("Could not contact storagemanager service");
}
}
......@@ -89,23 +89,23 @@ public class PackageHelper {
// Round up to nearest MB, plus another MB for filesystem overhead
final int sizeMb = (int) ((sizeBytes + MB_IN_BYTES) / MB_IN_BYTES) + 1;
try {
IMountService mountService = getMountService();
IStorageManager storageManager = getStorageManager();
if (localLOGV)
Log.i(TAG, "Size of container " + sizeMb + " MB");
int rc = mountService.createSecureContainer(cid, sizeMb, "ext4", sdEncKey, uid,
int rc = storageManager.createSecureContainer(cid, sizeMb, "ext4", sdEncKey, uid,
isExternal);
if (rc != StorageResultCode.OperationSucceeded) {
Log.e(TAG, "Failed to create secure container " + cid);
return null;
}
String cachePath = mountService.getSecureContainerPath(cid);
String cachePath = storageManager.getSecureContainerPath(cid);
if (localLOGV) Log.i(TAG, "Created secure container " + cid +
" at " + cachePath);
return cachePath;
} catch (RemoteException e) {
Log.e(TAG, "MountService running?");
Log.e(TAG, "StorageManagerService running?");
}
return null;
}
......@@ -114,13 +114,13 @@ public class PackageHelper {
// Round up to nearest MB, plus another MB for filesystem overhead
final int sizeMb = (int) ((sizeBytes + MB_IN_BYTES) / MB_IN_BYTES) + 1;
try {
IMountService mountService = getMountService();
int rc = mountService.resizeSecureContainer(cid, sizeMb, sdEncKey);
IStorageManager storageManager = getStorageManager();
int rc = storageManager.resizeSecureContainer(cid, sizeMb, sdEncKey);
if (rc == StorageResultCode.OperationSucceeded) {
return true;
}
} catch (RemoteException e) {
Log.e(TAG, "MountService running?");
Log.e(TAG, "StorageManagerService running?");
}
Log.e(TAG, "Failed to create secure container " + cid);
return false;
......@@ -132,35 +132,35 @@ public class PackageHelper {
public static String mountSdDir(String cid, String key, int ownerUid, boolean readOnly) {
try {
int rc = getMountService().mountSecureContainer(cid, key, ownerUid, readOnly);
int rc = getStorageManager().mountSecureContainer(cid, key, ownerUid, readOnly);
if (rc != StorageResultCode.OperationSucceeded) {
Log.i(TAG, "Failed to mount container " + cid + " rc : " + rc);
return null;
}
return getMountService().getSecureContainerPath(cid);
return getStorageManager().getSecureContainerPath(cid);
} catch (RemoteException e) {
Log.e(TAG, "MountService running?");
Log.e(TAG, "StorageManagerService running?");
}
return null;
}
public static boolean unMountSdDir(String cid) {
try {
int rc = getMountService().unmountSecureContainer(cid, true);
int rc = getStorageManager().unmountSecureContainer(cid, true);
if (rc != StorageResultCode.OperationSucceeded) {
Log.e(TAG, "Failed to unmount " + cid + " with rc " + rc);
return false;
}
return true;
} catch (RemoteException e) {
Log.e(TAG, "MountService running?");
Log.e(TAG, "StorageManagerService running?");
}
return false;
}
public static boolean renameSdDir(String oldId, String newId) {
try {
int rc = getMountService().renameSecureContainer(oldId, newId);
int rc = getStorageManager().renameSecureContainer(oldId, newId);
if (rc != StorageResultCode.OperationSucceeded) {
Log.e(TAG, "Failed to rename " + oldId + " to " +
newId + "with rc " + rc);
......@@ -176,7 +176,7 @@ public class PackageHelper {
public static String getSdDir(String cid) {
try {
return getMountService().getSecureContainerPath(cid);
return getStorageManager().getSecureContainerPath(cid);
} catch (RemoteException e) {
Log.e(TAG, "Failed to get container path for " + cid +
" with exception " + e);
......@@ -186,7 +186,7 @@ public class PackageHelper {
public static String getSdFilesystem(String cid) {
try {
return getMountService().getSecureContainerFilesystemPath(cid);
return getStorageManager().getSecureContainerFilesystemPath(cid);
} catch (RemoteException e) {
Log.e(TAG, "Failed to get container path for " + cid +
" with exception " + e);
......@@ -196,7 +196,7 @@ public class PackageHelper {
public static boolean finalizeSdDir(String cid) {
try {
int rc = getMountService().finalizeSecureContainer(cid);
int rc = getStorageManager().finalizeSecureContainer(cid);
if (rc != StorageResultCode.OperationSucceeded) {
Log.i(TAG, "Failed to finalize container " + cid);
return false;
......@@ -212,7 +212,7 @@ public class PackageHelper {
public static boolean destroySdDir(String cid) {
try {
if (localLOGV) Log.i(TAG, "Forcibly destroying container " + cid);
int rc = getMountService().destroySecureContainer(cid, true);
int rc = getStorageManager().destroySecureContainer(cid, true);
if (rc != StorageResultCode.OperationSucceeded) {
Log.i(TAG, "Failed to destroy container " + cid);
return false;
......@@ -227,7 +227,7 @@ public class PackageHelper {
public static String[] getSecureContainerList() {
try {
return getMountService().getSecureContainerList();
return getStorageManager().getSecureContainerList();
} catch (RemoteException e) {
Log.e(TAG, "Failed to get secure container list with exception" +
e);
......@@ -237,7 +237,7 @@ public class PackageHelper {
public static boolean isContainerMounted(String cid) {
try {
return getMountService().isSecureContainerMounted(cid);
return getStorageManager().isSecureContainerMounted(cid);
} catch (RemoteException e) {
Log.e(TAG, "Failed to find out if container " + cid + " mounted");
}
......@@ -325,7 +325,7 @@ public class PackageHelper {
public static boolean fixSdPermissions(String cid, int gid, String filename) {
try {
int rc = getMountService().fixPermissionsSecureContainer(cid, gid, filename);
int rc = getStorageManager().fixPermissionsSecureContainer(cid, gid, filename);
if (rc != StorageResultCode.OperationSucceeded) {
Log.i(TAG, "Failed to fixperms container " + cid);
return false;
......
......@@ -36,7 +36,7 @@ import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.IMountService;
import android.os.storage.IStorageManager;
import android.os.storage.StorageManager;
import android.provider.Settings;
import android.text.TextUtils;
......@@ -682,10 +682,10 @@ public class LockPatternUtils {
return;
}
IMountService mountService = IMountService.Stub.asInterface(service);
IStorageManager storageManager = IStorageManager.Stub.asInterface(service);
try {
Log.d(TAG, "Setting owner info");
mountService.setField(StorageManager.OWNER_INFO_KEY, ownerInfo);
storageManager.setField(StorageManager.OWNER_INFO_KEY, ownerInfo);
} catch (RemoteException e) {
Log.e(TAG, "Error changing user info", e);
}
......@@ -746,9 +746,9 @@ public class LockPatternUtils {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... dummy) {
IMountService mountService = IMountService.Stub.asInterface(service);
IStorageManager storageManager = IStorageManager.Stub.asInterface(service);
try {
mountService.changeEncryptionPassword(type, password);
storageManager.changeEncryptionPassword(type, password);
} catch (RemoteException e) {
Log.e(TAG, "Error changing encryption password", e);
}
......@@ -1122,9 +1122,9 @@ public class LockPatternUtils {
return;
}
IMountService mountService = IMountService.Stub.asInterface(service);
IStorageManager storageManager = IStorageManager.Stub.asInterface(service);
try {
mountService.setField(StorageManager.PATTERN_VISIBLE_KEY, enabled ? "1" : "0");
storageManager.setField(StorageManager.PATTERN_VISIBLE_KEY, enabled ? "1" : "0");
} catch (RemoteException e) {
Log.e(TAG, "Error changing pattern visible state", e);
}
......@@ -1145,9 +1145,9 @@ public class LockPatternUtils {
return;
}
IMountService mountService = IMountService.Stub.asInterface(service);
IStorageManager storageManager = IStorageManager.Stub.asInterface(service);
try {
mountService.setField(StorageManager.PASSWORD_VISIBLE_KEY, enabled ? "1" : "0");
storageManager.setField(StorageManager.PASSWORD_VISIBLE_KEY, enabled ? "1" : "0");
} catch (RemoteException e) {
Log.e(TAG, "Error changing password visible state", e);
}
......
......@@ -21,7 +21,7 @@ import static android.net.TrafficStats.MB_IN_BYTES;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.storage.IMountService;
import android.os.storage.IStorageManager;
import android.test.AndroidTestCase;
import android.util.Log;
......@@ -31,14 +31,14 @@ public class PackageHelperTests extends AndroidTestCase {
private static final boolean localLOGV = true;
public static final String TAG = "PackageHelperTests";
protected final String PREFIX = "android.content.pm";
private IMountService mMs;
private IStorageManager mSm;
private String fullId;
private String fullId2;
private IMountService getMs() {
private IStorageManager getSm() {
IBinder service = ServiceManager.getService("mount");
if (service != null) {
return IMountService.Stub.asInterface(service);
return IStorageManager.Stub.asInterface(service);
} else {
Log.e(TAG, "Can't get mount service");
}
......@@ -47,12 +47,12 @@ public class PackageHelperTests extends AndroidTestCase {
private void cleanupContainers() throws RemoteException {
Log.d(TAG,"cleanUp");
IMountService ms = getMs();
String[] containers = ms.getSecureContainerList();
IStorageManager sm = getSm();
String[] containers = sm.getSecureContainerList();
for (int i = 0; i < containers.length; i++) {
if (containers[i].startsWith(PREFIX)) {
Log.d(TAG,"cleaing up "+containers[i]);
ms.destroySecureContainer(containers[i], true);
sm.destroySecureContainer(containers[i], true);
}
}
}
......
......@@ -46,7 +46,7 @@ import android.os.ServiceManager;
import android.os.StatFs;
import android.os.SystemClock;
import android.os.UserManager;
import android.os.storage.IMountService;
import android.os.storage.IStorageManager;
import android.os.storage.StorageListener;
import android.os.storage.StorageManager;
import android.os.storage.StorageResultCode;
......@@ -1149,12 +1149,12 @@ public class PackageManagerTests extends AndroidTestCase {
}
}
IMountService getMs() {
IStorageManager getSm() {
IBinder service = ServiceManager.getService("mount");
if (service != null) {
return IMountService.Stub.asInterface(service);
return IStorageManager.Stub.asInterface(service);
} else {
Log.e(TAG, "Can't get mount service");
Log.e(TAG, "Can't get storagemanager service");
}
return null;
}
......@@ -1185,7 +1185,7 @@ public class PackageManagerTests extends AndroidTestCase {
try {
// Wait on observer
synchronized (observer) {
int ret = getMs().mountVolume(path);
int ret = getSm().mountVolume(path);
if (ret != StorageResultCode.OperationSucceeded) {
throw new Exception("Could not mount the media");
}
......@@ -1224,7 +1224,7 @@ public class PackageManagerTests extends AndroidTestCase {
try {
// Wait on observer
synchronized (observer) {
getMs().unmountVolume(path, true, false);
getSm().unmountVolume(path, true, false);
long waitTime = 0;
while ((!observer.isDone()) && (waitTime < MAX_WAIT_TIME)) {
observer.wait(WAIT_TIME_INCR);
......@@ -2754,7 +2754,7 @@ public class PackageManagerTests extends AndroidTestCase {
}
}
/* This test creates a stale container via MountService and then installs
/* This test creates a stale container via StorageManagerService and then installs
* a package and verifies that the stale container is cleaned up and install
* is successful.
* Please note that this test is very closely tied to the framework's
......
......@@ -50,21 +50,21 @@ public class AsecTests extends AndroidTestCase {
}
private void cleanupContainers() throws RemoteException {
IMountService ms = getMs();
String[] containers = ms.getSecureContainerList();
IStorageManager sm = getSm();
String[] containers = sm.getSecureContainerList();
for (int i = 0; i < containers.length; i++) {
if (containers[i].startsWith(SECURE_CONTAINER_PREFIX)) {
if (localLOGV)
Log.i(TAG, "Cleaning: " + containers[i]);
ms.destroySecureContainer(containers[i], true);
sm.destroySecureContainer(containers[i], true);
}
}
}
private boolean containerExists(String localId) throws RemoteException {
IMountService ms = getMs();
String[] containers = ms.getSecureContainerList();