DO NOT MERGE

Removing unused features from source tree.
Please refer to Bug#2502219.

Change-Id: I879c29bfd5ffe933f64bb1082aaae7c956450a5a
This commit is contained in:
Oscar Montemayor
2010-03-26 18:44:14 -07:00
parent 59fc58dc3f
commit 1f4df90bfa
17 changed files with 66 additions and 321 deletions

View File

@@ -28,8 +28,6 @@ public class Environment {
private static final File ROOT_DIRECTORY
= getDirectory("ANDROID_ROOT", "/system");
private static final String SYSTEM_PROPERTY_EFS_ENABLED = "persist.security.efs.enabled";
private static IMountService mMntSvc = null;
/**
@@ -39,55 +37,9 @@ public class Environment {
return ROOT_DIRECTORY;
}
/**
* Gets the system directory available for secure storage.
* If Encrypted File system is enabled, it returns an encrypted directory (/data/secure/system).
* Otherwise, it returns the unencrypted /data/system directory.
* @return File object representing the secure storage system directory.
* @hide
*/
public static File getSystemSecureDirectory() {
if (isEncryptedFilesystemEnabled()) {
return new File(SECURE_DATA_DIRECTORY, "system");
} else {
return new File(DATA_DIRECTORY, "system");
}
}
/**
* Gets the data directory for secure storage.
* If Encrypted File system is enabled, it returns an encrypted directory (/data/secure).
* Otherwise, it returns the unencrypted /data directory.
* @return File object representing the data directory for secure storage.
* @hide
*/
public static File getSecureDataDirectory() {
if (isEncryptedFilesystemEnabled()) {
return SECURE_DATA_DIRECTORY;
} else {
return DATA_DIRECTORY;
}
}
/**
* Returns whether the Encrypted File System feature is enabled on the device or not.
* @return <code>true</code> if Encrypted File System feature is enabled, <code>false</code>
* if disabled.
* @hide
*/
public static boolean isEncryptedFilesystemEnabled() {
return SystemProperties.getBoolean(SYSTEM_PROPERTY_EFS_ENABLED, false);
}
private static final File DATA_DIRECTORY
= getDirectory("ANDROID_DATA", "/data");
/**
* @hide
*/
private static final File SECURE_DATA_DIRECTORY
= getDirectory("ANDROID_SECURE_DATA", "/data/secure");
private static final File EXTERNAL_STORAGE_DIRECTORY
= getDirectory("EXTERNAL_STORAGE", "/sdcard");

View File

@@ -351,23 +351,6 @@ public class RecoverySystem {
bootCommand(context, "--wipe_data");
}
/**
* Reboot into the recovery system to wipe the /data partition and toggle
* Encrypted File Systems on/off.
* @param extras to add to the RECOVERY_COMPLETED intent after rebooting.
* @throws IOException if something goes wrong.
*
* @hide
*/
public static void rebootToggleEFS(Context context, boolean efsEnabled)
throws IOException {
if (efsEnabled) {
bootCommand(context, "--set_encrypted_filesystem=on");
} else {
bootCommand(context, "--set_encrypted_filesystem=off");
}
}
/**
* Reboot into the recovery system with the supplied argument.
* @param arg to pass to the recovery utility.