Loading src/java/com/android/internal/telephony/RIL.java +8 −6 Original line number Diff line number Diff line Loading @@ -693,9 +693,10 @@ public class RIL extends BaseCommands implements CommandsInterface { /** * Returns a {@link RadioDataProxy}, {@link RadioMessagingProxy}, {@link RadioModemProxy}, * {@link RadioNetworkProxy}, {@link RadioSimProxy}, {@link RadioVoiceProxy}, or null if the * service is not available. * {@link RadioNetworkProxy}, {@link RadioSimProxy}, {@link RadioVoiceProxy}, or an empty {@link RadioServiceProxy} * if the service is not available. */ @NonNull public <T extends RadioServiceProxy> T getRadioServiceProxy(Class<T> serviceClass, Message result) { if (serviceClass == RadioDataProxy.class) { Loading @@ -716,16 +717,17 @@ public class RIL extends BaseCommands implements CommandsInterface { if (serviceClass == RadioVoiceProxy.class) { return (T) getRadioServiceProxy(VOICE_SERVICE, result); } return null; return (T) new RadioServiceProxy(); } /** * Returns a {@link RadioServiceProxy} or null if the service is not available. * Returns a {@link RadioServiceProxy}, which is empty if the service is not available. * For RADIO_SERVICE, use {@link #getRadioProxy} instead, as this will always return null. */ @VisibleForTesting @NonNull public synchronized RadioServiceProxy getRadioServiceProxy(int service, Message result) { if (!SubscriptionManager.isValidPhoneId(mPhoneId)) return null; if (!SubscriptionManager.isValidPhoneId(mPhoneId)) return new RadioServiceProxy(); if (!mIsCellularSupported) { if (RILJ_LOGV) riljLog("getRadioServiceProxy: Not calling getService(): wifi-only"); if (result != null) { Loading @@ -733,7 +735,7 @@ public class RIL extends BaseCommands implements CommandsInterface { CommandException.fromRilErrno(RADIO_NOT_AVAILABLE)); result.sendToTarget(); } return null; return new RadioServiceProxy(); } RadioServiceProxy serviceProxy = mServiceProxies.get(service); Loading src/java/com/android/internal/telephony/RadioDataProxy.java +2 −3 Original line number Diff line number Diff line Loading @@ -66,14 +66,13 @@ public class RadioDataProxy extends RadioServiceProxy { */ @Override public void clear() { mHalVersion = RIL.RADIO_HAL_VERSION_UNKNOWN; mRadioProxy = null; super.clear(); mDataProxy = null; } /** * Check whether a RadioData implementation exists * @return false if there is neither a HIDL nor AIDL implementation * @return true if there is neither a HIDL nor AIDL implementation */ @Override public boolean isEmpty() { Loading src/java/com/android/internal/telephony/RadioMessagingProxy.java +2 −3 Original line number Diff line number Diff line Loading @@ -58,14 +58,13 @@ public class RadioMessagingProxy extends RadioServiceProxy { */ @Override public void clear() { mHalVersion = RIL.RADIO_HAL_VERSION_UNKNOWN; mRadioProxy = null; super.clear(); mMessagingProxy = null; } /** * Check whether a RadioMessaging implementation exists * @return false if there is neither a HIDL nor AIDL implementation * @return true if there is neither a HIDL nor AIDL implementation */ @Override public boolean isEmpty() { Loading src/java/com/android/internal/telephony/RadioModemProxy.java +2 −3 Original line number Diff line number Diff line Loading @@ -53,14 +53,13 @@ public class RadioModemProxy extends RadioServiceProxy { */ @Override public void clear() { mHalVersion = RIL.RADIO_HAL_VERSION_UNKNOWN; mRadioProxy = null; super.clear(); mModemProxy = null; } /** * Check whether a RadioModem implementation exists * @return false if there is neither a HIDL nor AIDL implementation * @return true if there is neither a HIDL nor AIDL implementation */ @Override public boolean isEmpty() { Loading src/java/com/android/internal/telephony/RadioNetworkProxy.java +2 −3 Original line number Diff line number Diff line Loading @@ -86,14 +86,13 @@ public class RadioNetworkProxy extends RadioServiceProxy { */ @Override public void clear() { mHalVersion = RIL.RADIO_HAL_VERSION_UNKNOWN; mRadioProxy = null; super.clear(); mNetworkProxy = null; } /** * Check whether a RadioNetwork implementation exists * @return false if there is neither a HIDL nor AIDL implementation * @return true if there is neither a HIDL nor AIDL implementation */ @Override public boolean isEmpty() { Loading Loading
src/java/com/android/internal/telephony/RIL.java +8 −6 Original line number Diff line number Diff line Loading @@ -693,9 +693,10 @@ public class RIL extends BaseCommands implements CommandsInterface { /** * Returns a {@link RadioDataProxy}, {@link RadioMessagingProxy}, {@link RadioModemProxy}, * {@link RadioNetworkProxy}, {@link RadioSimProxy}, {@link RadioVoiceProxy}, or null if the * service is not available. * {@link RadioNetworkProxy}, {@link RadioSimProxy}, {@link RadioVoiceProxy}, or an empty {@link RadioServiceProxy} * if the service is not available. */ @NonNull public <T extends RadioServiceProxy> T getRadioServiceProxy(Class<T> serviceClass, Message result) { if (serviceClass == RadioDataProxy.class) { Loading @@ -716,16 +717,17 @@ public class RIL extends BaseCommands implements CommandsInterface { if (serviceClass == RadioVoiceProxy.class) { return (T) getRadioServiceProxy(VOICE_SERVICE, result); } return null; return (T) new RadioServiceProxy(); } /** * Returns a {@link RadioServiceProxy} or null if the service is not available. * Returns a {@link RadioServiceProxy}, which is empty if the service is not available. * For RADIO_SERVICE, use {@link #getRadioProxy} instead, as this will always return null. */ @VisibleForTesting @NonNull public synchronized RadioServiceProxy getRadioServiceProxy(int service, Message result) { if (!SubscriptionManager.isValidPhoneId(mPhoneId)) return null; if (!SubscriptionManager.isValidPhoneId(mPhoneId)) return new RadioServiceProxy(); if (!mIsCellularSupported) { if (RILJ_LOGV) riljLog("getRadioServiceProxy: Not calling getService(): wifi-only"); if (result != null) { Loading @@ -733,7 +735,7 @@ public class RIL extends BaseCommands implements CommandsInterface { CommandException.fromRilErrno(RADIO_NOT_AVAILABLE)); result.sendToTarget(); } return null; return new RadioServiceProxy(); } RadioServiceProxy serviceProxy = mServiceProxies.get(service); Loading
src/java/com/android/internal/telephony/RadioDataProxy.java +2 −3 Original line number Diff line number Diff line Loading @@ -66,14 +66,13 @@ public class RadioDataProxy extends RadioServiceProxy { */ @Override public void clear() { mHalVersion = RIL.RADIO_HAL_VERSION_UNKNOWN; mRadioProxy = null; super.clear(); mDataProxy = null; } /** * Check whether a RadioData implementation exists * @return false if there is neither a HIDL nor AIDL implementation * @return true if there is neither a HIDL nor AIDL implementation */ @Override public boolean isEmpty() { Loading
src/java/com/android/internal/telephony/RadioMessagingProxy.java +2 −3 Original line number Diff line number Diff line Loading @@ -58,14 +58,13 @@ public class RadioMessagingProxy extends RadioServiceProxy { */ @Override public void clear() { mHalVersion = RIL.RADIO_HAL_VERSION_UNKNOWN; mRadioProxy = null; super.clear(); mMessagingProxy = null; } /** * Check whether a RadioMessaging implementation exists * @return false if there is neither a HIDL nor AIDL implementation * @return true if there is neither a HIDL nor AIDL implementation */ @Override public boolean isEmpty() { Loading
src/java/com/android/internal/telephony/RadioModemProxy.java +2 −3 Original line number Diff line number Diff line Loading @@ -53,14 +53,13 @@ public class RadioModemProxy extends RadioServiceProxy { */ @Override public void clear() { mHalVersion = RIL.RADIO_HAL_VERSION_UNKNOWN; mRadioProxy = null; super.clear(); mModemProxy = null; } /** * Check whether a RadioModem implementation exists * @return false if there is neither a HIDL nor AIDL implementation * @return true if there is neither a HIDL nor AIDL implementation */ @Override public boolean isEmpty() { Loading
src/java/com/android/internal/telephony/RadioNetworkProxy.java +2 −3 Original line number Diff line number Diff line Loading @@ -86,14 +86,13 @@ public class RadioNetworkProxy extends RadioServiceProxy { */ @Override public void clear() { mHalVersion = RIL.RADIO_HAL_VERSION_UNKNOWN; mRadioProxy = null; super.clear(); mNetworkProxy = null; } /** * Check whether a RadioNetwork implementation exists * @return false if there is neither a HIDL nor AIDL implementation * @return true if there is neither a HIDL nor AIDL implementation */ @Override public boolean isEmpty() { Loading