AI 144245: Fix merge conflict for megering in the CDMA changes in to master from donutburger.

Automated import of CL 144245
This commit is contained in:
Wink Saville
2009-04-02 11:00:54 -07:00
committed by The Android Open Source Project
parent 3afdd56470
commit 04e71b3db8
189 changed files with 24484 additions and 8162 deletions

View File

@@ -117,28 +117,28 @@ public class MobileDataStateTracker extends NetworkStateTracker {
mMobileDataState = state;
switch (state) {
case DISCONNECTED:
setDetailedState(DetailedState.DISCONNECTED, reason, apnName);
if (mInterfaceName != null) {
NetworkUtils.resetConnections(mInterfaceName);
}
mInterfaceName = null;
mDefaultGatewayAddr = 0;
break;
case CONNECTING:
setDetailedState(DetailedState.CONNECTING, reason, apnName);
break;
case SUSPENDED:
setDetailedState(DetailedState.SUSPENDED, reason, apnName);
break;
case CONNECTED:
mInterfaceName = intent.getStringExtra(Phone.DATA_IFACE_NAME_KEY);
if (mInterfaceName == null) {
Log.d(TAG, "CONNECTED event did not supply interface name.");
}
setupDnsProperties();
setDetailedState(DetailedState.CONNECTED, reason, apnName);
break;
case DISCONNECTED:
setDetailedState(DetailedState.DISCONNECTED, reason, apnName);
if (mInterfaceName != null) {
NetworkUtils.resetConnections(mInterfaceName);
}
mInterfaceName = null;
mDefaultGatewayAddr = 0;
break;
case CONNECTING:
setDetailedState(DetailedState.CONNECTING, reason, apnName);
break;
case SUSPENDED:
setDetailedState(DetailedState.SUSPENDED, reason, apnName);
break;
case CONNECTED:
mInterfaceName = intent.getStringExtra(Phone.DATA_IFACE_NAME_KEY);
if (mInterfaceName == null) {
Log.d(TAG, "CONNECTED event did not supply interface name.");
}
setupDnsProperties();
setDetailedState(DetailedState.CONNECTED, reason, apnName);
break;
}
}
} else if (intent.getAction().equals(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED)) {
@@ -199,7 +199,7 @@ public class MobileDataStateTracker extends NetworkStateTracker {
*/
public boolean isAvailable() {
getPhoneService(false);
/*
* If the phone process has crashed in the past, we'll get a
* RemoteException and need to re-reference the service.
@@ -214,7 +214,7 @@ public class MobileDataStateTracker extends NetworkStateTracker {
if (retry == 0) getPhoneService(true);
}
}
return false;
}
@@ -241,18 +241,28 @@ public class MobileDataStateTracker extends NetworkStateTracker {
* for this network.
*/
public String getTcpBufferSizesPropName() {
String networkTypeStr = "unknown";
String networkTypeStr = "unknown";
TelephonyManager tm = new TelephonyManager(mContext);
//TODO We have to edit the parameter for getNetworkType regarding CDMA
switch(tm.getNetworkType()) {
case TelephonyManager.NETWORK_TYPE_GPRS:
case TelephonyManager.NETWORK_TYPE_GPRS:
networkTypeStr = "gprs";
break;
case TelephonyManager.NETWORK_TYPE_EDGE:
case TelephonyManager.NETWORK_TYPE_EDGE:
networkTypeStr = "edge";
break;
case TelephonyManager.NETWORK_TYPE_UMTS:
case TelephonyManager.NETWORK_TYPE_UMTS:
networkTypeStr = "umts";
break;
case TelephonyManager.NETWORK_TYPE_CDMA:
networkTypeStr = "cdma";
break;
case TelephonyManager.NETWORK_TYPE_EVDO_0:
networkTypeStr = "evdo";
break;
case TelephonyManager.NETWORK_TYPE_EVDO_A:
networkTypeStr = "evdo";
break;
}
return "net.tcp.buffersize." + networkTypeStr;
}
@@ -281,7 +291,7 @@ public class MobileDataStateTracker extends NetworkStateTracker {
if (retry == 0) getPhoneService(true);
}
}
Log.w(TAG, "Failed to tear down mobile data connectivity");
return false;
}
@@ -330,7 +340,7 @@ public class MobileDataStateTracker extends NetworkStateTracker {
"Ignoring mobile radio request because could not acquire PhoneService");
break;
}
try {
return mPhoneService.setRadio(turnOn);
} catch (RemoteException e) {

View File

@@ -132,6 +132,7 @@ public final class Checkin {
BROWSER_SNAP_CENTER,
BROWSER_TEXT_SIZE_CHANGE,
BROWSER_ZOOM_OVERVIEW,
CRASHES_REPORTED,
CRASHES_TRUNCATED,
ELAPSED_REALTIME_SEC,
@@ -181,6 +182,9 @@ public final class Checkin {
MARKET_REASON_PARSE_MANIFEST_EMPTY,
MARKET_REASON_UNKNOWN,
MARKET_STALE_INSTALL_ATTEMPT,
PHONE_CDMA_REGISTERED,
PHONE_CDMA_DATA_ATTEMPTED,
PHONE_CDMA_DATA_CONNECTED,
}
}
@@ -347,3 +351,6 @@ public final class Checkin {
}
}
}

View File

@@ -2049,6 +2049,70 @@ public final class Settings {
* @hide pending API council
*/
public static final String BACKGROUND_DATA = "background_data";
/**
* The CDMA roaming mode 0 = Home Networks, CDMA default
* 1 = Roaming on Affiliated networks
* 2 = Roaming on any networks
* @hide
*/
public static final String CDMA_ROAMING_MODE = "roaming_settings";
/**
* The CDMA subscription mode 0 = RUIM/SIM (default)
* 1 = NV
* @hide
*/
public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode";
/**
* represents current active phone class
* 1 = GSM-Phone, 0 = CDMA-Phone
* @hide
*/
public static final String CURRENT_ACTIVE_PHONE = "current_active_phone";
/**
* The preferred network mode 7 = Global, CDMA default
* 4 = CDMA only
* 3 = GSM/UMTS only
* @hide
*/
public static final String PREFERRED_NETWORK_MODE =
"preferred_network_mode";
/**
* CDMA Cell Broadcast SMS
* 0 = CDMA Cell Broadcast SMS disabled
* 1 = CDMA Cell Broadcast SMS enabled
* @hide
*/
public static final String CDMA_CELL_BROADCAST_SMS =
"cdma_cell_broadcast_sms";
/**
* The cdma subscription 0 = Subscription from RUIM, when available
* 1 = Subscription from NV
* @hide
*/
public static final String PREFERRED_CDMA_SUBSCRIPTION =
"preferred_cdma_subscription";
/**
* Whether the enhanced voice privacy mode is enabled.
* 0 = normal voice privacy
* 1 = enhanced voice privacy
* @hide
*/
public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled";
/**
* Whether the TTY mode mode is enabled.
* 0 = disabled
* 1 = enabled
* @hide
*/
public static final String TTY_MODE_ENABLED = "tty_mode_enabled";
}
/**
@@ -3127,13 +3191,13 @@ public final class Settings {
throw new RuntimeException("this should never happen");
}
String imei = TelephonyManager.getDefault().getDeviceId();
if (TextUtils.isEmpty(imei)) {
String deviceId = TelephonyManager.getDefault().getDeviceId();
if (TextUtils.isEmpty(deviceId)) {
return "";
}
byte[] hashedImei = digest.digest(imei.getBytes());
String id = new String(Base64.encodeBase64(hashedImei), 0, 12);
byte[] hashedDeviceId = digest.digest(deviceId.getBytes());
String id = new String(Base64.encodeBase64(hashedDeviceId), 0, 12);
id = id.replaceAll("/", "_");
sJidResource = JID_RESOURCE_PREFIX + id;
return sJidResource;
@@ -3152,3 +3216,4 @@ public final class Settings {
return "android-" + Long.toHexString(androidId);
}
}

View File

@@ -26,7 +26,7 @@ import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.telephony.gsm.SmsMessage;
import android.telephony.SmsMessage;
import android.text.TextUtils;
import android.text.util.Regex;
import android.util.Config;
@@ -47,6 +47,10 @@ public final class Telephony {
private static final boolean DEBUG = false;
private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
// Constructor
public Telephony() {
}
/**
* Base columns for tables that contain text based SMSs.
*/
@@ -1601,3 +1605,5 @@ public final class Telephony {
}

View File

@@ -46,6 +46,9 @@ public final class AndroidRadioDataProvider extends PhoneStateListener {
private static final int RADIO_TYPE_UNKNOWN = 0;
private static final int RADIO_TYPE_GSM = 1;
private static final int RADIO_TYPE_WCDMA = 2;
private static final int RADIO_TYPE_CDMA = 3;
private static final int RADIO_TYPE_EVDO = 4;
private static final int RADIO_TYPE_1xRTT = 5;
/** Simple container for radio data */
public static final class RadioData {
@@ -102,12 +105,21 @@ public final class AndroidRadioDataProvider extends PhoneStateListener {
}
// Finally get the radio type.
//TODO We have to edit the parameter for getNetworkType regarding CDMA
int type = telephonyManager.getNetworkType();
if (type == TelephonyManager.NETWORK_TYPE_UMTS) {
radioData.radioType = RADIO_TYPE_WCDMA;
} else if (type == TelephonyManager.NETWORK_TYPE_GPRS
|| type == TelephonyManager.NETWORK_TYPE_EDGE) {
radioData.radioType = RADIO_TYPE_GSM;
} else if (type == TelephonyManager.NETWORK_TYPE_CDMA) {
radioData.radioType = RADIO_TYPE_CDMA;
} else if (type == TelephonyManager.NETWORK_TYPE_EVDO_0) {
radioData.radioType = RADIO_TYPE_EVDO;
} else if (type == TelephonyManager.NETWORK_TYPE_EVDO_A) {
radioData.radioType = RADIO_TYPE_EVDO;
} else if (type == TelephonyManager.NETWORK_TYPE_1xRTT) {
radioData.radioType = RADIO_TYPE_1xRTT;
}
// Print out what we got.

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 995 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1099,6 +1099,9 @@
<public type="anim" name="anticipate_overshoot_interpolator" id="0x010a0009" />
<public type="anim" name="bounce_interpolator" id="0x010a000a" />
<public type="drawable" name="stat_sys_vp_phone_call" id="0x0108022d" />
<public type="drawable" name="stat_sys_vp_phone_call_on_hold" id="0x0108022e" />
<!-- ===============================================================
Resources added in version 5 of the platform.
=============================================================== -->
@@ -1106,3 +1109,8 @@
<public type="attr" name="accountType" id="0x0101026c" />
</resources>

View File

@@ -97,6 +97,12 @@
<string name="PwdMmi">Password change</string>
<!-- Displayed as the title for a success/failure report changing the SIM PIN. -->
<string name="PinMmi">PIN change</string>
<string name="CnipMmi">Calling number present</string>
<string name="CnirMmi">Calling number restricted</string>
<string name="ThreeWCMmi">Three way calling</string>
<string name="RuacMmi">Rejection of undesired annoying calls</string>
<string name="CndMmi">Calling number delivery</string>
<string name="DndMmi">Do not disturb</string>
<!-- Displayed to confirm to the user that caller ID will be restricted on the next call as usual. -->
<string name="CLIRDefaultOnNextCallOn">Caller ID defaults to restricted. Next call: Restricted</string>
@@ -2290,6 +2296,7 @@
<!-- Shown in the tutorial for tap twice for zoom control. -->
<string name="tutorial_double_tap_to_zoom_message_short">Tap twice for zoom control</string>
<!-- Shown in gadget hosts (e.g. the home screen) when there was an error inflating
the gadget. -->
<string name="gadget_host_error_inflating">Error inflating widget</string>
@@ -2316,6 +2323,7 @@
ContactsProvider and GoogleContactsProvider -->
<skip />
<!-- This string appears (on two lines) when you type a number into contacts search, to let you dial the phone number you typed. The first line will be in bigger type than the second. -->
<string name="dial_number_using">Dial number\nusing <xliff:g id="number" example="555">%s</xliff:g></string>
@@ -2326,3 +2334,8 @@
<string-array translatable="false" name="carrier_locales">
</string-array>
</resources>