Loading telephony/java/com/android/internal/telephony/BaseCommands.java +50 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,12 @@ public abstract class BaseCommands implements CommandsInterface { protected RegistrantList mCallWaitingInfoRegistrants = new RegistrantList(); protected RegistrantList mDisplayInfoRegistrants = new RegistrantList(); protected RegistrantList mSignalInfoRegistrants = new RegistrantList(); protected RegistrantList mNumberInfoRegistrants = new RegistrantList(); protected RegistrantList mRedirNumInfoRegistrants = new RegistrantList(); protected RegistrantList mLineControlInfoRegistrants = new RegistrantList(); protected RegistrantList mT53ClirInfoRegistrants = new RegistrantList(); protected RegistrantList mT53AudCntrlInfoRegistrants = new RegistrantList(); protected Registrant mSMSRegistrant; protected Registrant mNITZTimeRegistrant; protected Registrant mSignalStrengthRegistrant; Loading Loading @@ -509,6 +515,50 @@ public abstract class BaseCommands implements CommandsInterface { mOtaProvisionRegistrants.remove(h); } public void registerForNumberInfo(Handler h,int what, Object obj) { Registrant r = new Registrant (h, what, obj); mNumberInfoRegistrants.add(r); } public void unregisterForNumberInfo(Handler h){ mNumberInfoRegistrants.remove(h); } public void registerForRedirectedNumberInfo(Handler h,int what, Object obj) { Registrant r = new Registrant (h, what, obj); mRedirNumInfoRegistrants.add(r); } public void unregisterForRedirectedNumberInfo(Handler h) { mRedirNumInfoRegistrants.remove(h); } public void registerForLineControlInfo(Handler h, int what, Object obj) { Registrant r = new Registrant (h, what, obj); mLineControlInfoRegistrants.add(r); } public void unregisterForLineControlInfo(Handler h) { mLineControlInfoRegistrants.remove(h); } public void registerFoT53ClirlInfo(Handler h,int what, Object obj) { Registrant r = new Registrant (h, what, obj); mT53ClirInfoRegistrants.add(r); } public void unregisterForT53ClirInfo(Handler h) { mT53ClirInfoRegistrants.remove(h); } public void registerForT53AudioControlInfo(Handler h,int what, Object obj) { Registrant r = new Registrant (h, what, obj); mT53AudCntrlInfoRegistrants.add(r); } public void unregisterForT53AudioControlInfo(Handler h) { mT53AudCntrlInfoRegistrants.remove(h); } //***** Protected Methods /** Loading telephony/java/com/android/internal/telephony/Call.java +49 −3 Original line number Diff line number Diff line Loading @@ -46,6 +46,13 @@ public abstract class Call { public State state = State.IDLE; // Flag to indicate if the current calling/caller information // is accurate. If false the information is known to be accurate. // // For CDMA, during call waiting/3 way, there is no network response // if call waiting is answered, network timed out, dropped, 3 way // merged, etc. protected boolean isGeneric = false; /* Instance Methods */ Loading Loading @@ -126,6 +133,7 @@ public abstract class Call { if (t < time) { earliest = c; time = t; } } Loading Loading @@ -157,10 +165,8 @@ public abstract class Call { public long getEarliestConnectTime() { List l; long time = Long.MAX_VALUE; l = getConnections(); List l = getConnections(); if (l.size() == 0) { return 0; Loading Loading @@ -189,4 +195,44 @@ public abstract class Call { return getState().isRinging(); } /** * Returns the Connection associated with this Call that was created * last, or null if there are no Connections in this Call */ public Connection getLatestConnection() { List l = getConnections(); if (l.size() == 0) { return null; } long time = 0; Connection latest = null; for (int i = 0, s = l.size() ; i < s ; i++) { Connection c = (Connection) l.get(i); long t = c.getCreateTime(); if (t > time) { latest = c; time = t; } } return latest; } /** * To indicate if the connection information is accurate * or not. false means accurate. Only used for CDMA. */ public boolean isGeneric() { return isGeneric; } /** * Set the generic instance variable */ public void setGeneric(boolean generic) { isGeneric = generic; } } telephony/java/com/android/internal/telephony/CallTracker.java +15 −14 Original line number Diff line number Diff line Loading @@ -57,7 +57,8 @@ public abstract class CallTracker extends Handler { protected static final int EVENT_SEPARATE_RESULT = 12; protected static final int EVENT_ECT_RESULT = 13; protected static final int EVENT_EXIT_ECM_RESPONSE_CDMA = 14; protected static final int EVENT_CALL_WAITING_INFO_CDMA = 15; protected static final int EVENT_THREE_WAY_DIAL_L2_RESULT_CDMA = 16; protected void pollCallsWhenSafe() { needsPoll = true; Loading telephony/java/com/android/internal/telephony/CommandsInterface.java +55 −0 Original line number Diff line number Diff line Loading @@ -465,6 +465,61 @@ public interface CommandsInterface { void registerForSignalInfo(Handler h, int what, Object obj); void unregisterForSignalInfo(Handler h); /** * Registers the handler for CDMA number information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerForNumberInfo(Handler h, int what, Object obj); void unregisterForNumberInfo(Handler h); /** * Registers the handler for CDMA redirected number Information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerForRedirectedNumberInfo(Handler h, int what, Object obj); void unregisterForRedirectedNumberInfo(Handler h); /** * Registers the handler for CDMA line control information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerForLineControlInfo(Handler h, int what, Object obj); void unregisterForLineControlInfo(Handler h); /** * Registers the handler for CDMA T53 CLIR information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerFoT53ClirlInfo(Handler h, int what, Object obj); void unregisterForT53ClirInfo(Handler h); /** * Registers the handler for CDMA T53 audio control information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerForT53AudioControlInfo(Handler h, int what, Object obj); void unregisterForT53AudioControlInfo(Handler h); /** * Fires on if Modem enters Emergency Callback mode */ Loading telephony/java/com/android/internal/telephony/Phone.java +108 −3 Original line number Diff line number Diff line Loading @@ -1350,9 +1350,13 @@ public interface Phone { /** * Retrieves the MIN for CDMA phones. */ String getCdmaMin(); /** * Retrieves PRL Version for CDMA phones */ String getCdmaPrlVersion(); /** * Retrieves the ESN for CDMA phones. */ Loading Loading @@ -1464,14 +1468,12 @@ public interface Phone { * @param what User-defined message code. * @param obj User object. */ // TODO(Moto) TODO: Remove when generic implemented void registerForCallWaiting(Handler h, int what, Object obj); /** * Unegister for notifications when CDMA Call waiting comes * @param h Handler to be removed from the registrant list. */ // TODO(Moto): Remove when generic implemented void unregisterForCallWaiting(Handler h); Loading Loading @@ -1513,6 +1515,109 @@ public interface Phone { */ void unregisterForDisplayInfo(Handler h) ; /** * Register for CDMA number information record notification from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaNumberInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerForNumberInfo(Handler h, int what, Object obj); /** * Unregisters for number information record notifications. * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForNumberInfo(Handler h); /** * Register for CDMA redirected number information record notification * from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaRedirectingNumberInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerForRedirectedNumberInfo(Handler h, int what, Object obj); /** * Unregisters for redirected number information record notification. * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForRedirectedNumberInfo(Handler h); /** * Register for CDMA line control information record notification * from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaLineControlInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerForLineControlInfo(Handler h, int what, Object obj); /** * Unregisters for line control information notifications. * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForLineControlInfo(Handler h); /** * Register for CDMA T53 CLIR information record notifications * from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaT53ClirInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerFoT53ClirlInfo(Handler h, int what, Object obj); /** * Unregisters for T53 CLIR information record notification * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForT53ClirInfo(Handler h); /** * Register for CDMA T53 audio control information record notifications * from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaT53AudioControlInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerForT53AudioControlInfo(Handler h, int what, Object obj); /** * Unregisters for T53 audio control information record notifications. * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForT53AudioControlInfo(Handler h); /** * registers for exit emergency call back mode request response Loading Loading
telephony/java/com/android/internal/telephony/BaseCommands.java +50 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,12 @@ public abstract class BaseCommands implements CommandsInterface { protected RegistrantList mCallWaitingInfoRegistrants = new RegistrantList(); protected RegistrantList mDisplayInfoRegistrants = new RegistrantList(); protected RegistrantList mSignalInfoRegistrants = new RegistrantList(); protected RegistrantList mNumberInfoRegistrants = new RegistrantList(); protected RegistrantList mRedirNumInfoRegistrants = new RegistrantList(); protected RegistrantList mLineControlInfoRegistrants = new RegistrantList(); protected RegistrantList mT53ClirInfoRegistrants = new RegistrantList(); protected RegistrantList mT53AudCntrlInfoRegistrants = new RegistrantList(); protected Registrant mSMSRegistrant; protected Registrant mNITZTimeRegistrant; protected Registrant mSignalStrengthRegistrant; Loading Loading @@ -509,6 +515,50 @@ public abstract class BaseCommands implements CommandsInterface { mOtaProvisionRegistrants.remove(h); } public void registerForNumberInfo(Handler h,int what, Object obj) { Registrant r = new Registrant (h, what, obj); mNumberInfoRegistrants.add(r); } public void unregisterForNumberInfo(Handler h){ mNumberInfoRegistrants.remove(h); } public void registerForRedirectedNumberInfo(Handler h,int what, Object obj) { Registrant r = new Registrant (h, what, obj); mRedirNumInfoRegistrants.add(r); } public void unregisterForRedirectedNumberInfo(Handler h) { mRedirNumInfoRegistrants.remove(h); } public void registerForLineControlInfo(Handler h, int what, Object obj) { Registrant r = new Registrant (h, what, obj); mLineControlInfoRegistrants.add(r); } public void unregisterForLineControlInfo(Handler h) { mLineControlInfoRegistrants.remove(h); } public void registerFoT53ClirlInfo(Handler h,int what, Object obj) { Registrant r = new Registrant (h, what, obj); mT53ClirInfoRegistrants.add(r); } public void unregisterForT53ClirInfo(Handler h) { mT53ClirInfoRegistrants.remove(h); } public void registerForT53AudioControlInfo(Handler h,int what, Object obj) { Registrant r = new Registrant (h, what, obj); mT53AudCntrlInfoRegistrants.add(r); } public void unregisterForT53AudioControlInfo(Handler h) { mT53AudCntrlInfoRegistrants.remove(h); } //***** Protected Methods /** Loading
telephony/java/com/android/internal/telephony/Call.java +49 −3 Original line number Diff line number Diff line Loading @@ -46,6 +46,13 @@ public abstract class Call { public State state = State.IDLE; // Flag to indicate if the current calling/caller information // is accurate. If false the information is known to be accurate. // // For CDMA, during call waiting/3 way, there is no network response // if call waiting is answered, network timed out, dropped, 3 way // merged, etc. protected boolean isGeneric = false; /* Instance Methods */ Loading Loading @@ -126,6 +133,7 @@ public abstract class Call { if (t < time) { earliest = c; time = t; } } Loading Loading @@ -157,10 +165,8 @@ public abstract class Call { public long getEarliestConnectTime() { List l; long time = Long.MAX_VALUE; l = getConnections(); List l = getConnections(); if (l.size() == 0) { return 0; Loading Loading @@ -189,4 +195,44 @@ public abstract class Call { return getState().isRinging(); } /** * Returns the Connection associated with this Call that was created * last, or null if there are no Connections in this Call */ public Connection getLatestConnection() { List l = getConnections(); if (l.size() == 0) { return null; } long time = 0; Connection latest = null; for (int i = 0, s = l.size() ; i < s ; i++) { Connection c = (Connection) l.get(i); long t = c.getCreateTime(); if (t > time) { latest = c; time = t; } } return latest; } /** * To indicate if the connection information is accurate * or not. false means accurate. Only used for CDMA. */ public boolean isGeneric() { return isGeneric; } /** * Set the generic instance variable */ public void setGeneric(boolean generic) { isGeneric = generic; } }
telephony/java/com/android/internal/telephony/CallTracker.java +15 −14 Original line number Diff line number Diff line Loading @@ -57,7 +57,8 @@ public abstract class CallTracker extends Handler { protected static final int EVENT_SEPARATE_RESULT = 12; protected static final int EVENT_ECT_RESULT = 13; protected static final int EVENT_EXIT_ECM_RESPONSE_CDMA = 14; protected static final int EVENT_CALL_WAITING_INFO_CDMA = 15; protected static final int EVENT_THREE_WAY_DIAL_L2_RESULT_CDMA = 16; protected void pollCallsWhenSafe() { needsPoll = true; Loading
telephony/java/com/android/internal/telephony/CommandsInterface.java +55 −0 Original line number Diff line number Diff line Loading @@ -465,6 +465,61 @@ public interface CommandsInterface { void registerForSignalInfo(Handler h, int what, Object obj); void unregisterForSignalInfo(Handler h); /** * Registers the handler for CDMA number information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerForNumberInfo(Handler h, int what, Object obj); void unregisterForNumberInfo(Handler h); /** * Registers the handler for CDMA redirected number Information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerForRedirectedNumberInfo(Handler h, int what, Object obj); void unregisterForRedirectedNumberInfo(Handler h); /** * Registers the handler for CDMA line control information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerForLineControlInfo(Handler h, int what, Object obj); void unregisterForLineControlInfo(Handler h); /** * Registers the handler for CDMA T53 CLIR information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerFoT53ClirlInfo(Handler h, int what, Object obj); void unregisterForT53ClirInfo(Handler h); /** * Registers the handler for CDMA T53 audio control information record * Unlike the register* methods, there's only one notification handler * * @param h Handler for notification message. * @param what User-defined message code. * @param obj User object. */ void registerForT53AudioControlInfo(Handler h, int what, Object obj); void unregisterForT53AudioControlInfo(Handler h); /** * Fires on if Modem enters Emergency Callback mode */ Loading
telephony/java/com/android/internal/telephony/Phone.java +108 −3 Original line number Diff line number Diff line Loading @@ -1350,9 +1350,13 @@ public interface Phone { /** * Retrieves the MIN for CDMA phones. */ String getCdmaMin(); /** * Retrieves PRL Version for CDMA phones */ String getCdmaPrlVersion(); /** * Retrieves the ESN for CDMA phones. */ Loading Loading @@ -1464,14 +1468,12 @@ public interface Phone { * @param what User-defined message code. * @param obj User object. */ // TODO(Moto) TODO: Remove when generic implemented void registerForCallWaiting(Handler h, int what, Object obj); /** * Unegister for notifications when CDMA Call waiting comes * @param h Handler to be removed from the registrant list. */ // TODO(Moto): Remove when generic implemented void unregisterForCallWaiting(Handler h); Loading Loading @@ -1513,6 +1515,109 @@ public interface Phone { */ void unregisterForDisplayInfo(Handler h) ; /** * Register for CDMA number information record notification from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaNumberInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerForNumberInfo(Handler h, int what, Object obj); /** * Unregisters for number information record notifications. * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForNumberInfo(Handler h); /** * Register for CDMA redirected number information record notification * from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaRedirectingNumberInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerForRedirectedNumberInfo(Handler h, int what, Object obj); /** * Unregisters for redirected number information record notification. * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForRedirectedNumberInfo(Handler h); /** * Register for CDMA line control information record notification * from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaLineControlInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerForLineControlInfo(Handler h, int what, Object obj); /** * Unregisters for line control information notifications. * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForLineControlInfo(Handler h); /** * Register for CDMA T53 CLIR information record notifications * from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaT53ClirInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerFoT53ClirlInfo(Handler h, int what, Object obj); /** * Unregisters for T53 CLIR information record notification * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForT53ClirInfo(Handler h); /** * Register for CDMA T53 audio control information record notifications * from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a CdmaInformationRecords.CdmaT53AudioControlInfoRec * instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ void registerForT53AudioControlInfo(Handler h, int what, Object obj); /** * Unregisters for T53 audio control information record notifications. * Extraneous calls are tolerated silently * * @param h Handler to be removed from the registrant list. */ void unregisterForT53AudioControlInfo(Handler h); /** * registers for exit emergency call back mode request response Loading