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

@@ -1483,13 +1483,7 @@ public class AccountManagerService
}
private static String getDatabaseName() {
if(Environment.isEncryptedFilesystemEnabled()) {
// Hard-coded path in case of encrypted file system
return Environment.getSystemSecureDirectory().getPath() + File.separator + DATABASE_NAME;
} else {
// Regular path in case of non-encrypted file system
return DATABASE_NAME;
}
return DATABASE_NAME;
}
private class DatabaseHelper extends SQLiteOpenHelper {

View File

@@ -312,9 +312,7 @@ public class SyncStorageEngine extends Handler {
if (sSyncStorageEngine != null) {
return;
}
// This call will return the correct directory whether Encrypted File Systems is
// enabled or not.
File dataDir = Environment.getSecureDataDirectory();
File dataDir = Environment.getDataDirectory();
sSyncStorageEngine = new SyncStorageEngine(context, dataDir);
}

View File

@@ -248,16 +248,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
*/
public static final int FLAG_RESTORE_ANY_VERSION = 1<<17;
/**
* Value for {@link #flags}: this is true if the application has set
* its android:neverEncrypt to true, false otherwise. It is used to specify
* that this package specifically "opts-out" of a secured file system solution,
* and will always store its data in-the-clear.
*
* {@hide}
*/
public static final int FLAG_NEVER_ENCRYPT = 1<<18;
/**
* Value for {@link #flags}: Set to true if the application has been
* installed using the forward lock option.

View File

@@ -1539,12 +1539,6 @@ public class PackageParser {
ai.flags |= ApplicationInfo.FLAG_TEST_ONLY;
}
if (sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestApplication_neverEncrypt,
false)) {
ai.flags |= ApplicationInfo.FLAG_NEVER_ENCRYPT;
}
String str;
str = sa.getNonConfigurationString(
com.android.internal.R.styleable.AndroidManifestApplication_permission, 0);

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.