summaryrefslogtreecommitdiff
path: root/android/sqlite3_android.cpp
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-01-12 11:27:20 -0500
committerMike Lockwood <lockwood@android.com>2011-01-12 12:57:03 -0500
commit532ae77972f66feecc96ae31b771cf6f68fd6556 (patch)
treecaa46feab197e65bd623449432a44735f254abbf /android/sqlite3_android.cpp
parent46bdb5c49f8374539ec89e85cbb1a9ee7b3a2b10 (diff)
Revert "Allow _DELETE_FILE trigger to delete files in /data/media"
The media provider is now using the emulated /mnt/sdcard file system, so this change is no longer necessary. This reverts commit 439e88e7d09bfeac4690f2d9df6533955aa4fa88. Change-Id: Ied12275767e3a399d7e455ac2102527ccd8b888d
Diffstat (limited to 'android/sqlite3_android.cpp')
-rw-r--r--android/sqlite3_android.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/android/sqlite3_android.cpp b/android/sqlite3_android.cpp
index 5cc39d8..34e08b4 100644
--- a/android/sqlite3_android.cpp
+++ b/android/sqlite3_android.cpp
@@ -26,7 +26,6 @@
#include <unicode/ustring.h>
#include <unicode/utypes.h>
#include <cutils/log.h>
-#include <cutils/properties.h>
#include "sqlite3_android.h"
#include "PhoneNumberUtils.h"
@@ -213,17 +212,13 @@ static void delete_file(sqlite3_context * context, int argc, sqlite3_value ** ar
}
char const * path = (char const *)sqlite3_value_text(argv[0]);
- char media_storage[PROPERTY_VALUE_MAX];
char const * external_storage = getenv("EXTERNAL_STORAGE");
- if (path == NULL) {
+ if (path == NULL || external_storage == NULL) {
sqlite3_result_null(context);
return;
}
- property_get("ro.media.storage", media_storage, "");
- // path must match either ro.media.storage or EXTERNAL_STORAGE directory
- if ( !(media_storage[0] && strncmp(media_storage, path, strlen(media_storage)) == 0) &&
- !(external_storage && strncmp(external_storage, path, strlen(external_storage)) == 0)) {
+ if (strncmp(external_storage, path, strlen(external_storage)) != 0) {
sqlite3_result_null(context);
return;
}