Merge "Set EDITED column to USER_EDITED when editing APN" am: 90d284cab7
am: 1b0c8335e3
Change-Id: I0b37b48e160f8fcd7b96f6515b34e1cb765d2b24
This commit is contained in:
@@ -249,7 +249,9 @@ public class ApnEditor extends SettingsPreferenceFragment
|
|||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mUri = getContentResolver().insert(uri, new ContentValues());
|
ContentValues contentValues = new ContentValues();
|
||||||
|
contentValues.put(Telephony.Carriers.EDITED, Telephony.Carriers.USER_EDITED);
|
||||||
|
mUri = getContentResolver().insert(uri, contentValues);
|
||||||
} else {
|
} else {
|
||||||
mUri = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI,
|
mUri = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI,
|
||||||
icicle.getInt(SAVED_POS));
|
icicle.getInt(SAVED_POS));
|
||||||
@@ -464,7 +466,9 @@ public class ApnEditor extends SettingsPreferenceFragment
|
|||||||
if (mUri == null && mNewApn) {
|
if (mUri == null && mNewApn) {
|
||||||
// The URI could have been deleted when activity is paused,
|
// The URI could have been deleted when activity is paused,
|
||||||
// therefore, it needs to be restored.
|
// therefore, it needs to be restored.
|
||||||
mUri = getContentResolver().insert(getIntent().getData(), new ContentValues());
|
ContentValues contentValues = new ContentValues();
|
||||||
|
contentValues.put(Telephony.Carriers.EDITED, Telephony.Carriers.USER_EDITED);
|
||||||
|
mUri = getContentResolver().insert(getIntent().getData(), contentValues);
|
||||||
if (mUri == null) {
|
if (mUri == null) {
|
||||||
Log.w(TAG, "Failed to insert new telephony provider into "
|
Log.w(TAG, "Failed to insert new telephony provider into "
|
||||||
+ getIntent().getData());
|
+ getIntent().getData());
|
||||||
@@ -1044,6 +1048,8 @@ public class ApnEditor extends SettingsPreferenceFragment
|
|||||||
callUpdate,
|
callUpdate,
|
||||||
CARRIER_ENABLED_INDEX);
|
CARRIER_ENABLED_INDEX);
|
||||||
|
|
||||||
|
values.put(Telephony.Carriers.EDITED, Telephony.Carriers.USER_EDITED);
|
||||||
|
|
||||||
if (callUpdate) {
|
if (callUpdate) {
|
||||||
getContentResolver().update(mUri, values, null, null);
|
getContentResolver().update(mUri, values, null, null);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user