Loading src/java/com/android/internal/telephony/DefaultPhoneNotifier.java +0 −6 Original line number Diff line number Diff line Loading @@ -194,12 +194,6 @@ public class DefaultPhoneNotifier implements PhoneNotifier { mTelephonyRegistryMgr.notifyCellInfoChanged(subId, cellInfo); } @Override public void notifyOtaspChanged(Phone sender, int otaspMode) { int subId = sender.getSubId(); mTelephonyRegistryMgr.notifyOtaspChanged(subId, otaspMode); } public void notifyPreciseCallState(Phone sender) { Call ringingCall = sender.getRingingCall(); Call foregroundCall = sender.getForegroundCall(); Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +5 −0 Original line number Diff line number Diff line Loading @@ -3503,6 +3503,11 @@ public class GsmCdmaPhone extends Phone { } } @Override public int getOtasp() { return mSST.getOtasp(); } @Override public int getCdmaEriIconIndex() { if (isPhoneTypeGsm()) { Loading src/java/com/android/internal/telephony/Phone.java +39 −1 Original line number Diff line number Diff line Loading @@ -356,6 +356,8 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private final RegistrantList mPhysicalChannelConfigRegistrants = new RegistrantList(); private final RegistrantList mOtaspRegistrants = new RegistrantList(); protected Registrant mPostDialHandler; protected final LocalLog mLocalLog; Loading Loading @@ -2360,7 +2362,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { @UnsupportedAppUsage public void notifyOtaspChanged(int otaspMode) { mNotifier.notifyOtaspChanged(this, otaspMode); mOtaspRegistrants.notifyRegistrants(new AsyncResult(null, otaspMode, null)); } public void notifyVoiceActivationStateChanged(int state) { Loading Loading @@ -2794,6 +2796,42 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { return false; } /** * Register for notifications when OTA Service Provisioning mode has changed. * * <p>The mode is integer. {@link TelephonyManager#OTASP_UNKNOWN} * means the value is currently unknown and the system should wait until * {@link TelephonyManager#OTASP_NEEDED} or {@link TelephonyManager#OTASP_NOT_NEEDED} is * received before making the decision to perform OTASP or not. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ public void registerForOtaspChange(Handler h, int what, Object obj) { checkCorrectThread(h); mOtaspRegistrants.addUnique(h, what, obj); // notify first new Registrant(h, what, obj).notifyRegistrant(new AsyncResult(null, getOtasp(), null)); } /** * Unegister for notifications when OTA Service Provisioning mode has changed. * @param h Handler to be removed from the registrant list. */ public void unregisterForOtaspChange(Handler h) { mOtaspRegistrants.remove(h); } /** * Returns the current OTA Service Provisioning mode. * * @see registerForOtaspChange */ public int getOtasp() { return TelephonyManager.OTASP_UNKNOWN; } /** * Register for notifications when CDMA call waiting comes * Loading src/java/com/android/internal/telephony/PhoneNotifier.java +0 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,6 @@ public interface PhoneNotifier { void notifyDataActivity(Phone sender); void notifyOtaspChanged(Phone sender, int otaspMode); void notifyCellInfo(Phone sender, List<CellInfo> cellInfo); void notifyPreciseCallState(Phone sender); Loading tests/telephonytests/src/com/android/internal/telephony/DefaultPhoneNotifierTest.java +0 −11 Original line number Diff line number Diff line Loading @@ -259,15 +259,4 @@ public class DefaultPhoneNotifierTest extends TelephonyTest { assertEquals(3, cellLocationCapture.getValue().getInt("cid")); assertEquals(5, cellLocationCapture.getValue().getInt("psc")); } @Test @SmallTest public void testNotifyOtaspChanged() throws Exception { mDefaultPhoneNotifierUT.notifyOtaspChanged(mPhone, TelephonyManager.OTASP_NEEDED); verify(mTelephonyRegistryManager).notifyOtaspChanged(eq(mPhone.getSubId()), eq(TelephonyManager.OTASP_NEEDED)); mDefaultPhoneNotifierUT.notifyOtaspChanged(mPhone, TelephonyManager.OTASP_UNKNOWN); verify(mTelephonyRegistryManager).notifyOtaspChanged(eq(mPhone.getSubId()), eq(TelephonyManager.OTASP_UNKNOWN)); } } Loading
src/java/com/android/internal/telephony/DefaultPhoneNotifier.java +0 −6 Original line number Diff line number Diff line Loading @@ -194,12 +194,6 @@ public class DefaultPhoneNotifier implements PhoneNotifier { mTelephonyRegistryMgr.notifyCellInfoChanged(subId, cellInfo); } @Override public void notifyOtaspChanged(Phone sender, int otaspMode) { int subId = sender.getSubId(); mTelephonyRegistryMgr.notifyOtaspChanged(subId, otaspMode); } public void notifyPreciseCallState(Phone sender) { Call ringingCall = sender.getRingingCall(); Call foregroundCall = sender.getForegroundCall(); Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +5 −0 Original line number Diff line number Diff line Loading @@ -3503,6 +3503,11 @@ public class GsmCdmaPhone extends Phone { } } @Override public int getOtasp() { return mSST.getOtasp(); } @Override public int getCdmaEriIconIndex() { if (isPhoneTypeGsm()) { Loading
src/java/com/android/internal/telephony/Phone.java +39 −1 Original line number Diff line number Diff line Loading @@ -356,6 +356,8 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private final RegistrantList mPhysicalChannelConfigRegistrants = new RegistrantList(); private final RegistrantList mOtaspRegistrants = new RegistrantList(); protected Registrant mPostDialHandler; protected final LocalLog mLocalLog; Loading Loading @@ -2360,7 +2362,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { @UnsupportedAppUsage public void notifyOtaspChanged(int otaspMode) { mNotifier.notifyOtaspChanged(this, otaspMode); mOtaspRegistrants.notifyRegistrants(new AsyncResult(null, otaspMode, null)); } public void notifyVoiceActivationStateChanged(int state) { Loading Loading @@ -2794,6 +2796,42 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { return false; } /** * Register for notifications when OTA Service Provisioning mode has changed. * * <p>The mode is integer. {@link TelephonyManager#OTASP_UNKNOWN} * means the value is currently unknown and the system should wait until * {@link TelephonyManager#OTASP_NEEDED} or {@link TelephonyManager#OTASP_NOT_NEEDED} is * received before making the decision to perform OTASP or not. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */ public void registerForOtaspChange(Handler h, int what, Object obj) { checkCorrectThread(h); mOtaspRegistrants.addUnique(h, what, obj); // notify first new Registrant(h, what, obj).notifyRegistrant(new AsyncResult(null, getOtasp(), null)); } /** * Unegister for notifications when OTA Service Provisioning mode has changed. * @param h Handler to be removed from the registrant list. */ public void unregisterForOtaspChange(Handler h) { mOtaspRegistrants.remove(h); } /** * Returns the current OTA Service Provisioning mode. * * @see registerForOtaspChange */ public int getOtasp() { return TelephonyManager.OTASP_UNKNOWN; } /** * Register for notifications when CDMA call waiting comes * Loading
src/java/com/android/internal/telephony/PhoneNotifier.java +0 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,6 @@ public interface PhoneNotifier { void notifyDataActivity(Phone sender); void notifyOtaspChanged(Phone sender, int otaspMode); void notifyCellInfo(Phone sender, List<CellInfo> cellInfo); void notifyPreciseCallState(Phone sender); Loading
tests/telephonytests/src/com/android/internal/telephony/DefaultPhoneNotifierTest.java +0 −11 Original line number Diff line number Diff line Loading @@ -259,15 +259,4 @@ public class DefaultPhoneNotifierTest extends TelephonyTest { assertEquals(3, cellLocationCapture.getValue().getInt("cid")); assertEquals(5, cellLocationCapture.getValue().getInt("psc")); } @Test @SmallTest public void testNotifyOtaspChanged() throws Exception { mDefaultPhoneNotifierUT.notifyOtaspChanged(mPhone, TelephonyManager.OTASP_NEEDED); verify(mTelephonyRegistryManager).notifyOtaspChanged(eq(mPhone.getSubId()), eq(TelephonyManager.OTASP_NEEDED)); mDefaultPhoneNotifierUT.notifyOtaspChanged(mPhone, TelephonyManager.OTASP_UNKNOWN); verify(mTelephonyRegistryManager).notifyOtaspChanged(eq(mPhone.getSubId()), eq(TelephonyManager.OTASP_UNKNOWN)); } }