diff options
| author | 2014-09-11 19:16:14 +0000 | |
|---|---|---|
| committer | 2014-09-11 19:16:15 +0000 | |
| commit | 280813a6d9ebeec6d4f327794b7d35128df435e0 (patch) | |
| tree | d8b403dda5f2030cf656b578cc63d18490d4e040 | |
| parent | a46ccb5f1f196e739b1aa8c4f09b52156e1472a4 (diff) | |
| parent | 91317107a39a4f2a9347105b96aafcb98fe21fee (diff) | |
Merge "Create correct files in dropbox on encrypted boot" into lmp-dev
| -rw-r--r-- | core/java/com/android/server/BootReceiver.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java/com/android/server/BootReceiver.java b/core/java/com/android/server/BootReceiver.java index 724998570cb0..468d7f1f15a9 100644 --- a/core/java/com/android/server/BootReceiver.java +++ b/core/java/com/android/server/BootReceiver.java @@ -123,8 +123,15 @@ public class BootReceiver extends BroadcastReceiver { } if (SystemProperties.getLong("ro.runtime.firstboot", 0) == 0) { - String now = Long.toString(System.currentTimeMillis()); - SystemProperties.set("ro.runtime.firstboot", now); + if ("encrypted".equals(SystemProperties.get("ro.crypto.state")) + && "trigger_restart_min_framework".equals(SystemProperties.get("vold.decrypt"))){ + // Encrypted, first boot to get PIN/pattern/password so data is tmpfs + // Don't set ro.runtime.firstboot so that we will do this again + // when data is properly mounted + } else { + String now = Long.toString(System.currentTimeMillis()); + SystemProperties.set("ro.runtime.firstboot", now); + } if (db != null) db.addText("SYSTEM_BOOT", headers); // Negative sizes mean to take the *tail* of the file (see FileUtils.readTextFile()) |