Loading telephony/java/android/telephony/SignalStrengthUpdateRequest.java +7 −8 Original line number Diff line number Diff line Loading @@ -71,12 +71,7 @@ public final class SignalStrengthUpdateRequest implements Parcelable { @Nullable List<SignalThresholdInfo> signalThresholdInfos, boolean isReportingRequestedWhileIdle, boolean isSystemThresholdReportingRequestedWhileIdle) { // System app (like Bluetooth) can specify the request to report system thresholds while // device is idle (with permission protection). In this case, the request doesn't need to // provide a non-empty list of SignalThresholdInfo which is only asked for public apps. if (!isSystemThresholdReportingRequestedWhileIdle) { validate(signalThresholdInfos); } validate(signalThresholdInfos, isSystemThresholdReportingRequestedWhileIdle); mSignalThresholdInfos = signalThresholdInfos; mIsReportingRequestedWhileIdle = isReportingRequestedWhileIdle; Loading Loading @@ -274,8 +269,12 @@ public final class SignalStrengthUpdateRequest implements Parcelable { * Throw IAE if SignalThresholdInfo collection is null or empty, * or the SignalMeasurementType for the same RAN in the collection is not unique. */ private static void validate(Collection<SignalThresholdInfo> infos) { if (infos == null || infos.isEmpty()) { private static void validate(Collection<SignalThresholdInfo> infos, boolean isSystemThresholdReportingRequestedWhileIdle) { // System app (like Bluetooth) can specify the request to report system thresholds while // device is idle (with permission protection). In this case, the request doesn't need to // provide a non-empty list of SignalThresholdInfo which is only asked for public apps. if (infos == null || (infos.isEmpty() && !isSystemThresholdReportingRequestedWhileIdle)) { throw new IllegalArgumentException("SignalThresholdInfo collection is null or empty"); } Loading Loading
telephony/java/android/telephony/SignalStrengthUpdateRequest.java +7 −8 Original line number Diff line number Diff line Loading @@ -71,12 +71,7 @@ public final class SignalStrengthUpdateRequest implements Parcelable { @Nullable List<SignalThresholdInfo> signalThresholdInfos, boolean isReportingRequestedWhileIdle, boolean isSystemThresholdReportingRequestedWhileIdle) { // System app (like Bluetooth) can specify the request to report system thresholds while // device is idle (with permission protection). In this case, the request doesn't need to // provide a non-empty list of SignalThresholdInfo which is only asked for public apps. if (!isSystemThresholdReportingRequestedWhileIdle) { validate(signalThresholdInfos); } validate(signalThresholdInfos, isSystemThresholdReportingRequestedWhileIdle); mSignalThresholdInfos = signalThresholdInfos; mIsReportingRequestedWhileIdle = isReportingRequestedWhileIdle; Loading Loading @@ -274,8 +269,12 @@ public final class SignalStrengthUpdateRequest implements Parcelable { * Throw IAE if SignalThresholdInfo collection is null or empty, * or the SignalMeasurementType for the same RAN in the collection is not unique. */ private static void validate(Collection<SignalThresholdInfo> infos) { if (infos == null || infos.isEmpty()) { private static void validate(Collection<SignalThresholdInfo> infos, boolean isSystemThresholdReportingRequestedWhileIdle) { // System app (like Bluetooth) can specify the request to report system thresholds while // device is idle (with permission protection). In this case, the request doesn't need to // provide a non-empty list of SignalThresholdInfo which is only asked for public apps. if (infos == null || (infos.isEmpty() && !isSystemThresholdReportingRequestedWhileIdle)) { throw new IllegalArgumentException("SignalThresholdInfo collection is null or empty"); } Loading