summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDebashish Chatterjee <debashishc@google.com>2011-07-21 03:48:19 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-21 03:48:19 -0700
commit72836d9ba83ef4d78168a408feaebdd225666f5c (patch)
treeefc599345c1be884bef6a3d231b691f25c16fc95
parent1dfa964f2e1756e27b36f99421bd403c84ea0a5f (diff)
parent791a25b9f228bed8d8bb2febadbd883452555d89 (diff)
downloadpackages_providers_ContactsProvider-72836d9ba83ef4d78168a408feaebdd225666f5c.zip
packages_providers_ContactsProvider-72836d9ba83ef4d78168a408feaebdd225666f5c.tar.gz
packages_providers_ContactsProvider-72836d9ba83ef4d78168a408feaebdd225666f5c.tar.bz2
Merge "Get rid of voicemail permissions from contacts content provider."
-rw-r--r--AndroidManifest.xml10
-rw-r--r--res/values/strings.xml12
-rw-r--r--src/com/android/providers/contacts/VoicemailContentProvider.java3
-rw-r--r--src/com/android/providers/contacts/VoicemailPermissions.java14
4 files changed, 17 insertions, 22 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ea663a2..156041c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2,16 +2,6 @@
package="com.android.providers.contacts"
android:sharedUserId="android.uid.shared">
- <!-- TODO: These permissions should be moved to framework/base once voicemail
- API is approved. -->
- <permission
- android:name="com.android.voicemail.permission.READ_WRITE_OWN_VOICEMAIL"
- android:label="@string/read_write_own_voicemail_label"
- android:description="@string/read_write_own_voicemail_description"
- android:permissionGroup="android.permission-group.PERSONAL_INFO"
- android:protectionLevel="dangerous"
- />
-
<permission
android:name="com.android.voicemail.permission.READ_WRITE_ALL_VOICEMAIL"
android:label="@string/read_write_all_voicemail_label"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 78b3620..6882249 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -38,9 +38,11 @@
<!-- The name of the invisible local contact directory -->
<string name="local_invisible_directory">Other</string>
- <string name="read_write_own_voicemail_label">read and write own voicemails</string>
- <string name="read_write_own_voicemail_description">The application is allowed to store and access only voicemails it owns on the device.</string>
- <string name="read_write_all_voicemail_label">read and write all voicemails</string>
- <string name="read_write_all_voicemail_description">The application is allowed to store and access all voicemails on the device.</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="read_write_all_voicemail_label">Access all voicemails</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="read_write_all_voicemail_description">Allows the application to store and retrieve
+ all voicemails that this device can access.</string>
</resources>
diff --git a/src/com/android/providers/contacts/VoicemailContentProvider.java b/src/com/android/providers/contacts/VoicemailContentProvider.java
index 74b978c..cbebb9c 100644
--- a/src/com/android/providers/contacts/VoicemailContentProvider.java
+++ b/src/com/android/providers/contacts/VoicemailContentProvider.java
@@ -255,7 +255,8 @@ public class VoicemailContentProvider extends ContentProvider
intent.putExtra(VoicemailContract.EXTRA_SELF_CHANGE,
callingPackage.equals(component.getPackageName()));
}
- context().sendBroadcast(intent, Manifest.permission.READ_WRITE_OWN_VOICEMAIL);
+ context().sendBroadcast(intent,
+ android.Manifest.permission.READ_WRITE_OWN_VOICEMAIL);
}
}
}
diff --git a/src/com/android/providers/contacts/VoicemailPermissions.java b/src/com/android/providers/contacts/VoicemailPermissions.java
index 4485c76..b0e783a 100644
--- a/src/com/android/providers/contacts/VoicemailPermissions.java
+++ b/src/com/android/providers/contacts/VoicemailPermissions.java
@@ -33,12 +33,12 @@ public class VoicemailPermissions {
/** Determines if the calling process has access to its own voicemails. */
public boolean callerHasOwnVoicemailAccess() {
- return callerHasPermission(Manifest.permission.READ_WRITE_OWN_VOICEMAIL);
+ return callerHasPermission(android.Manifest.permission.READ_WRITE_OWN_VOICEMAIL);
}
/** Determines if the calling process has access to all voicemails. */
public boolean callerHasFullAccess() {
- return callerHasPermission(Manifest.permission.READ_WRITE_OWN_VOICEMAIL) &&
+ return callerHasPermission(android.Manifest.permission.READ_WRITE_OWN_VOICEMAIL) &&
callerHasPermission(Manifest.permission.READ_WRITE_ALL_VOICEMAIL);
}
@@ -50,7 +50,7 @@ public class VoicemailPermissions {
public void checkCallerHasOwnVoicemailAccess() {
if (!callerHasOwnVoicemailAccess()) {
throw new SecurityException("The caller must have permission: " +
- Manifest.permission.READ_WRITE_OWN_VOICEMAIL);
+ android.Manifest.permission.READ_WRITE_OWN_VOICEMAIL);
}
}
@@ -62,19 +62,21 @@ public class VoicemailPermissions {
public void checkCallerHasFullAccess() {
if (!callerHasFullAccess()) {
throw new SecurityException(String.format("The caller must have permissions %s AND %s",
- Manifest.permission.READ_WRITE_OWN_VOICEMAIL,
+ android.Manifest.permission.READ_WRITE_OWN_VOICEMAIL,
Manifest.permission.READ_WRITE_ALL_VOICEMAIL));
}
}
/** Determines if the given package has access to its own voicemails. */
public boolean packageHasOwnVoicemailAccess(String packageName) {
- return packageHasPermission(packageName, Manifest.permission.READ_WRITE_OWN_VOICEMAIL);
+ return packageHasPermission(packageName,
+ android.Manifest.permission.READ_WRITE_OWN_VOICEMAIL);
}
/** Determines if the given package has full access. */
public boolean packageHasFullAccess(String packageName) {
- return packageHasPermission(packageName, Manifest.permission.READ_WRITE_OWN_VOICEMAIL) &&
+ return packageHasPermission(
+ packageName, android.Manifest.permission.READ_WRITE_OWN_VOICEMAIL) &&
packageHasPermission(packageName, Manifest.permission.READ_WRITE_ALL_VOICEMAIL);
}