Loading telephony/java/android/telephony/satellite/SatelliteInfo.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.telephony.satellite; package android.telephony.satellite; import android.annotation.FlaggedApi; import android.annotation.FlaggedApi; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcel; import android.os.ParcelUuid; import android.os.ParcelUuid; import android.os.Parcelable; import android.os.Parcelable; Loading Loading @@ -47,10 +46,12 @@ public class SatelliteInfo implements Parcelable { private UUID mId; private UUID mId; /** /** * Position information of a satellite. * Position information of a geostationary satellite. * This includes the longitude and altitude of the satellite. * This includes the longitude and altitude of the satellite. * If the SatellitePosition is invalid, * longitudeDegree and altitudeKm will be represented as DOUBLE.NaN. */ */ @Nullable @NonNull private SatellitePosition mPosition; private SatellitePosition mPosition; /** /** Loading Loading @@ -89,7 +90,7 @@ public class SatelliteInfo implements Parcelable { * @param earfcnRanges The list of {@link EarfcnRange} objects representing the EARFCN * @param earfcnRanges The list of {@link EarfcnRange} objects representing the EARFCN * ranges supported by the satellite. * ranges supported by the satellite. */ */ public SatelliteInfo(@NonNull UUID satelliteId, @Nullable SatellitePosition satellitePosition, public SatelliteInfo(@NonNull UUID satelliteId, @NonNull SatellitePosition satellitePosition, @NonNull List<Integer> bandList, @NonNull List<EarfcnRange> earfcnRanges) { @NonNull List<Integer> bandList, @NonNull List<EarfcnRange> earfcnRanges) { mId = satelliteId; mId = satelliteId; mPosition = satellitePosition; mPosition = satellitePosition; Loading Loading @@ -135,10 +136,9 @@ public class SatelliteInfo implements Parcelable { /** /** * Returns the position of the satellite. * Returns the position of the satellite. * * * @return The {@link SatellitePosition} of the satellite, or {@code null} if the position is * @return The {@link SatellitePosition} of the satellite. * not available. */ */ @Nullable @NonNull public SatellitePosition getSatellitePosition() { public SatellitePosition getSatellitePosition() { return mPosition; return mPosition; } } Loading telephony/java/android/telephony/satellite/SystemSelectionSpecifier.java +85 −19 Original line number Original line Diff line number Diff line Loading @@ -17,11 +17,13 @@ package android.telephony.satellite; package android.telephony.satellite; import android.annotation.NonNull; import android.annotation.NonNull; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable; import android.text.TextUtils; import android.text.TextUtils; import android.util.IntArray; import android.util.IntArray; import java.util.Arrays; import java.util.Objects; import java.util.Objects; /** /** Loading @@ -39,16 +41,26 @@ public final class SystemSelectionSpecifier implements Parcelable { * The radio channels to scan as defined in 3GPP TS 25.101 and 36.101. * The radio channels to scan as defined in 3GPP TS 25.101 and 36.101. * Maximum length of the vector is 32. * Maximum length of the vector is 32. */ */ @NonNull private IntArray mEarfcs; @NonNull private IntArray mEarfcns; /* The list of satellites configured for the current location */ @Nullable private SatelliteInfo[] mSatelliteInfos; /* The list of tag IDs associated with the current location */ @Nullable private IntArray mTagIds; /** /** * @hide * @hide */ */ public SystemSelectionSpecifier(@NonNull String mccmnc, @NonNull IntArray bands, public SystemSelectionSpecifier(@NonNull String mccmnc, @NonNull IntArray bands, @NonNull IntArray earfcs) { @NonNull IntArray earfcns, @Nullable SatelliteInfo[] satelliteInfos, @Nullable IntArray tagIds) { mMccMnc = mccmnc; mMccMnc = mccmnc; mBands = bands; mBands = bands; mEarfcs = earfcs; mEarfcns = earfcns; mSatelliteInfos = satelliteInfos; mTagIds = tagIds; } } private SystemSelectionSpecifier(Parcel in) { private SystemSelectionSpecifier(Parcel in) { Loading @@ -74,10 +86,21 @@ public final class SystemSelectionSpecifier implements Parcelable { out.writeInt(0); out.writeInt(0); } } if (mEarfcs != null && mEarfcs.size() > 0) { if (mEarfcns != null && mEarfcns.size() > 0) { out.writeInt(mEarfcs.size()); out.writeInt(mEarfcns.size()); for (int i = 0; i < mEarfcs.size(); i++) { for (int i = 0; i < mEarfcns.size(); i++) { out.writeInt(mEarfcs.get(i)); out.writeInt(mEarfcns.get(i)); } } else { out.writeInt(0); } out.writeTypedArray(mSatelliteInfos, flags); if (mTagIds != null) { out.writeInt(mTagIds.size()); for (int i = 0; i < mTagIds.size(); i++) { out.writeInt(mTagIds.get(i)); } } } else { } else { out.writeInt(0); out.writeInt(0); Loading Loading @@ -115,14 +138,35 @@ public final class SystemSelectionSpecifier implements Parcelable { } } sb.append("earfcs:"); sb.append("earfcs:"); if (mEarfcs != null && mEarfcs.size() > 0) { if (mEarfcns != null && mEarfcns.size() > 0) { for (int i = 0; i < mEarfcs.size(); i++) { for (int i = 0; i < mEarfcns.size(); i++) { sb.append(mEarfcs.get(i)); sb.append(mEarfcns.get(i)); sb.append(","); sb.append(","); } } } else { } else { sb.append("none"); sb.append("none"); } } sb.append("mSatelliteInfos:"); if (mSatelliteInfos != null && mSatelliteInfos.length > 0) { for (SatelliteInfo satelliteInfo : mSatelliteInfos) { sb.append(satelliteInfo); sb.append(","); } } else { sb.append("none"); } sb.append("mTagIds:"); if (mTagIds != null && mTagIds.size() > 0) { for (int i = 0; i < mTagIds.size(); i++) { sb.append(mTagIds.get(i)); sb.append(","); } } else { sb.append("none"); } return sb.toString(); return sb.toString(); } } Loading @@ -133,12 +177,15 @@ public final class SystemSelectionSpecifier implements Parcelable { SystemSelectionSpecifier that = (SystemSelectionSpecifier) o; SystemSelectionSpecifier that = (SystemSelectionSpecifier) o; return Objects.equals(mMccMnc, that.mMccMnc) return Objects.equals(mMccMnc, that.mMccMnc) && Objects.equals(mBands, that.mBands) && Objects.equals(mBands, that.mBands) && Objects.equals(mEarfcs, that.mEarfcs); && Objects.equals(mEarfcns, that.mEarfcns) && (mSatelliteInfos == null ? that.mSatelliteInfos == null : Arrays.equals( mSatelliteInfos, that.mSatelliteInfos)) && Objects.equals(mTagIds, that.mTagIds); } } @Override @Override public int hashCode() { public int hashCode() { return Objects.hash(mMccMnc, mBands, mEarfcs); return Objects.hash(mMccMnc, mBands, mEarfcns); } } @NonNull public String getMccMnc() { @NonNull public String getMccMnc() { Loading @@ -149,8 +196,18 @@ public final class SystemSelectionSpecifier implements Parcelable { return mBands; return mBands; } } @NonNull public IntArray getEarfcs() { @NonNull public IntArray getEarfcns() { return mEarfcs; return mEarfcns; } @NonNull public SatelliteInfo[] getSatelliteInfos() { return mSatelliteInfos; } @NonNull public IntArray getTagIds() { return mTagIds; } } private void readFromParcel(Parcel in) { private void readFromParcel(Parcel in) { Loading @@ -164,11 +221,20 @@ public final class SystemSelectionSpecifier implements Parcelable { } } } } mEarfcs = new IntArray(); mEarfcns = new IntArray(); int numEarfcs = in.readInt(); int numEarfcns = in.readInt(); if (numEarfcs > 0) { if (numEarfcns > 0) { for (int i = 0; i < numEarfcs; i++) { for (int i = 0; i < numEarfcns; i++) { mEarfcs.add(in.readInt()); mEarfcns.add(in.readInt()); } } mSatelliteInfos = in.createTypedArray(SatelliteInfo.CREATOR); int numTagIds = in.readInt(); if (numTagIds > 0) { for (int i = 0; i < numTagIds; i++) { mTagIds.add(in.readInt()); } } } } } } Loading telephony/java/android/telephony/satellite/stub/EarfcnRange.aidl 0 → 100644 +32 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.telephony.satellite.stub; /** * @hide */ parcelable EarfcnRange { /** * The start frequency of the earfcn range and is inclusive in the range */ int startEarfcn; /** * The end frequency of the earfcn range and is inclusive in the range. */ int endEarfcn; } telephony/java/android/telephony/satellite/stub/SatelliteInfo.aidl 0 → 100644 +52 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.telephony.satellite.stub; import android.telephony.satellite.stub.UUID; import android.telephony.satellite.stub.SatellitePosition; import android.telephony.satellite.stub.EarfcnRange; /** * @hide */ parcelable SatelliteInfo { /** * Unique identification number for the satellite. * This ID is used to distinguish between different satellites in the network. */ UUID id; /** * Position information of a geostationary satellite. * This includes the longitude and altitude of the satellite. * If the SatellitePosition is invalid, * longitudeDegree and altitudeKm will be represented as DOUBLE.NaN. */ SatellitePosition position; /** * The frequency bands to scan. * Bands will be filled only if the whole band is needed. * Maximum length of the vector is 8. */ int[] bands; /** * The supported frequency ranges. Earfcn ranges and earfcns won't overlap. */ EarfcnRange[] earfcnRanges; } telephony/java/android/telephony/satellite/stub/SatellitePosition.aidl 0 → 100644 +32 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.telephony.satellite.stub; /** * @hide */ parcelable SatellitePosition { /** * The longitude of the satellite in degrees, ranging from -180 to 180 degrees */ double longitudeDegree; /** * The distance from the center of the earth to the satellite, measured in kilometers */ double altitudeKm; } Loading
telephony/java/android/telephony/satellite/SatelliteInfo.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.telephony.satellite; package android.telephony.satellite; import android.annotation.FlaggedApi; import android.annotation.FlaggedApi; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcel; import android.os.ParcelUuid; import android.os.ParcelUuid; import android.os.Parcelable; import android.os.Parcelable; Loading Loading @@ -47,10 +46,12 @@ public class SatelliteInfo implements Parcelable { private UUID mId; private UUID mId; /** /** * Position information of a satellite. * Position information of a geostationary satellite. * This includes the longitude and altitude of the satellite. * This includes the longitude and altitude of the satellite. * If the SatellitePosition is invalid, * longitudeDegree and altitudeKm will be represented as DOUBLE.NaN. */ */ @Nullable @NonNull private SatellitePosition mPosition; private SatellitePosition mPosition; /** /** Loading Loading @@ -89,7 +90,7 @@ public class SatelliteInfo implements Parcelable { * @param earfcnRanges The list of {@link EarfcnRange} objects representing the EARFCN * @param earfcnRanges The list of {@link EarfcnRange} objects representing the EARFCN * ranges supported by the satellite. * ranges supported by the satellite. */ */ public SatelliteInfo(@NonNull UUID satelliteId, @Nullable SatellitePosition satellitePosition, public SatelliteInfo(@NonNull UUID satelliteId, @NonNull SatellitePosition satellitePosition, @NonNull List<Integer> bandList, @NonNull List<EarfcnRange> earfcnRanges) { @NonNull List<Integer> bandList, @NonNull List<EarfcnRange> earfcnRanges) { mId = satelliteId; mId = satelliteId; mPosition = satellitePosition; mPosition = satellitePosition; Loading Loading @@ -135,10 +136,9 @@ public class SatelliteInfo implements Parcelable { /** /** * Returns the position of the satellite. * Returns the position of the satellite. * * * @return The {@link SatellitePosition} of the satellite, or {@code null} if the position is * @return The {@link SatellitePosition} of the satellite. * not available. */ */ @Nullable @NonNull public SatellitePosition getSatellitePosition() { public SatellitePosition getSatellitePosition() { return mPosition; return mPosition; } } Loading
telephony/java/android/telephony/satellite/SystemSelectionSpecifier.java +85 −19 Original line number Original line Diff line number Diff line Loading @@ -17,11 +17,13 @@ package android.telephony.satellite; package android.telephony.satellite; import android.annotation.NonNull; import android.annotation.NonNull; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable; import android.text.TextUtils; import android.text.TextUtils; import android.util.IntArray; import android.util.IntArray; import java.util.Arrays; import java.util.Objects; import java.util.Objects; /** /** Loading @@ -39,16 +41,26 @@ public final class SystemSelectionSpecifier implements Parcelable { * The radio channels to scan as defined in 3GPP TS 25.101 and 36.101. * The radio channels to scan as defined in 3GPP TS 25.101 and 36.101. * Maximum length of the vector is 32. * Maximum length of the vector is 32. */ */ @NonNull private IntArray mEarfcs; @NonNull private IntArray mEarfcns; /* The list of satellites configured for the current location */ @Nullable private SatelliteInfo[] mSatelliteInfos; /* The list of tag IDs associated with the current location */ @Nullable private IntArray mTagIds; /** /** * @hide * @hide */ */ public SystemSelectionSpecifier(@NonNull String mccmnc, @NonNull IntArray bands, public SystemSelectionSpecifier(@NonNull String mccmnc, @NonNull IntArray bands, @NonNull IntArray earfcs) { @NonNull IntArray earfcns, @Nullable SatelliteInfo[] satelliteInfos, @Nullable IntArray tagIds) { mMccMnc = mccmnc; mMccMnc = mccmnc; mBands = bands; mBands = bands; mEarfcs = earfcs; mEarfcns = earfcns; mSatelliteInfos = satelliteInfos; mTagIds = tagIds; } } private SystemSelectionSpecifier(Parcel in) { private SystemSelectionSpecifier(Parcel in) { Loading @@ -74,10 +86,21 @@ public final class SystemSelectionSpecifier implements Parcelable { out.writeInt(0); out.writeInt(0); } } if (mEarfcs != null && mEarfcs.size() > 0) { if (mEarfcns != null && mEarfcns.size() > 0) { out.writeInt(mEarfcs.size()); out.writeInt(mEarfcns.size()); for (int i = 0; i < mEarfcs.size(); i++) { for (int i = 0; i < mEarfcns.size(); i++) { out.writeInt(mEarfcs.get(i)); out.writeInt(mEarfcns.get(i)); } } else { out.writeInt(0); } out.writeTypedArray(mSatelliteInfos, flags); if (mTagIds != null) { out.writeInt(mTagIds.size()); for (int i = 0; i < mTagIds.size(); i++) { out.writeInt(mTagIds.get(i)); } } } else { } else { out.writeInt(0); out.writeInt(0); Loading Loading @@ -115,14 +138,35 @@ public final class SystemSelectionSpecifier implements Parcelable { } } sb.append("earfcs:"); sb.append("earfcs:"); if (mEarfcs != null && mEarfcs.size() > 0) { if (mEarfcns != null && mEarfcns.size() > 0) { for (int i = 0; i < mEarfcs.size(); i++) { for (int i = 0; i < mEarfcns.size(); i++) { sb.append(mEarfcs.get(i)); sb.append(mEarfcns.get(i)); sb.append(","); sb.append(","); } } } else { } else { sb.append("none"); sb.append("none"); } } sb.append("mSatelliteInfos:"); if (mSatelliteInfos != null && mSatelliteInfos.length > 0) { for (SatelliteInfo satelliteInfo : mSatelliteInfos) { sb.append(satelliteInfo); sb.append(","); } } else { sb.append("none"); } sb.append("mTagIds:"); if (mTagIds != null && mTagIds.size() > 0) { for (int i = 0; i < mTagIds.size(); i++) { sb.append(mTagIds.get(i)); sb.append(","); } } else { sb.append("none"); } return sb.toString(); return sb.toString(); } } Loading @@ -133,12 +177,15 @@ public final class SystemSelectionSpecifier implements Parcelable { SystemSelectionSpecifier that = (SystemSelectionSpecifier) o; SystemSelectionSpecifier that = (SystemSelectionSpecifier) o; return Objects.equals(mMccMnc, that.mMccMnc) return Objects.equals(mMccMnc, that.mMccMnc) && Objects.equals(mBands, that.mBands) && Objects.equals(mBands, that.mBands) && Objects.equals(mEarfcs, that.mEarfcs); && Objects.equals(mEarfcns, that.mEarfcns) && (mSatelliteInfos == null ? that.mSatelliteInfos == null : Arrays.equals( mSatelliteInfos, that.mSatelliteInfos)) && Objects.equals(mTagIds, that.mTagIds); } } @Override @Override public int hashCode() { public int hashCode() { return Objects.hash(mMccMnc, mBands, mEarfcs); return Objects.hash(mMccMnc, mBands, mEarfcns); } } @NonNull public String getMccMnc() { @NonNull public String getMccMnc() { Loading @@ -149,8 +196,18 @@ public final class SystemSelectionSpecifier implements Parcelable { return mBands; return mBands; } } @NonNull public IntArray getEarfcs() { @NonNull public IntArray getEarfcns() { return mEarfcs; return mEarfcns; } @NonNull public SatelliteInfo[] getSatelliteInfos() { return mSatelliteInfos; } @NonNull public IntArray getTagIds() { return mTagIds; } } private void readFromParcel(Parcel in) { private void readFromParcel(Parcel in) { Loading @@ -164,11 +221,20 @@ public final class SystemSelectionSpecifier implements Parcelable { } } } } mEarfcs = new IntArray(); mEarfcns = new IntArray(); int numEarfcs = in.readInt(); int numEarfcns = in.readInt(); if (numEarfcs > 0) { if (numEarfcns > 0) { for (int i = 0; i < numEarfcs; i++) { for (int i = 0; i < numEarfcns; i++) { mEarfcs.add(in.readInt()); mEarfcns.add(in.readInt()); } } mSatelliteInfos = in.createTypedArray(SatelliteInfo.CREATOR); int numTagIds = in.readInt(); if (numTagIds > 0) { for (int i = 0; i < numTagIds; i++) { mTagIds.add(in.readInt()); } } } } } } Loading
telephony/java/android/telephony/satellite/stub/EarfcnRange.aidl 0 → 100644 +32 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.telephony.satellite.stub; /** * @hide */ parcelable EarfcnRange { /** * The start frequency of the earfcn range and is inclusive in the range */ int startEarfcn; /** * The end frequency of the earfcn range and is inclusive in the range. */ int endEarfcn; }
telephony/java/android/telephony/satellite/stub/SatelliteInfo.aidl 0 → 100644 +52 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.telephony.satellite.stub; import android.telephony.satellite.stub.UUID; import android.telephony.satellite.stub.SatellitePosition; import android.telephony.satellite.stub.EarfcnRange; /** * @hide */ parcelable SatelliteInfo { /** * Unique identification number for the satellite. * This ID is used to distinguish between different satellites in the network. */ UUID id; /** * Position information of a geostationary satellite. * This includes the longitude and altitude of the satellite. * If the SatellitePosition is invalid, * longitudeDegree and altitudeKm will be represented as DOUBLE.NaN. */ SatellitePosition position; /** * The frequency bands to scan. * Bands will be filled only if the whole band is needed. * Maximum length of the vector is 8. */ int[] bands; /** * The supported frequency ranges. Earfcn ranges and earfcns won't overlap. */ EarfcnRange[] earfcnRanges; }
telephony/java/android/telephony/satellite/stub/SatellitePosition.aidl 0 → 100644 +32 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.telephony.satellite.stub; /** * @hide */ parcelable SatellitePosition { /** * The longitude of the satellite in degrees, ranging from -180 to 180 degrees */ double longitudeDegree; /** * The distance from the center of the earth to the satellite, measured in kilometers */ double altitudeKm; }