package android.net.vpn;
+import java.io.File;
+
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.os.Environment;
+import android.os.SystemProperties;
import android.util.Log;
/**
// TODO(oam): Test VPN when EFS is enabled (will do later)...
public static String getProfilePath() {
// This call will return the correct path if Encrypted FS is enabled or not.
- return Environment.getDataDirectory().getPath() + PROFILES_PATH;
+ return Environment.getSecureDataDirectory().getPath() + PROFILES_PATH;
}
/**
*/
public VpnProfile createVpnProfile(VpnType type, boolean customized) {
try {
- VpnProfile p = type.getProfileClass().newInstance();
+ VpnProfile p = (VpnProfile) type.getProfileClass().newInstance();
p.setCustomized(customized);
return p;
} catch (InstantiationException e) {