am 2c34481d: am 7c24d433: am 8d4bb29c: am 0ffb2dda: Android MMS api allows arbitrary file access as the radio user
* commit '2c34481dc7f8e412b02492ddab57de216db7fdae':
Android MMS api allows arbitrary file access as the radio user
diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java
old mode 100755
new mode 100644
index 7ec2aed..fa05035
--- a/src/com/android/providers/telephony/TelephonyProvider.java
+++ b/src/com/android/providers/telephony/TelephonyProvider.java
@@ -26,6 +26,7 @@
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.database.Cursor;
+import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteQueryBuilder;
@@ -167,7 +168,7 @@
parser.close();
}
- // Read external APNS data (partner-provided)
+ // Read external APNS data (partner-provided)
XmlPullParser confparser = null;
// Environment.getRootDirectory() is a fancy way of saying ANDROID_ROOT or "/system".
File confFile = new File(Environment.getRootDirectory(), PARTNER_APNS_PATH);
@@ -225,7 +226,7 @@
oldVersion = 6 << 16 | 6;
}
if (oldVersion < (7 << 16 | 6)) {
- // Add protcol fields to the APN. The XML file does not change.
+ // Add carrier_enabled, bearer fields to the APN. The XML file does not change.
db.execSQL("ALTER TABLE " + CARRIERS_TABLE +
" ADD COLUMN carrier_enabled BOOLEAN DEFAULT 1;");
db.execSQL("ALTER TABLE " + CARRIERS_TABLE +
@@ -320,6 +321,7 @@
private void loadApns(SQLiteDatabase db, XmlPullParser parser) {
if (parser != null) {
try {
+ db.beginTransaction();
while (true) {
XmlUtils.nextElement(parser);
ContentValues row = getRow(parser);
@@ -329,10 +331,15 @@
break; // do we really want to skip the rest of the file?
}
}
+ db.setTransactionSuccessful();
} catch (XmlPullParserException e) {
- Log.e(TAG, "Got execption while getting perferred time zone.", e);
+ Log.e(TAG, "Got execption while loading apns.", e);
} catch (IOException e) {
- Log.e(TAG, "Got execption while getting perferred time zone.", e);
+ Log.e(TAG, "Got IOExecption while loading apns.", e);
+ } catch (SQLException e){
+ Log.e(TAG, "Got SQLException while loading apns.", e);
+ } finally {
+ db.endTransaction();
}
}
}