recovery: change the way of rebooting when using power key combo

The power key combo allow to reboot from recovery mode by pressing
power button 7 times in a row. It calls directly the function
android_reboot() and lead to permission denial errors because of SE
Linux rules enforcement.
The right way to reboot from recovery is to set the property
"sys.powerctl" and let init handle it.

Change-Id: I5a6c3c49b27cef305815cef96da729390e19c9bc
Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
This commit is contained in:
Gaelle Nassiet 2015-05-27 10:39:29 +02:00
parent a8cd96adee
commit 074c1c2312

3
ui.cpp
View file

@ -174,7 +174,8 @@ void RecoveryUI::ProcessKey(int key_code, int updown) {
case RecoveryUI::REBOOT:
if (reboot_enabled) {
android_reboot(ANDROID_RB_RESTART, 0, 0);
property_set(ANDROID_RB_PROPERTY, "reboot,");
while(1) { pause(); }
}
break;