From 601373b55e880aea07e7f4f3184f3ca7bb9e90c3 Mon Sep 17 00:00:00 2001
From: Daniel Yu
android:encryptionAware attribute to true in your manifest.
+android:directBootAware attribute to true in your manifest.
Encryption aware components can register to receive a
LOCKED_BOOT_COMPLETED broadcast message from the
@@ -72,7 +72,7 @@ intent filter for LOCKED_BOOT_COMPLETED, in the app manifest:
<receiever
- android:encryptionAware="true" >
+ android:directBootAware="true" >
...
<intent-filter>
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
@@ -87,13 +87,13 @@ device encrypted storage as well as credential encrypted storage.
To access device encrypted storage, create a second
{@link android.content.Context} instance by calling
-Context.createDeviceEncryptedStorageContext(). All storage API
+Context.createDeviceProtectedStorageContext(). All storage API
calls made using this context access the device encrypted storage. The
following example accesses the device encrypted storage and opens an existing
app data file:
-Context directBootContext = Context.createDeviceEncryptedStorageContext();
+Context directBootContext = appContext.createDeviceProtectedStorageContext();
// Access appDataFilename that lives in device encrypted storage
FileInputStream inStream = directBootContext.openFileInput(appDataFilename);
// Use inStream to read content...
@@ -125,8 +125,8 @@ the user has unlocked the device.
If a user updates their device to use Direct Boot mode, you might have
existing data that needs to get migrated to device encrypted storage. Use
-Context.migrateSharedPreferencesFrom() and
-Context.migrateDatabaseFrom() to migrate preference and database
+Context.moveSharedPreferencesFrom() and
+Context.moveDatabaseFrom() to migrate preference and database
data between credential encrypted storage and device encrypted storage.
Use your best judgment when deciding what data to migrate from credential