Loading src/java/com/android/internal/telephony/BaseCommands.java +4 −2 Original line number Diff line number Diff line Loading @@ -792,15 +792,17 @@ public abstract class BaseCommands implements CommandsInterface { * RadioState has 3 values : RADIO_OFF, RADIO_UNAVAILABLE, RADIO_ON. * * @param newState new RadioState decoded from RIL_UNSOL_RADIO_STATE_CHANGED * @param forceNotifyRegistrants boolean indicating if registrants should be notified even if * there is no change in state */ protected void setRadioState(RadioState newState) { protected void setRadioState(RadioState newState, boolean forceNotifyRegistrants) { RadioState oldState; synchronized (mStateMonitor) { oldState = mState; mState = newState; if (oldState == mState) { if (oldState == mState && !forceNotifyRegistrants) { // no state transition return; } Loading src/java/com/android/internal/telephony/RIL.java +2 −2 Original line number Diff line number Diff line Loading @@ -353,7 +353,7 @@ public class RIL extends BaseCommands implements CommandsInterface { // increment the cookie so that death notification can be ignored mRadioProxyCookie.incrementAndGet(); setRadioState(RadioState.RADIO_UNAVAILABLE); setRadioState(RadioState.RADIO_UNAVAILABLE, true /* forceNotifyRegistrants */); RILRequest.resetSerial(); // Clear request list on close Loading Loading @@ -4188,7 +4188,7 @@ public class RIL extends BaseCommands implements CommandsInterface { } break; case RIL_REQUEST_SHUTDOWN: setRadioState(RadioState.RADIO_UNAVAILABLE); setRadioState(RadioState.RADIO_UNAVAILABLE, false /* forceNotifyRegistrants */); break; } Loading src/java/com/android/internal/telephony/RadioIndication.java +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class RadioIndication extends IRadioIndication.Stub { newState); } mRil.setRadioState(newState); mRil.setRadioState(newState, false /* forceNotifyRegistrants */); } public void callStateChanged(int indicationType) { Loading src/java/com/android/internal/telephony/test/SimulatedCommands.java +5 −5 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ public class SimulatedCommands extends BaseCommands simulatedCallState = new SimulatedGsmCallState(looper); setRadioState(RadioState.RADIO_ON); setRadioState(RadioState.RADIO_ON, false /* forceNotifyRegistrants */); mSimLockedState = INITIAL_LOCK_STATE; mSimLockEnabled = (mSimLockedState != SimLockState.NONE); mPinCode = DEFAULT_SIM_PIN_CODE; Loading Loading @@ -1241,9 +1241,9 @@ public class SimulatedCommands extends BaseCommands } if(on) { setRadioState(RadioState.RADIO_ON); setRadioState(RadioState.RADIO_ON, false /* forceNotifyRegistrants */); } else { setRadioState(RadioState.RADIO_OFF); setRadioState(RadioState.RADIO_OFF, false /* forceNotifyRegistrants */); } resultSuccess(result, null); } Loading Loading @@ -1599,7 +1599,7 @@ public class SimulatedCommands extends BaseCommands @Override public void shutdown() { setRadioState(RadioState.RADIO_UNAVAILABLE); setRadioState(RadioState.RADIO_UNAVAILABLE, false /* forceNotifyRegistrants */); Looper looper = mHandlerThread.getLooper(); if (looper != null) { looper.quit(); Loading Loading @@ -2024,7 +2024,7 @@ public class SimulatedCommands extends BaseCommands @Override public void requestShutdown(Message result) { setRadioState(RadioState.RADIO_UNAVAILABLE); setRadioState(RadioState.RADIO_UNAVAILABLE, false /* forceNotifyRegistrants */); } @Override Loading Loading
src/java/com/android/internal/telephony/BaseCommands.java +4 −2 Original line number Diff line number Diff line Loading @@ -792,15 +792,17 @@ public abstract class BaseCommands implements CommandsInterface { * RadioState has 3 values : RADIO_OFF, RADIO_UNAVAILABLE, RADIO_ON. * * @param newState new RadioState decoded from RIL_UNSOL_RADIO_STATE_CHANGED * @param forceNotifyRegistrants boolean indicating if registrants should be notified even if * there is no change in state */ protected void setRadioState(RadioState newState) { protected void setRadioState(RadioState newState, boolean forceNotifyRegistrants) { RadioState oldState; synchronized (mStateMonitor) { oldState = mState; mState = newState; if (oldState == mState) { if (oldState == mState && !forceNotifyRegistrants) { // no state transition return; } Loading
src/java/com/android/internal/telephony/RIL.java +2 −2 Original line number Diff line number Diff line Loading @@ -353,7 +353,7 @@ public class RIL extends BaseCommands implements CommandsInterface { // increment the cookie so that death notification can be ignored mRadioProxyCookie.incrementAndGet(); setRadioState(RadioState.RADIO_UNAVAILABLE); setRadioState(RadioState.RADIO_UNAVAILABLE, true /* forceNotifyRegistrants */); RILRequest.resetSerial(); // Clear request list on close Loading Loading @@ -4188,7 +4188,7 @@ public class RIL extends BaseCommands implements CommandsInterface { } break; case RIL_REQUEST_SHUTDOWN: setRadioState(RadioState.RADIO_UNAVAILABLE); setRadioState(RadioState.RADIO_UNAVAILABLE, false /* forceNotifyRegistrants */); break; } Loading
src/java/com/android/internal/telephony/RadioIndication.java +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class RadioIndication extends IRadioIndication.Stub { newState); } mRil.setRadioState(newState); mRil.setRadioState(newState, false /* forceNotifyRegistrants */); } public void callStateChanged(int indicationType) { Loading
src/java/com/android/internal/telephony/test/SimulatedCommands.java +5 −5 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ public class SimulatedCommands extends BaseCommands simulatedCallState = new SimulatedGsmCallState(looper); setRadioState(RadioState.RADIO_ON); setRadioState(RadioState.RADIO_ON, false /* forceNotifyRegistrants */); mSimLockedState = INITIAL_LOCK_STATE; mSimLockEnabled = (mSimLockedState != SimLockState.NONE); mPinCode = DEFAULT_SIM_PIN_CODE; Loading Loading @@ -1241,9 +1241,9 @@ public class SimulatedCommands extends BaseCommands } if(on) { setRadioState(RadioState.RADIO_ON); setRadioState(RadioState.RADIO_ON, false /* forceNotifyRegistrants */); } else { setRadioState(RadioState.RADIO_OFF); setRadioState(RadioState.RADIO_OFF, false /* forceNotifyRegistrants */); } resultSuccess(result, null); } Loading Loading @@ -1599,7 +1599,7 @@ public class SimulatedCommands extends BaseCommands @Override public void shutdown() { setRadioState(RadioState.RADIO_UNAVAILABLE); setRadioState(RadioState.RADIO_UNAVAILABLE, false /* forceNotifyRegistrants */); Looper looper = mHandlerThread.getLooper(); if (looper != null) { looper.quit(); Loading Loading @@ -2024,7 +2024,7 @@ public class SimulatedCommands extends BaseCommands @Override public void requestShutdown(Message result) { setRadioState(RadioState.RADIO_UNAVAILABLE); setRadioState(RadioState.RADIO_UNAVAILABLE, false /* forceNotifyRegistrants */); } @Override Loading