Home
last modified time | relevance | path

Searched refs:cellId (Results 1 – 25 of 33) sorted by relevance

12

/packages/modules/GeoTZ/s2storage/src/test/java/com/android/storage/s2/
DS2LevelRangeTest.java19 import static com.android.storage.s2.S2Support.cellId;
33 long lowCellId = cellId(12, 1, 100); in constructor()
34 long nextLowCellId = cellId(12, 3, 101); in constructor()
35 long highCellId = cellId(12, 5, 110); in constructor()
41 long highCellIdDifferentLevel = cellId(15, 2, 0); in constructor()
48 S2LevelRange range1 = new S2LevelRange(cellId(12, 1, 1), cellId(12, 1, 3)); in contains()
49 assertFalse(range1.contains(cellId(12, 1, 0))); in contains()
50 assertTrue(range1.contains(cellId(12, 1, 1))); in contains()
51 assertTrue(range1.contains(cellId(12, 1, 2))); in contains()
52 assertFalse(range1.contains(cellId(12, 1, 3))); in contains()
[all …]
DS2SupportTest.java73 public void cellId() { in cellId() method in S2SupportTest
75 assertThrows(IllegalArgumentException.class, () -> S2Support.cellId(-1, 0, 0)); in cellId()
77 () -> S2Support.cellId(S2Support.MAX_S2_LEVEL + 1, 0, 0)); in cellId()
80 assertCellIdEquals(0b00010000L << 56, S2Support.cellId(0, 0, 0)); in cellId()
81 assertCellIdEquals(0b00110000L << 56, S2Support.cellId(0, 1, 0)); in cellId()
82 assertCellIdEquals(0b10110000L << 56, S2Support.cellId(0, S2Support.MAX_FACE_ID, 0)); in cellId()
83 assertThrows(IllegalArgumentException.class, () -> S2Support.cellId(0, -1, 0)); in cellId()
85 () -> S2Support.cellId(0, S2Support.MAX_FACE_ID + 1, 0)); in cellId()
87 assertThrows(IllegalArgumentException.class, () -> S2Support.cellId(0, 0, -1)); in cellId()
88 assertThrows(IllegalArgumentException.class, () -> S2Support.cellId(0, 0, 1)); in cellId()
[all …]
DSortedS2RangesTest.java19 import static com.android.storage.s2.S2Support.cellId;
34 S2LevelRange range0 = new S2LevelRange(cellId(s2Level, 1, 1000), in testCreateFromSorted_detectsUnsorted()
35 cellId(s2Level, 1, 1001)); in testCreateFromSorted_detectsUnsorted()
36 S2LevelRange range1 = new S2LevelRange(cellId(s2Level, 1, 1001), in testCreateFromSorted_detectsUnsorted()
37 cellId(s2Level, 1, 1002)); in testCreateFromSorted_detectsUnsorted()
45 S2LevelRange range0 = new S2LevelRange(cellId(s2Level, 1, 1000), in testCreateFromSorted()
46 cellId(s2Level, 1, 1001)); in testCreateFromSorted()
47 S2LevelRange range1 = new S2LevelRange(cellId(s2Level, 1, 1001), in testCreateFromSorted()
48 cellId(s2Level, 1, 1002)); in testCreateFromSorted()
49 S2LevelRange range2 = new S2LevelRange(cellId(s2Level, 1, 1002), in testCreateFromSorted()
[all …]
DS2CellOrderingTest.java36 long faceMinCellIdNumeric = asUnsignedNumeric(S2Support.cellId(level, faceId, 0)); in ordering()
38 S2Support.cellId(level, faceId, S2Support.getMaxIndex(level))); in ordering()
/packages/modules/GeoTZ/s2storage/src/readonly/java/com/android/storage/s2/
DS2Support.java56 public static String cellIdToString(long cellId) { in cellIdToString() argument
57 int level = getS2Level(cellId); in cellIdToString()
58 int faceId = getValidFaceId(cellId); in cellIdToString()
59 long index = getValidIndex(cellId); in cellIdToString()
60 return Long.toUnsignedString(cellId) + " (level=" + level + " faceId=" + faceId in cellIdToString()
64 private static int getValidFaceId(long cellId) { in getValidFaceId() argument
65 int faceId = getFaceIdValue(cellId); in getValidFaceId()
71 private static int getFaceIdValue(long cellId) { in getFaceIdValue() argument
72 return (int) ((BitwiseUtils.getHighBitsMask(FACE_BIT_COUNT) & cellId) in getFaceIdValue()
80 private static long getValidIndex(long cellId) { in getValidIndex() argument
[all …]
DS2CellOrdering.java48 public static long asUnsignedNumeric(long cellId) { in asUnsignedNumeric() argument
52 return cellId >>> 1; in asUnsignedNumeric()
/packages/services/Telephony/utils/satellite/s2storage/src/readonly/java/com/android/telephony/sats2range/read/
DSatS2RangeFileFormat.java264 public int extractPrefixValueFromCellId(long cellId) { in extractPrefixValueFromCellId() argument
265 checkS2Level("cellId", cellId); in extractPrefixValueFromCellId()
266 return (int) (cellId >>> (mSuffixBitCount + mUnusedCellIdBitCount)); in extractPrefixValueFromCellId()
270 public int extractSuffixValueFromCellId(long cellId) { in extractSuffixValueFromCellId() argument
271 checkS2Level("cellId", cellId); in extractSuffixValueFromCellId()
272 return (int) (cellId >>> (mUnusedCellIdBitCount)) & mMaxSuffixValue; in extractSuffixValueFromCellId()
292 long cellId = prefixValue; in createCellId() local
293 cellId <<= mSuffixBitCount; in createCellId()
294 cellId |= suffixValue; in createCellId()
295 cellId <<= 1; in createCellId()
[all …]
DSuffixTableBlock.java76 Entry findEntryByCellId(long cellId); in findEntryByCellId() argument
126 public Entry findEntryByCellId(long cellId) { in findEntryByCellId() argument
127 if (getS2Level(cellId) != mFileFormat.getS2Level()) { in findEntryByCellId()
129 cellIdToString(cellId) + " s2 level is not " in findEntryByCellId()
132 if (mFileFormat.extractPrefixValueFromCellId(cellId) != mPrefix) { in findEntryByCellId()
136 cellId + "(" + mFileFormat.cellIdToString(cellId) in findEntryByCellId()
141 return mDelegate.findEntryByCellId(cellId); in findEntryByCellId()
DSatS2RangeFileReader.java151 public S2LevelRange findEntryByCellId(long cellId) throws IOException { in findEntryByCellId() argument
154 int searchS2Level = S2Support.getS2Level(cellId); in findEntryByCellId()
160 int prefix = mFileFormat.extractPrefixValueFromCellId(cellId); in findEntryByCellId()
162 SuffixTableBlock.Entry suffixTableEntry = suffixTableBlock.findEntryByCellId(cellId); in findEntryByCellId()
/packages/modules/GeoTZ/tzs2storage/src/readonly/java/com/android/timezone/location/storage/tzs2range/
DTzS2RangeFileFormat.java263 public int extractPrefixValueFromCellId(long cellId) { in extractPrefixValueFromCellId() argument
264 checkS2Level("cellId", cellId); in extractPrefixValueFromCellId()
265 return (int) (cellId >>> (mSuffixBitCount + mUnusedCellIdBitCount)); in extractPrefixValueFromCellId()
269 public int extractSuffixValueFromCellId(long cellId) { in extractSuffixValueFromCellId() argument
270 checkS2Level("cellId", cellId); in extractSuffixValueFromCellId()
271 return (int) (cellId >>> (mUnusedCellIdBitCount)) & mMaxSuffixValue; in extractSuffixValueFromCellId()
311 long cellId = prefixValue; in createCellId() local
312 cellId <<= mSuffixBitCount; in createCellId()
313 cellId |= suffixValue; in createCellId()
314 cellId <<= 1; in createCellId()
[all …]
/packages/modules/GeoTZ/tzs2storage/src/test/java/com/android/timezone/location/storage/tzs2range/write/
DBankedTzIdSetsPackerTest.java19 import static com.android.storage.s2.S2Support.cellId;
112 List<TzS2Range> ranges = listOf(new TzS2Range(cellId(12, 1, 1), cellId(12, 1, 2), in extractUniqueTzIdSets()
114 new TzS2Range(cellId(12, 1, 2), cellId(12, 1, 3), listOf("One")), in extractUniqueTzIdSets()
115 new TzS2Range(cellId(12, 1, 3), cellId(12, 1, 4), listOf("Two")), in extractUniqueTzIdSets()
116 new TzS2Range(cellId(12, 1, 4), cellId(12, 1, 5), listOf("One")), in extractUniqueTzIdSets()
117 new TzS2Range(cellId(12, 1, 5), cellId(12, 1, 6), in extractUniqueTzIdSets()
119 new TzS2Range(cellId(12, 1, 6), cellId(12, 1, 7), listOf("Two", "Three")), in extractUniqueTzIdSets()
120 new TzS2Range(cellId(12, 1, 7), cellId(12, 1, 8), listOf("Three"))); in extractUniqueTzIdSets()
/packages/apps/Settings/src/com/android/settings/network/telephony/
DNetworkOperatorPreference.kt55 private var cellId: CellIdentity? = null variable
64 fun updateCell(cellInfo: CellInfo?, cellId: CellIdentity? = cellInfo?.cellIdentity) { in updateCell()
66 this.cellId = cellId in updateCell()
73 fun isSameCell(cellInfo: CellInfo): Boolean = cellInfo.cellIdentity == cellId in isSameCell()
78 fun isForbiddenNetwork(): Boolean = cellId?.getOperatorNumeric() in forbiddenPlmns in isSameCell()
84 var networkTitle = cellId?.getNetworkTitle() ?: return in isSameCell()
117 fun getOperatorName(): String? = cellId?.getNetworkTitle() in getOperatorName()
123 Objects.toString(cellId?.operatorAlphaLong, ""), in getOperatorName()
124 Objects.toString(cellId?.operatorAlphaShort, ""), in getOperatorName()
125 cellId?.getOperatorNumeric(), in getOperatorName()
[all …]
/packages/modules/GeoTZ/tzs2storage/src/test/java/com/android/timezone/location/storage/tzs2range/
DTzS2RangeFileFormatTest.java19 import static com.android.storage.s2.S2Support.cellId;
76 cellId(s2Level, 0, 0), cellId(s2Level, 0, 2))); in calculateRangeLength()
78 cellId(s2Level, 0, 2), cellId(s2Level, 0, 4))); in calculateRangeLength()
83 cellId(s2Level, 0, 2), cellId(s2Level, 1, 4))); in calculateRangeLength()
107 assertEquals(cellId(s2Level, 4, 0), in createCellId()
109 assertEquals(cellId(s2Level, 4, 1), in createCellId()
112 assertEquals(cellId(s2Level, 5, intPow2(0)), in createCellId()
114 assertEquals(cellId(s2Level, 5, intPow2(8)), in createCellId()
116 assertEquals(cellId(s2Level, 5, intPow2(16)), in createCellId()
DTzS2RangeFileTest.java47 cellId(fileFormat, 1, 1000, 1000), in findEntryByCellId()
48 cellId(fileFormat, 1, 1000, 2000), in findEntryByCellId()
51 cellId(fileFormat, 1, 1000, 2000), in findEntryByCellId()
52 cellId(fileFormat, 1, 1000, 3000), in findEntryByCellId()
56 cellId(fileFormat, 1, 1001, 1000), in findEntryByCellId()
57 cellId(fileFormat, 1, 1001, 2000), in findEntryByCellId()
64 tzS2RangeFileReader.findEntryByCellId(cellId(fileFormat, 1, 1000, 1500)); in findEntryByCellId()
68 tzS2RangeFileReader.findEntryByCellId(cellId(fileFormat, 1, 1000, 2500)); in findEntryByCellId()
72 tzS2RangeFileReader.findEntryByCellId(cellId(fileFormat, 1, 1001, 1500)); in findEntryByCellId()
77 private static long cellId( in cellId() method in TzS2RangeFileTest
DSuffixTableRangeTest.java19 import static com.android.storage.s2.S2Support.cellId;
34 long startCellId = cellId(12, 5, 1); in constructorInvariants()
35 long endCellId = cellId(12, 5, 2); in constructorInvariants()
46 long startCellId = cellId(s2Level, 5, 1); in equalsAndHashcode()
47 long endCellId = cellId(s2Level, 5, 2); in equalsAndHashcode()
DTzS2RangeTest.java19 import static com.android.storage.s2.S2Support.cellId;
37 long startCellId = cellId(12, 5, 1); in constructorInvariants()
38 long endCellId = cellId(12, 5, 2); in constructorInvariants()
49 long startCellId = cellId(s2Level, 5, 1); in equalsAndHashcode()
50 long endCellId = cellId(s2Level, 5, 2); in equalsAndHashcode()
/packages/services/Telephony/utils/satellite/s2storage/src/test/java/com/android/telephony/sats2range/
DSatS2RangeFileFormatTest.java19 import static com.android.storage.s2.S2Support.cellId;
76 cellId(s2Level, 0, 0), cellId(s2Level, 0, 2))); in calculateRangeLength()
78 cellId(s2Level, 0, 2), cellId(s2Level, 0, 4))); in calculateRangeLength()
83 cellId(s2Level, 0, 2), cellId(s2Level, 1, 4))); in calculateRangeLength()
108 assertEquals(cellId(s2Level, 4, 0), in createCellId()
110 assertEquals(cellId(s2Level, 4, 1), in createCellId()
113 assertEquals(cellId(s2Level, 5, intPow2(0)), in createCellId()
115 assertEquals(cellId(s2Level, 5, intPow2(8)), in createCellId()
117 assertEquals(cellId(s2Level, 5, intPow2(16)), in createCellId()
/packages/modules/GeoTZ/tzs2storage/src/readonly/java/com/android/timezone/location/storage/tzs2range/read/
DSuffixTableBlock.java78 Entry findEntryByCellId(long cellId); in findEntryByCellId() argument
142 public Entry findEntryByCellId(long cellId) { in findEntryByCellId() argument
143 if (getS2Level(cellId) != mFileFormat.getS2Level()) { in findEntryByCellId()
145 cellIdToString(cellId) + " s2 level is not " in findEntryByCellId()
148 if (mFileFormat.extractPrefixValueFromCellId(cellId) != mPrefix) { in findEntryByCellId()
152 cellId + "(" + mFileFormat.cellIdToString(cellId) in findEntryByCellId()
157 return mDelegate.findEntryByCellId(cellId); in findEntryByCellId()
DTzS2RangeFileReader.java156 public Entry findEntryByCellId(long cellId) throws IOException { in findEntryByCellId() argument
159 int searchS2Level = S2Support.getS2Level(cellId); in findEntryByCellId()
165 int prefix = mFileFormat.extractPrefixValueFromCellId(cellId); in findEntryByCellId()
167 SuffixTableBlock.Entry suffixTableEntry = suffixTableBlock.findEntryByCellId(cellId); in findEntryByCellId()
/packages/services/Telephony/utils/satellite/tools/src/main/java/com/android/telephony/tools/sats2/
DSatS2LocationLookup.java55 S2CellId cellId = S2CellId.fromLatLng(S2LatLng.fromDegrees(latDegrees, lngDegrees)); in getS2CellId() local
58 return cellId.parent(s2Level); in getS2CellId()
DSatS2FileCreator.java246 private static void checkCellIdIsAtLevel(S2CellId cellId, int s2Level) { in checkCellIdIsAtLevel() argument
247 if (cellId.level() != s2Level) { in checkCellIdIsAtLevel()
248 throw new IllegalStateException("Bad level for cellId=" + cellId in checkCellIdIsAtLevel()
/packages/modules/GeoTZ/data_pipeline/src/debug/java/com/android/timezone/location/data_pipeline/tools/
DPrintTzS2CellUnionStats.java69 for (S2CellId cellId : cellUnion.s2CellUnion.cellIds()) { in printS2CellStats()
70 cellLevelCount[cellId.level()]++; in printS2CellStats()
/packages/apps/Settings/tests/unit/src/com/android/settings/network/telephony/
DNetworkSelectSettingsTest.java311 private CellInfoLte createLteCellInfo(boolean registered, int cellId, String mcc, String mnc, in createLteCellInfo() argument
314 cellId, 5, 200, 2000, new int[]{1, 2}, 10000, mcc, mnc, plmnName, plmnName, in createLteCellInfo()
326 private CellInfoGsm createGsmCellInfo(boolean registered, int cellId, String mcc, String mnc, in createGsmCellInfo() argument
328 CellIdentityGsm cig = new CellIdentityGsm(1, cellId, 40, 5, mcc, mnc, plmnName, plmnName, in createGsmCellInfo()
/packages/services/Telephony/src/com/android/phone/satellite/accesscontrol/
DS2RangeSatelliteOnDeviceAccessController.java101 S2CellId cellId = S2CellId.fromLatLng(S2LatLng.fromDegrees(latDegrees, lngDegrees)); in getS2CellId() local
104 return cellId.parent(s2Level); in getS2CellId()
/packages/modules/GeoTZ/geotz_lookup/src/main/java/com/android/timezone/location/lookup/
DS2RangeFileBasedGeoTimeZonesFinder.java95 S2CellId cellId = S2CellId.fromLatLng(S2LatLng.fromDegrees(latDegrees, lngDegrees)); in getS2CellId() local
96 return cellId.parent(mS2Level); in getS2CellId()

12