boot into recovery via the pre-recovery service

Change PowerManagerService to start the pre-recovery service rather
than rebooting directly, when requested to reboot into recovery.  Add
a new RECOVERY permission which a caller needs (in addition to REBOOT)
in order to go to recovery.

Bug: 12188746
Change-Id: I39121b701c4724558fe751adfbad79f8567faa43
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index ca74fa4..13f5e1c 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1719,6 +1719,14 @@
         android:label="@string/permlab_manageCaCertificates"
         android:description="@string/permdesc_manageCaCertificates" />
 
+    <!-- Allows an application to do certain operations needed for
+         interacting with the recovery (system update) system. -->
+    <permission android:name="android.permission.RECOVERY"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="signature|system"
+        android:label="@string/permlab_recovery"
+        android:description="@string/permdesc_recovery" />
+
     <!-- ========================================= -->
     <!-- Permissions for special development tools -->
     <!-- ========================================= -->