summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2009-05-18 21:47:50 -0700
committerWink Saville <wink@google.com>2009-05-18 21:47:50 -0700
commite9b06d754af03faf27012fbed1e7559ec1ba7c79 (patch)
tree44e2dd9f47661d5ae3e6d38a63f3592f4ded4cd2 /core
parentce2372de58ad018623748f63e61ffc70c9eb8895 (diff)
downloadframeworks_base-e9b06d754af03faf27012fbed1e7559ec1ba7c79.zip
frameworks_base-e9b06d754af03faf27012fbed1e7559ec1ba7c79.tar.gz
frameworks_base-e9b06d754af03faf27012fbed1e7559ec1ba7c79.tar.bz2
Teleca 2b changes
Diffstat (limited to 'core')
-rw-r--r--core/java/android/provider/Settings.java22
-rw-r--r--core/java/android/webkit/gears/AndroidRadioDataProvider.java10
-rw-r--r--core/java/com/android/internal/app/IBatteryStats.aidl4
-rw-r--r--core/java/com/android/internal/os/BatteryStatsImpl.java24
-rw-r--r--core/res/res/drawable/stat_ecb_mode.pngbin0 -> 625 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_data_dormant_1xrtt.pngbin0 -> 1081 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_data_dormant_evdo.pngbin0 -> 1008 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_roaming_cdma_0.pngbin0 -> 377 bytes
-rw-r--r--core/res/res/drawable/stat_sys_roaming_cdma_flash.xml25
-rwxr-xr-xcore/res/res/drawable/stat_sys_roaming_cdma_flash_anim0.pngbin0 -> 150 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_roaming_cdma_flash_anim1.pngbin0 -> 377 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_cdma_0.pngbin0 -> 701 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_cdma_1.pngbin0 -> 714 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_cdma_2.pngbin0 -> 706 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_cdma_3.pngbin0 -> 702 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_cdma_4.pngbin0 -> 621 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_evdo_0.pngbin0 -> 912 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_evdo_1.pngbin0 -> 925 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_evdo_2.pngbin0 -> 904 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_evdo_3.pngbin0 -> 907 bytes
-rwxr-xr-xcore/res/res/drawable/stat_sys_signal_evdo_4.pngbin0 -> 823 bytes
-rw-r--r--core/res/res/values/arrays.xml3
-rw-r--r--core/res/res/xml/eri.xml118
23 files changed, 193 insertions, 13 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index ed5520d..2a47b42 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -2069,15 +2069,31 @@ public final class Settings {
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
+ * The preferred network mode 7 = Global
+ * 6 = EvDo only
+ * 5 = CDMA w/o EvDo
+ * 4 = CDMA / EvDo auto
+ * 3 = GSM / WCDMA auto
+ * 2 = WCDMA only
+ * 1 = GSM only
+ * 0 = GSM / WCDMA preferred
* @hide
*/
public static final String PREFERRED_NETWORK_MODE =
"preferred_network_mode";
/**
+ * The preferred TTY mode 0 = TTy Off, CDMA default
+ * 1 = TTY Full
+ * 2 = TTY HCO
+ * 3 = TTY VCO
+ * @hide
+ */
+ public static final String PREFERRED_TTY_MODE =
+ "preferred_tty_mode";
+
+
+ /**
* CDMA Cell Broadcast SMS
* 0 = CDMA Cell Broadcast SMS disabled
* 1 = CDMA Cell Broadcast SMS enabled
diff --git a/core/java/android/webkit/gears/AndroidRadioDataProvider.java b/core/java/android/webkit/gears/AndroidRadioDataProvider.java
index 2d431a8..1384042 100644
--- a/core/java/android/webkit/gears/AndroidRadioDataProvider.java
+++ b/core/java/android/webkit/gears/AndroidRadioDataProvider.java
@@ -28,6 +28,7 @@ package android.webkit.gears;
import android.content.Context;
import android.telephony.CellLocation;
import android.telephony.ServiceState;
+import android.telephony.SignalStrength;
import android.telephony.gsm.GsmCellLocation;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
@@ -54,6 +55,7 @@ public final class AndroidRadioDataProvider extends PhoneStateListener {
public static final class RadioData {
public int cellId = -1;
public int locationAreaCode = -1;
+ // TODO: use new SignalStrength instead of asu
public int signalStrength = -1;
public int mobileCountryCode = -1;
public int mobileNetworkCode = -1;
@@ -179,6 +181,7 @@ public final class AndroidRadioDataProvider extends PhoneStateListener {
private CellLocation cellLocation = null;
/** The last known signal strength */
+ // TODO: use new SignalStrength instead of asu
private int signalStrength = -1;
/** The last known serviceState */
@@ -207,7 +210,7 @@ public final class AndroidRadioDataProvider extends PhoneStateListener {
// Register for cell id, signal strength and service state changed
// notifications.
telephonyManager.listen(this, PhoneStateListener.LISTEN_CELL_LOCATION
- | PhoneStateListener.LISTEN_SIGNAL_STRENGTH
+ | PhoneStateListener.LISTEN_SIGNAL_STRENGTHS
| PhoneStateListener.LISTEN_SERVICE_STATE);
}
@@ -226,8 +229,9 @@ public final class AndroidRadioDataProvider extends PhoneStateListener {
}
@Override
- public void onSignalStrengthChanged(int asu) {
- signalStrength = asu;
+ public void onSignalStrengthsChanged(SignalStrength ss) {
+ int gsmSignalStrength = ss.getGsmSignalStrength();
+ signalStrength = (gsmSignalStrength == 99 ? -1 : gsmSignalStrength);
notifyListeners();
}
diff --git a/core/java/com/android/internal/app/IBatteryStats.aidl b/core/java/com/android/internal/app/IBatteryStats.aidl
index e1ff2a5..ce32754 100644
--- a/core/java/com/android/internal/app/IBatteryStats.aidl
+++ b/core/java/com/android/internal/app/IBatteryStats.aidl
@@ -18,6 +18,8 @@ package com.android.internal.app;
import com.android.internal.os.BatteryStatsImpl;
+import android.telephony.SignalStrength;
+
interface IBatteryStats {
byte[] getStatistics();
void noteStartWakelock(int uid, String name, int type);
@@ -33,7 +35,7 @@ interface IBatteryStats {
void noteUserActivity(int uid, int event);
void notePhoneOn();
void notePhoneOff();
- void notePhoneSignalStrength(int asu);
+ void notePhoneSignalStrength(in SignalStrength signalStrength);
void notePhoneDataConnectionState(int dataType, boolean hasData);
void noteWifiOn(int uid);
void noteWifiOff(int uid);
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index e8356a2..edc9ec9 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -23,6 +23,7 @@ import android.os.ParcelFormatException;
import android.os.Parcelable;
import android.os.Process;
import android.os.SystemClock;
+import android.telephony.SignalStrength;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.util.PrintWriterPrinter;
@@ -982,14 +983,25 @@ public final class BatteryStatsImpl extends BatteryStats {
}
}
- public void notePhoneSignalStrengthLocked(int asu) {
+ public void notePhoneSignalStrengthLocked(SignalStrength signalStrength) {
// Bin the strength.
int bin;
- if (asu < 0 || asu >= 99) bin = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
- else if (asu >= 16) bin = SIGNAL_STRENGTH_GREAT;
- else if (asu >= 8) bin = SIGNAL_STRENGTH_GOOD;
- else if (asu >= 4) bin = SIGNAL_STRENGTH_MODERATE;
- else bin = SIGNAL_STRENGTH_POOR;
+
+ if (!signalStrength.isGsm()) {
+ int dBm = signalStrength.getCdmaDbm();
+ if (dBm >= -75) bin = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ else if (dBm >= -85) bin = SIGNAL_STRENGTH_GREAT;
+ else if (dBm >= -95) bin = SIGNAL_STRENGTH_GOOD;
+ else if (dBm >= -100) bin = SIGNAL_STRENGTH_MODERATE;
+ else bin = SIGNAL_STRENGTH_POOR;
+ } else {
+ int asu = signalStrength.getGsmSignalStrength();
+ if (asu < 0 || asu >= 99) bin = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ else if (asu >= 16) bin = SIGNAL_STRENGTH_GREAT;
+ else if (asu >= 8) bin = SIGNAL_STRENGTH_GOOD;
+ else if (asu >= 4) bin = SIGNAL_STRENGTH_MODERATE;
+ else bin = SIGNAL_STRENGTH_POOR;
+ }
if (mPhoneSignalStrengthBin != bin) {
if (mPhoneSignalStrengthBin >= 0) {
mPhoneSignalStrengthsTimer[mPhoneSignalStrengthBin].stopRunningLocked(this);
diff --git a/core/res/res/drawable/stat_ecb_mode.png b/core/res/res/drawable/stat_ecb_mode.png
new file mode 100644
index 0000000..a948770
--- /dev/null
+++ b/core/res/res/drawable/stat_ecb_mode.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_data_dormant_1xrtt.png b/core/res/res/drawable/stat_sys_data_dormant_1xrtt.png
new file mode 100755
index 0000000..11c2eae
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_data_dormant_1xrtt.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_data_dormant_evdo.png b/core/res/res/drawable/stat_sys_data_dormant_evdo.png
new file mode 100755
index 0000000..811fcb5
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_data_dormant_evdo.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_roaming_cdma_0.png b/core/res/res/drawable/stat_sys_roaming_cdma_0.png
new file mode 100755
index 0000000..c61cce7
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_roaming_cdma_0.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_roaming_cdma_flash.xml b/core/res/res/drawable/stat_sys_roaming_cdma_flash.xml
new file mode 100644
index 0000000..07dc446
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_roaming_cdma_flash.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/res/drawable/stat_sys_battery.xml
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<animation-list
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:oneshot="false">
+ <item android:drawable="@drawable/stat_sys_roaming_cdma_flash_anim0" android:duration="800" />
+ <item android:drawable="@drawable/stat_sys_roaming_cdma_flash_anim1" android:duration="1200" />
+</animation-list>
diff --git a/core/res/res/drawable/stat_sys_roaming_cdma_flash_anim0.png b/core/res/res/drawable/stat_sys_roaming_cdma_flash_anim0.png
new file mode 100755
index 0000000..d62502d
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_roaming_cdma_flash_anim0.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_roaming_cdma_flash_anim1.png b/core/res/res/drawable/stat_sys_roaming_cdma_flash_anim1.png
new file mode 100755
index 0000000..c61cce7
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_roaming_cdma_flash_anim1.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_cdma_0.png b/core/res/res/drawable/stat_sys_signal_cdma_0.png
new file mode 100755
index 0000000..0ef7d53
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_cdma_0.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_cdma_1.png b/core/res/res/drawable/stat_sys_signal_cdma_1.png
new file mode 100755
index 0000000..f4839d4
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_cdma_1.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_cdma_2.png b/core/res/res/drawable/stat_sys_signal_cdma_2.png
new file mode 100755
index 0000000..e25a99c
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_cdma_2.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_cdma_3.png b/core/res/res/drawable/stat_sys_signal_cdma_3.png
new file mode 100755
index 0000000..d828d99
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_cdma_3.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_cdma_4.png b/core/res/res/drawable/stat_sys_signal_cdma_4.png
new file mode 100755
index 0000000..53a31ea
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_cdma_4.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_evdo_0.png b/core/res/res/drawable/stat_sys_signal_evdo_0.png
new file mode 100755
index 0000000..1b8aec7
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_evdo_0.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_evdo_1.png b/core/res/res/drawable/stat_sys_signal_evdo_1.png
new file mode 100755
index 0000000..7ce01fd
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_evdo_1.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_evdo_2.png b/core/res/res/drawable/stat_sys_signal_evdo_2.png
new file mode 100755
index 0000000..890cd59
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_evdo_2.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_evdo_3.png b/core/res/res/drawable/stat_sys_signal_evdo_3.png
new file mode 100755
index 0000000..712c640
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_evdo_3.png
Binary files differ
diff --git a/core/res/res/drawable/stat_sys_signal_evdo_4.png b/core/res/res/drawable/stat_sys_signal_evdo_4.png
new file mode 100755
index 0000000..f0537dd
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_signal_evdo_4.png
Binary files differ
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index 7db73f0..eb94812 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -110,7 +110,10 @@
<item><xliff:g id="id">alarm_clock</xliff:g></item>
<item><xliff:g id="id">battery</xliff:g></item>
<item><xliff:g id="id">phone_signal</xliff:g></item>
+ <item><xliff:g id="id">phone_evdo_signal</xliff:g></item>
<item><xliff:g id="id">data_connection</xliff:g></item>
+ <item><xliff:g id="id">cdma_eri</xliff:g></item>
+ <item><xliff:g id="id">tty</xliff:g></item>
<item><xliff:g id="id">volume</xliff:g></item>
<item><xliff:g id="id">mute</xliff:g></item>
<item><xliff:g id="id">speakerphone</xliff:g></item>
diff --git a/core/res/res/xml/eri.xml b/core/res/res/xml/eri.xml
new file mode 100644
index 0000000..cd66f14
--- /dev/null
+++ b/core/res/res/xml/eri.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- Note that IconMode can be only 0, ON or 1, FLASHING
+ The icon is turned OFF if then IconIndex = 1 -->
+
+<EriFile VersionNumber="1357"
+ NumberOfEriEntries="12"
+ EriFileType="1">
+
+ <CallPromptId Id="0"
+ CallPromptText="CallPromptId0"/>
+
+ <CallPromptId Id="1"
+ CallPromptText="CallPromptId1"/>
+
+ <CallPromptId Id="2"
+ CallPromptText="CallPromptId2"/>
+
+ <EriInfo RoamingIndicator="64"
+ IconIndex="1"
+ IconMode="0"
+ EriText="T-CDMA 64"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="65"
+ IconIndex="65"
+ IconMode="0"
+ EriText="T-CDMA 65"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="66"
+ IconIndex="1"
+ IconMode="0"
+ EriText="T-CDMA Ext 66"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="67"
+ IconIndex="67"
+ IconMode="0"
+ EriText="T-CDMA Ext 67"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="68"
+ IconIndex="68"
+ IconMode="0"
+ EriText="T-CDMA Roam 68"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="69"
+ IconIndex="69"
+ IconMode="1"
+ EriText="T-CDMA Ext 69"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="70"
+ IconIndex="70"
+ IconMode="1"
+ EriText="T-CDMA Roam 70"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="71"
+ IconIndex="1"
+ IconMode="0"
+ EriText="T-CDMA Ext 71"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="72"
+ IconIndex="72"
+ IconMode="0"
+ EriText="T-CDMA Ext 72"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="73"
+ IconIndex="73"
+ IconMode="0"
+ EriText="T-CDMA Roam 73"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="74"
+ IconIndex="74"
+ IconMode="1"
+ EriText="T-CDMA Ext 74"
+ CallPromptId="0"
+ AlertId="0"/>
+
+ <EriInfo RoamingIndicator="75"
+ IconIndex="75"
+ IconMode="1"
+ EriText="T-CDMA Roam 75"
+ CallPromptId="0"
+ AlertId="0"/>
+
+</EriFile>