Java setStorageEncryption不产生任何效果
我在Pandorn上玩过设备管理API,尽管getStorageEncryption返回的状态为TRUE,但setStorageEncryption方法似乎没有产生任何效果 在熊猫板的情况下,应用程序内部存储器物理上放置在可移动闪存卡的某个位置(它没有任何其他闪存)。因此,我做了以下工作:Java setStorageEncryption不产生任何效果,java,android,security,encryption,Java,Android,Security,Encryption,我在Pandorn上玩过设备管理API,尽管getStorageEncryption返回的状态为TRUE,但setStorageEncryption方法似乎没有产生任何效果 在熊猫板的情况下,应用程序内部存储器物理上放置在可移动闪存卡的某个位置(它没有任何其他闪存)。因此,我做了以下工作: 调用SetStorage Encryption(true)(ApiDemos示例中的DeviceAdminSample.java) 通过调用getStorageEncryption、getStorageEnc
if(mDPM.getStorageEncryption(mDeviceAdminSample)){
string=“真正的加密”;
}
FileOutputStream=null;
fos=openFileOutput(“hello_file.txt”,Context.MODE_PRIVATE);
fos.write(string.getBytes());
fos.close();
实际上,SetStorage encryption是否启用了加密,或者它只请求加密,或者换句话说,“声明您的意图”对存储进行加密?我相信您还需要调用以下代码:
// Launch the activity to activate encryption. May or may not return!
Intent intent = new Intent(DevicePolicyManager.ACTION_START_ENCRYPTION);
startActivityForResult(intent, REQUEST_CODE_START_ENCRYPTION);
它取自设备管理示例