Step1 of renaming READ_WRITE_OWN_VOICEMAIL to ADD_VOICEMAILS.

READ_WRITE_OWN_VOICEMAIL sounds a confusing name. Dianne recommened to
rename it to ADD_VOICEMAILS as this simply allows 3rd party apps to add
new voicemails to the system. The fact that we allow the app to acces
only its own voicemail is implicit and need not be highlighted in the
permission name. See bug: 5098551 for more details

This CL implements the 1st step of this change by adding the permission
ADD_VOICEMAILS. A follow up CL will remove READ_WRITE_OWN_VOICEMAIL once
content provider and contacts app have been modified to start using the
new ADD_VOICEMAILS permission instead.

Bug: 5098551
Change-Id: I515e7967bdb0e8498a60a32983f9122ce10dcc4a
diff --git a/api/current.txt b/api/current.txt
index 817ed9c..2d64b56 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -15,6 +15,7 @@
     field public static final java.lang.String ACCESS_SURFACE_FLINGER = "android.permission.ACCESS_SURFACE_FLINGER";
     field public static final java.lang.String ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
     field public static final java.lang.String ACCOUNT_MANAGER = "android.permission.ACCOUNT_MANAGER";
+    field public static final java.lang.String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL";
     field public static final java.lang.String AUTHENTICATE_ACCOUNTS = "android.permission.AUTHENTICATE_ACCOUNTS";
     field public static final java.lang.String BATTERY_STATS = "android.permission.BATTERY_STATS";
     field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index f99a94c..21c3f1e 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -294,12 +294,21 @@
 
    <!-- Allows an application to read/write the voicemails owned by its own
         package. -->
+   <!--  TODO: delete this permission when dependent content provider &
+        application code has been migrated to use ADD_VOICEMAIL instead -->
     <permission android:name="com.android.voicemail.permission.READ_WRITE_OWN_VOICEMAIL"
         android:permissionGroup="android.permission-group.PERSONAL_INFO"
         android:protectionLevel="dangerous"
         android:label="@string/permlab_readWriteOwnVoicemail"
         android:description="@string/permdesc_readWriteOwnVoicemail" />
 
+   <!-- Allows an application to add voicemails into the system. -->
+    <permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL"
+        android:permissionGroup="android.permission-group.PERSONAL_INFO"
+        android:protectionLevel="dangerous"
+        android:label="@string/permlab_addVoicemail"
+        android:description="@string/permdesc_addVoicemail" />
+
     <!-- ======================================= -->
     <!-- Permissions for accessing location info -->
     <!-- ======================================= -->
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index c5aa4b2..a6c92f2 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2166,6 +2166,14 @@
       voicemails that its associated service can access.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether
+        they want to allow the application to do this. [CHAR LIMIT=NONE] -->
+    <string name="permlab_addVoicemail">add voicemail</string>
+    <!-- Description of an application permission, listed so the user can choose whether
+        they want to allow the application to do this. [CHAR LIMIT=NONE] -->
+    <string name="permdesc_addVoicemail">Allows the application to add messages
+      to your voicemail inbox.</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether
         they want to allow the application to do this. -->
     <string name="permlab_writeGeolocationPermissions">Modify Browser geolocation permissions</string>
     <!-- Description of an application permission, listed so the user can choose whether