summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDebashish Chatterjee <debashishc@google.com>2011-07-20 17:04:27 +0100
committerDebashish Chatterjee <debashishc@google.com>2011-07-20 20:28:54 +0100
commit791a25b9f228bed8d8bb2febadbd883452555d89 (patch)
tree269602b153cfd85b25ed305eba35d8970960d83f
parent1fafab3782590ab080dab07651df5aed0768e154 (diff)
downloadpackages_providers_ContactsProvider-791a25b9f228bed8d8bb2febadbd883452555d89.zip
packages_providers_ContactsProvider-791a25b9f228bed8d8bb2febadbd883452555d89.tar.gz
packages_providers_ContactsProvider-791a25b9f228bed8d8bb2febadbd883452555d89.tar.bz2
Get rid of voicemail permissions from contacts content provider.
They are now defined in framework/base. submitted in https://android-git.corp.google.com/g/119573 Bug: 5049309 Change-Id: I9927efe575b3a8b098599154c213840564023dfd
-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);
}