Loading src/java/com/android/internal/telephony/RetryManager.java +9 −8 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.internal.telephony; import android.annotation.Nullable; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.os.PersistableBundle; Loading Loading @@ -487,10 +488,9 @@ public class RetryManager { /** * Get the next APN setting for data call setup. * @return APN setting to try * @return APN setting to try. {@code null} if cannot find any APN, */ public ApnSetting getNextApnSetting() { public @Nullable ApnSetting getNextApnSetting() { if (mWaitingApns == null || mWaitingApns.size() == 0) { log("Waiting APN list is null or empty."); return null; Loading @@ -517,8 +517,10 @@ public class RetryManager { break; } // If we've already cycled through all the APNs, that means there is no APN we can try if (index == mCurrentApnIndex) return null; // If all APNs have permanently failed, bail out. if (mWaitingApns.stream().allMatch(ApnSetting::getPermanentFailed)) { return null; } } mCurrentApnIndex = index; Loading Loading @@ -566,9 +568,8 @@ public class RetryManager { break; } // If we've already cycled through all the APNs, that means all APNs have // permanently failed if (index == mCurrentApnIndex) { // If all APNs have permanently failed, bail out. if (mWaitingApns.stream().allMatch(ApnSetting::getPermanentFailed)) { log("All APNs have permanently failed."); return NO_RETRY; } Loading src/java/com/android/internal/telephony/dataconnection/ApnContext.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.internal.telephony.dataconnection; import android.annotation.Nullable; import android.net.NetworkCapabilities; import android.net.NetworkRequest; import android.os.Message; Loading Loading @@ -225,10 +226,10 @@ public class ApnContext { /** * Get the next available APN to try. * @return APN setting which will be used for data call setup. Return null if there is no * @return APN setting which will be used for data call setup.{@code null} if there is no * APN can be retried. */ public ApnSetting getNextApnSetting() { public @Nullable ApnSetting getNextApnSetting() { return mRetryManager.getNextApnSetting(); } Loading Loading
src/java/com/android/internal/telephony/RetryManager.java +9 −8 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.internal.telephony; import android.annotation.Nullable; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.os.PersistableBundle; Loading Loading @@ -487,10 +488,9 @@ public class RetryManager { /** * Get the next APN setting for data call setup. * @return APN setting to try * @return APN setting to try. {@code null} if cannot find any APN, */ public ApnSetting getNextApnSetting() { public @Nullable ApnSetting getNextApnSetting() { if (mWaitingApns == null || mWaitingApns.size() == 0) { log("Waiting APN list is null or empty."); return null; Loading @@ -517,8 +517,10 @@ public class RetryManager { break; } // If we've already cycled through all the APNs, that means there is no APN we can try if (index == mCurrentApnIndex) return null; // If all APNs have permanently failed, bail out. if (mWaitingApns.stream().allMatch(ApnSetting::getPermanentFailed)) { return null; } } mCurrentApnIndex = index; Loading Loading @@ -566,9 +568,8 @@ public class RetryManager { break; } // If we've already cycled through all the APNs, that means all APNs have // permanently failed if (index == mCurrentApnIndex) { // If all APNs have permanently failed, bail out. if (mWaitingApns.stream().allMatch(ApnSetting::getPermanentFailed)) { log("All APNs have permanently failed."); return NO_RETRY; } Loading
src/java/com/android/internal/telephony/dataconnection/ApnContext.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.internal.telephony.dataconnection; import android.annotation.Nullable; import android.net.NetworkCapabilities; import android.net.NetworkRequest; import android.os.Message; Loading Loading @@ -225,10 +226,10 @@ public class ApnContext { /** * Get the next available APN to try. * @return APN setting which will be used for data call setup. Return null if there is no * @return APN setting which will be used for data call setup.{@code null} if there is no * APN can be retried. */ public ApnSetting getNextApnSetting() { public @Nullable ApnSetting getNextApnSetting() { return mRetryManager.getNextApnSetting(); } Loading