summaryrefslogtreecommitdiffstats
path: root/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2013-04-29 16:12:23 -0700
committerMike Lockwood <lockwood@google.com>2013-04-29 16:48:13 -0700
commit853ad6fbe34fa26e81e4b7325309a034d7a1b038 (patch)
tree9091103654aefef36d0f8dcbd1131fb1def28fcc /packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
parentb98212925e41e9420ce6fefc3fe204b29c8f7a83 (diff)
downloadframeworks_base-853ad6fbe34fa26e81e4b7325309a034d7a1b038.zip
frameworks_base-853ad6fbe34fa26e81e4b7325309a034d7a1b038.tar.gz
frameworks_base-853ad6fbe34fa26e81e4b7325309a034d7a1b038.tar.bz2
Remove obsolete OMA-DRM support
Change-Id: Ic6008d4c9f8b9cd9fd4efec070260227af70559c
Diffstat (limited to 'packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java')
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java39
1 files changed, 6 insertions, 33 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 659651b..f894068 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -48,7 +48,6 @@ import android.os.ParcelFileDescriptor;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
-import android.provider.DrmStore;
import android.provider.MediaStore;
import android.provider.Settings;
import android.text.TextUtils;
@@ -978,7 +977,7 @@ public class SettingsProvider extends ContentProvider {
/*
* When a client attempts to openFile the default ringtone or
* notification setting Uri, we will proxy the call to the current
- * default ringtone's Uri (if it is in the DRM or media provider).
+ * default ringtone's Uri (if it is in the media provider).
*/
int ringtoneType = RingtoneManager.getDefaultType(uri);
// Above call returns -1 if the Uri doesn't match a default type
@@ -989,22 +988,9 @@ public class SettingsProvider extends ContentProvider {
Uri soundUri = RingtoneManager.getActualDefaultRingtoneUri(context, ringtoneType);
if (soundUri != null) {
- // Only proxy the openFile call to drm or media providers
+ // Proxy the openFile call to media provider
String authority = soundUri.getAuthority();
- boolean isDrmAuthority = authority.equals(DrmStore.AUTHORITY);
- if (isDrmAuthority || authority.equals(MediaStore.AUTHORITY)) {
-
- if (isDrmAuthority) {
- try {
- // Check DRM access permission here, since once we
- // do the below call the DRM will be checking our
- // permission, not our caller's permission
- DrmStore.enforceAccessDrmPermission(context);
- } catch (SecurityException e) {
- throw new FileNotFoundException(e.getMessage());
- }
- }
-
+ if (authority.equals(MediaStore.AUTHORITY)) {
return context.getContentResolver().openFileDescriptor(soundUri, mode);
}
}
@@ -1019,7 +1005,7 @@ public class SettingsProvider extends ContentProvider {
/*
* When a client attempts to openFile the default ringtone or
* notification setting Uri, we will proxy the call to the current
- * default ringtone's Uri (if it is in the DRM or media provider).
+ * default ringtone's Uri (if it is in the media provider).
*/
int ringtoneType = RingtoneManager.getDefaultType(uri);
// Above call returns -1 if the Uri doesn't match a default type
@@ -1030,22 +1016,9 @@ public class SettingsProvider extends ContentProvider {
Uri soundUri = RingtoneManager.getActualDefaultRingtoneUri(context, ringtoneType);
if (soundUri != null) {
- // Only proxy the openFile call to drm or media providers
+ // Proxy the openFile call to media provider
String authority = soundUri.getAuthority();
- boolean isDrmAuthority = authority.equals(DrmStore.AUTHORITY);
- if (isDrmAuthority || authority.equals(MediaStore.AUTHORITY)) {
-
- if (isDrmAuthority) {
- try {
- // Check DRM access permission here, since once we
- // do the below call the DRM will be checking our
- // permission, not our caller's permission
- DrmStore.enforceAccessDrmPermission(context);
- } catch (SecurityException e) {
- throw new FileNotFoundException(e.getMessage());
- }
- }
-
+ if (authority.equals(MediaStore.AUTHORITY)) {
ParcelFileDescriptor pfd = null;
try {
pfd = context.getContentResolver().openFileDescriptor(soundUri, mode);