summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-10 20:34:09 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-10 20:34:09 -0700
commitf9bbc3189f0b11b0eaf611c6a144a2cec2f9f66a (patch)
treeeba62f53cbce0b9ab6793d7bab4f9e7bcc694a6e /src/com
parent78fd96a1c5dd7b03fa09d8b3116243cc9661c5e6 (diff)
parent21dd407c10bb1bade10233e8468ea6729bcf71ef (diff)
downloadpackages_apps_settings-f9bbc3189f0b11b0eaf611c6a144a2cec2f9f66a.zip
packages_apps_settings-f9bbc3189f0b11b0eaf611c6a144a2cec2f9f66a.tar.gz
packages_apps_settings-f9bbc3189f0b11b0eaf611c6a144a2cec2f9f66a.tar.bz2
Merge change 3494 into donut
* changes: Use Phone.[get|set]SmscAddress() instead of OEMHookRaw.
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/RadioInfo.java41
1 files changed, 3 insertions, 38 deletions
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java
index 79327f2..257122b 100644
--- a/src/com/android/settings/RadioInfo.java
+++ b/src/com/android/settings/RadioInfo.java
@@ -239,8 +239,7 @@ public class RadioInfo extends Activity {
if (ar.exception != null) {
smsc.setText("refresh error");
} else {
- byte[] buf = (byte[]) ar.result;
- smsc.setText(new String(buf));
+ smsc.setText((String)ar.result);
}
break;
case EVENT_UPDATE_SMSC_DONE:
@@ -272,9 +271,6 @@ public class RadioInfo extends Activity {
final int OEM_QXDM_SDLOG_LEN = 4;
final int OEM_PS_AUTO_ATTACH_FUNCTAG = 0x00020000;
final int OEM_CIPHERING_FUNCTAG = 0x00020001;
- final int OEM_SMSC_UPDATE_FUNCTAG = 0x00020002;
- final int OEM_SMSC_QUERY_FUNCTAG = 0x00020003;
- final int OEM_SMSC_QUERY_LEN = 0;
/**
* The OEM interface to store QXDM to SD.
@@ -339,32 +335,6 @@ public class RadioInfo extends Activity {
return bos.toByteArray();
}
- byte[] getSmscQueryData() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(bos);
- try {
- writeIntLittleEndian(dos, OEM_SMSC_QUERY_FUNCTAG);
- writeIntLittleEndian(dos, OEM_SMSC_QUERY_LEN * SIZE_OF_INT);
- } catch (IOException e) {
- return null;
- }
- return bos.toByteArray();
- }
-
- byte[] getSmscUpdateData(String smsc) {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(bos);
- try {
- byte[] smsc_bytes = smsc.getBytes();
- writeIntLittleEndian(dos, OEM_SMSC_UPDATE_FUNCTAG);
- writeIntLittleEndian(dos, smsc_bytes.length);
- dos.write(smsc_bytes);
- } catch (IOException e) {
- return null;
- }
- return bos.toByteArray();
- }
-
byte[] getPsAutoAttachData(boolean enable) {
return getSimpleFeatureData(OEM_PS_AUTO_ATTACH_FUNCTAG, enable);
}
@@ -894,10 +864,7 @@ public class RadioInfo extends Activity {
}
private void refreshSmsc() {
- byte[] data = mOem.getSmscQueryData();
- if (data == null) return;
- phone.invokeOemRilRequestRaw(data,
- mHandler.obtainMessage(EVENT_QUERY_SMSC_DONE));
+ phone.getSmscAddress(mHandler.obtainMessage(EVENT_QUERY_SMSC_DONE));
}
private final void updatePingState() {
@@ -1141,9 +1108,7 @@ public class RadioInfo extends Activity {
OnClickListener mUpdateSmscButtonHandler = new OnClickListener() {
public void onClick(View v) {
updateSmscButton.setEnabled(false);
- byte[] data = mOem.getSmscUpdateData(smsc.getText().toString());
- if (data == null) return;
- phone.invokeOemRilRequestRaw(data,
+ phone.setSmscAddress(smsc.getText().toString(),
mHandler.obtainMessage(EVENT_UPDATE_SMSC_DONE));
}
};