auto import from //depot/cupcake/@132589

This commit is contained in:
The Android Open Source Project
2009-03-03 14:04:24 -08:00
parent 3dec7d563a
commit 076357b856
310 changed files with 4072 additions and 18131 deletions

View File

@@ -884,9 +884,6 @@ final class DataConnectionTracker extends Handler
isConnected = (state != State.IDLE && state != State.FAILED);
// The "current" may no longer be valid. MMS depends on this to send properly.
phone.updateCurrentCarrierInProvider();
// TODO: It'd be nice to only do this if the changed entrie(s)
// match the current operator.
createAllApnList();

View File

@@ -1383,8 +1383,18 @@ public class GSMPhone extends PhoneBase {
break;
case EVENT_SIM_RECORDS_LOADED:
updateCurrentCarrierInProvider();
mSIMRecords.getSIMOperatorNumeric();
try {
//set the current field the telephony provider according to
//the SIM's operator
Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current");
ContentValues map = new ContentValues();
map.put(Telephony.Carriers.NUMERIC, mSIMRecords.getSIMOperatorNumeric());
mContext.getContentResolver().insert(uri, map);
} catch (SQLException e) {
Log.e(LOG_TAG, "Can't store current operator", e);
}
// Check if this is a different SIM than the previous one. If so unset the
// voice mail number.
String imsi = getVmSimImsi();
@@ -1525,27 +1535,7 @@ public class GSMPhone extends PhoneBase {
}
}
}
/**
* Sets the "current" field in the telephony provider according to the SIM's operator
*
* @return true for success; false otherwise.
*/
boolean updateCurrentCarrierInProvider() {
if (mSIMRecords != null) {
try {
Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current");
ContentValues map = new ContentValues();
map.put(Telephony.Carriers.NUMERIC, mSIMRecords.getSIMOperatorNumeric());
mContext.getContentResolver().insert(uri, map);
return true;
} catch (SQLException e) {
Log.e(LOG_TAG, "Can't store current operator", e);
}
}
return false;
}
/**
* Used to track the settings upon completion of the network change.
*/

View File

@@ -532,7 +532,7 @@ public class GsmAlphabet
* needed to represent this string. Counts unencodable char as 1 septet.
*/
public static int
countGsmSeptets(CharSequence s)
countGsmSeptets(String s)
{
try {
return countGsmSeptets(s, false);
@@ -549,7 +549,7 @@ public class GsmAlphabet
* char. Otherwise, counts invalid char as 1 septet
*/
public static int
countGsmSeptets(CharSequence s, boolean throwsException) throws EncodeException
countGsmSeptets(String s, boolean throwsException) throws EncodeException
{
int charIndex = 0;
int sz = s.length();