From 1f99218612fa12f2c3354c29bf8d761a27e50148 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Mon, 18 Apr 2016 15:37:31 -0700 Subject: [PATCH] Don't start defaultcrypto twice The old way (using triggers) starts defaultcrypto twice because queue_property_triggers_action retriggers the action. Bug: 27452459 Change-Id: I48c844836f551673d0dbfed6c33bd8ee1e035f40 --- init/builtins.cpp | 4 ++-- rootdir/init.rc | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/init/builtins.cpp b/init/builtins.cpp index c8780bb53..b77f9ad32 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -537,11 +537,11 @@ static int do_mount_all(const std::vector& args) { import_late(args, 2); if (ret == FS_MGR_MNTALL_DEV_NEEDS_ENCRYPTION) { - property_set("vold.decrypt", "trigger_encryption"); + ActionManager::GetInstance().QueueEventTrigger("encrypt"); } else if (ret == FS_MGR_MNTALL_DEV_MIGHT_BE_ENCRYPTED) { property_set("ro.crypto.state", "encrypted"); property_set("ro.crypto.type", "block"); - property_set("vold.decrypt", "trigger_default_encryption"); + ActionManager::GetInstance().QueueEventTrigger("defaultcrypto"); } else if (ret == FS_MGR_MNTALL_DEV_NOT_ENCRYPTED) { property_set("ro.crypto.state", "unencrypted"); ActionManager::GetInstance().QueueEventTrigger("nonencrypted"); diff --git a/rootdir/init.rc b/rootdir/init.rc index 3e2f0a589..2f027d7df 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -556,13 +556,6 @@ on nonencrypted class_start main class_start late_start -on property:vold.decrypt=trigger_default_encryption - start defaultcrypto - -on property:vold.decrypt=trigger_encryption - start surfaceflinger - start encrypt - on property:sys.init_log_level=* loglevel ${sys.init_log_level}