summaryrefslogtreecommitdiffstats
path: root/telephony/java/android
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2010-10-28 14:22:26 -0700
committerWink Saville <wink@google.com>2010-11-01 11:46:57 -0700
commitfd2d01302781af91d77557a99874111a4fee8365 (patch)
tree89b38e3aff99a443627ac53268d009dec9ea07eb /telephony/java/android
parent6b21cdeb5f0127862d82f24a4b6001f495e3c8cd (diff)
downloadframeworks_base-fd2d01302781af91d77557a99874111a4fee8365.zip
frameworks_base-fd2d01302781af91d77557a99874111a4fee8365.tar.gz
frameworks_base-fd2d01302781af91d77557a99874111a4fee8365.tar.bz2
Add PhoneStateListener.onOtaspChanged.
Bug: 3102320 Change-Id: I46e8d33a4ed80e5e074e92135653d57598d4c865
Diffstat (limited to 'telephony/java/android')
-rw-r--r--telephony/java/android/telephony/PhoneStateListener.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 38f44d8..eda9b71 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -148,6 +148,14 @@ public class PhoneStateListener {
*/
public static final int LISTEN_SIGNAL_STRENGTHS = 0x00000100;
+ /**
+ * Listen for changes to OTASP mode.
+ *
+ * @see #onOtaspChanged
+ * @hide
+ */
+ public static final int LISTEN_OTASP_CHANGED = 0x00000200;
+
public PhoneStateListener() {
}
@@ -252,6 +260,21 @@ public class PhoneStateListener {
// default implementation empty
}
+
+ /**
+ * The Over The Air Service Provisioning (OTASP) has changed. Requires
+ * the READ_PHONE_STATE permission.
+ * @param otaspMode is integer <code>OTASP_UNKNOWN=1<code>
+ * means the value is currently unknown and the system should wait until
+ * <code>OTASP_NEEDED=2<code> or <code>OTASP_NOT_NEEDED=3<code> is received before
+ * making the decisision to perform OTASP or not.
+ *
+ * @hide
+ */
+ public void onOtaspChanged(int otaspMode) {
+ // default implementation empty
+ }
+
/**
* The callback methods need to be called on the handler thread where
* this object was created. If the binder did that for us it'd be nice.
@@ -292,9 +315,14 @@ public class PhoneStateListener {
public void onDataActivity(int direction) {
Message.obtain(mHandler, LISTEN_DATA_ACTIVITY, direction, 0, null).sendToTarget();
}
+
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
Message.obtain(mHandler, LISTEN_SIGNAL_STRENGTHS, 0, 0, signalStrength).sendToTarget();
}
+
+ public void onOtaspChanged(int otaspMode) {
+ Message.obtain(mHandler, LISTEN_OTASP_CHANGED, otaspMode, 0).sendToTarget();
+ }
};
Handler mHandler = new Handler() {
@@ -329,6 +357,9 @@ public class PhoneStateListener {
case LISTEN_SIGNAL_STRENGTHS:
PhoneStateListener.this.onSignalStrengthsChanged((SignalStrength)msg.obj);
break;
+ case LISTEN_OTASP_CHANGED:
+ PhoneStateListener.this.onOtaspChanged(msg.arg1);
+ break;
}
}
};