Resolve merge conflicts of a5060ee to nyc-dev

This undoes the automerger skip which occured in
commit e740c84dc32180214a7fd157105d6c18d30408ee and
replays it as a standard (NOT -s ours) merge.

Change-Id: If5a47be26f73d6a0735c425cd66310a3e2a89086
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 778f797..bce5a7f 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -481,7 +481,8 @@
     <!-- ====================================================================== -->
     <eat-comment />
 
-    <!-- Used for runtime permissions related to user's contacts and profile. -->
+    <!-- Used for runtime permissions related to contacts and profiles on this
+        device. -->
     <permission-group android:name="android.permission-group.CONTACTS"
         android:icon="@drawable/perm_group_contacts"
         android:label="@string/permgrouplab_contacts"
@@ -1070,7 +1071,7 @@
     <!-- =============================================================== -->
     <eat-comment />
 
-    <!-- Allows an application to modify and remove existing voicemails in the system
+    <!-- Allows an application to modify and remove existing voicemails in the system.
         <p>Protection level: signature|privileged
     -->
     <permission android:name="com.android.voicemail.permission.WRITE_VOICEMAIL"
@@ -1087,7 +1088,7 @@
     <!-- ======================================= -->
     <eat-comment />
 
-    <!-- Allows an application to access extra location provider commands
+    <!-- Allows an application to access extra location provider commands.
          <p>Protection level: normal
     -->
     <permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"
@@ -1133,7 +1134,7 @@
         android:label="@string/permlab_createNetworkSockets"
         android:protectionLevel="normal" />
 
-    <!-- Allows applications to access information about networks
+    <!-- Allows applications to access information about networks.
          <p>Protection level: normal
     -->
     <permission android:name="android.permission.ACCESS_NETWORK_STATE"
@@ -1275,7 +1276,15 @@
     <eat-comment />
 
     <!-- Allows access to the list of accounts in the Accounts Service.
-        <p>Protection level: normal
+
+    <p class="note"><strong>Note:</strong> Beginning with Android 6.0 (API level
+    23), if an app shares the signature of the authenticator that manages an
+    account, it does not need <code>"GET_ACCOUNTS"</code> permission to read
+    information about that account. On Android 5.1 and lower, all apps need
+    <code>"GET_ACCOUNTS"</code> permission to read information about any
+    account.</p>
+
+    <p>Protection level: dangerous
     -->
     <permission android:name="android.permission.GET_ACCOUNTS"
         android:permissionGroup="android.permission-group.CONTACTS"
@@ -1666,11 +1675,21 @@
     <!-- ================================== -->
     <eat-comment />
 
-    <!-- Allows an application to open windows using the type
+    <!-- Allows an app to create windows using the type
          {@link android.view.WindowManager.LayoutParams#TYPE_SYSTEM_ALERT},
-         shown on top of all other applications.  Very few applications
+         shown on top of all other apps.  Very few apps
          should use this permission; these windows are intended for
-         system-level interaction with the user. -->
+         system-level interaction with the user.
+
+         <p class="note"><strong>Note:</strong> If the app
+         targets API level 23 or higher, the app user must explicitly grant
+         this permission to the app through a permission management screen. The app requests
+         the user's approval by sending an intent with action
+         {@link android.provider.Settings#ACTION_MANAGE_OVERLAY_PERMISSION}.
+         The app can check whether it has this authorization by calling
+         {@link android.provider.Settings#canDrawOverlays
+         Settings.canDrawOverlays()}.
+         <p>Protection level: signature -->
     <permission android:name="android.permission.SYSTEM_ALERT_WINDOW"
         android:label="@string/permlab_systemAlertWindow"
         android:description="@string/permdesc_systemAlertWindow"
@@ -1793,7 +1812,16 @@
         android:protectionLevel="signature|privileged|development" />
 
     <!-- Allows an application to read or write the system settings.
-         <p>Protection level: signature
+
+        <p class="note"><strong>Note:</strong> If the app targets API level 23
+        or higher, the app user
+        must explicitly grant this permission to the app through a permission management screen.
+        The app requests the user's approval by sending an intent with action
+        {@link android.provider.Settings#ACTION_MANAGE_WRITE_SETTINGS}. The app
+        can check whether it has this authorization by calling {@link
+        android.provider.Settings.System#canWrite Settings.System.canWrite()}.
+
+        <p>Protection level: signature
     -->
     <permission android:name="android.permission.WRITE_SETTINGS"
         android:label="@string/permlab_writeSettings"
@@ -2208,7 +2236,7 @@
     <permission android:name="android.permission.BIND_PRINT_SPOOLER_SERVICE"
         android:protectionLevel="signature" />
 
-    <!-- Must be required by a TextService (e.g. SpellCheckerService)
+    <!-- Must be required by a TextService (eg SpellCheckerService)
          to ensure that only the system can bind to it.
          <p>Protection level: signature
     -->