Home
last modified time | relevance | path

Searched refs:bit (Results 1 – 25 of 96) sorted by relevance

1234

/packages/services/Car/tools/emulator/
Ddiagnostic_builder.py35 def _getIndices(self, bit): argument
36 if (bit < 0) or (bit >= self.count):
37 raise IndexError("index %d not in range [0,%d)" % (bit, self.count))
38 byteIdx = bit / 8
39 bitIdx = (bit % 8)
42 def setBit(self, bit): argument
43 byteIdx, bitIdx = self._getIndices(bit)
47 def getBit(self, bit): argument
48 byteIdx, bitIdx = self._getIndices(bit)
/packages/modules/GeoTZ/s2storage/src/readonly/java/com/android/storage/util/
DBitwiseUtils.java29 long bit = 1;
31 SINGLE_BIT_MASK[i] = bit;
32 bit <<= 1;
134 public static long getSingleBitMask(int bit) { in getSingleBitMask() argument
135 if (bit < 0 || bit > 63) { in getSingleBitMask()
136 throw new IllegalArgumentException("bit " + bit + " out of range"); in getSingleBitMask()
138 return SINGLE_BIT_MASK[bit]; in getSingleBitMask()
/packages/services/Telecomm/src/com/android/server/telecom/
DCallAudioWatchdog.java132 public void setBit(@SessionAttribute int bit) { in setBit() argument
133 setSessionAttr(getSessionAttr() | bit); in setBit()
140 public void clearBit(@SessionAttribute int bit) { in clearBit() argument
141 setSessionAttr(getSessionAttr() & ~bit); in clearBit()
150 public static boolean isBitSet(@SessionAttribute int mask, @SessionAttribute int bit) { in isBitSet() argument
151 return (mask & bit) == bit; in isBitSet()
159 public boolean isBitSet(@SessionAttribute int bit) { in isBitSet() argument
160 return isBitSet(getSessionAttr(), bit); in isBitSet()
627 private void cleanupAttributeForSessions(int bit, Map<Integer, Set<Integer>> sessionsByUid) { in cleanupAttributeForSessions() argument
645 Set<Integer> trackedSessions = putOrDefault(session.getAudioResourcesByType(), bit, in cleanupAttributeForSessions()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/model/controller/
Dcontroller_properties.h172 bool SupportsLMPFeature(bluetooth::hci::LMPFeaturesPage0Bits bit) const { in SupportsLMPFeature()
173 return (lmp_features[0] & static_cast<uint64_t>(bit)) != 0; in SupportsLMPFeature()
176 bool SupportsLMPFeature(bluetooth::hci::LMPFeaturesPage2Bits bit) const { in SupportsLMPFeature()
177 return (lmp_features[2] & static_cast<uint64_t>(bit)) != 0; in SupportsLMPFeature()
180 bool SupportsLLFeature(bluetooth::hci::LLFeaturesBits bit) const { in SupportsLLFeature()
181 return (le_features & static_cast<uint64_t>(bit)) != 0; in SupportsLLFeature()
/packages/apps/DeskClock/src/com/android/deskclock/data/
DWeekdays.kt101 val bit = sCalendarDayToBit[calendarDay] in fromCalendarDays() constant
102 if (bit != null) { in fromCalendarDays()
103 bits = bits or bit in fromCalendarDays()
128 val bit = sCalendarDayToBit[calendarDay] ?: return this in setBit() constant
129 return Weekdays(if (on) bits or bit else bits and bit.inv()) in setBit()
146 val bit = sCalendarDayToBit[calendarDay] in isBitOn() constant
148 return bits and bit > 0 in isBitOn()
/packages/modules/Bluetooth/system/gd/hci/
Dcontroller_test.cc541 for (size_t bit = 0; bit < 32; bit++) { in TEST_F() local
542 if (kDynamicAudioBufferSupport & (1u << bit)) { in TEST_F()
543 ASSERT_GT(controller_->GetDabCodecCapabilities()[bit].maximum_time_ms_, 0) << " bit " << bit; in TEST_F()
545 ASSERT_EQ(controller_->GetDabCodecCapabilities()[bit].maximum_time_ms_, 0); in TEST_F()
546 ASSERT_EQ(controller_->GetDabCodecCapabilities()[bit].minimum_time_ms_, 0); in TEST_F()
547 ASSERT_EQ(controller_->GetDabCodecCapabilities()[bit].default_time_ms_, 0); in TEST_F()
566 for (size_t bit = 0; bit < 32; bit++) { in TEST_F() local
567 if (kDynamicAudioBufferSupport & (1u << bit)) { in TEST_F()
568 ASSERT_GT(controller_->GetDabCodecCapabilities()[bit].maximum_time_ms_, 0) << " bit " << bit; in TEST_F()
570 ASSERT_EQ(controller_->GetDabCodecCapabilities()[bit].maximum_time_ms_, 0); in TEST_F()
[all …]
/packages/modules/Bluetooth/system/bta/le_audio/broadcaster/
Dstate_machine_test.cc245 auto bit = std::find_if(broadcasts_.begin(), broadcasts_.end(), in ConfigureIsoManagerMock() local
249 if (bit == broadcasts_.end()) { in ConfigureIsoManagerMock()
265 bit->second->HandleHciEvent(HCI_BLE_CREATE_BIG_CPL_EVT, &evt); in ConfigureIsoManagerMock()
272 auto bit = std::find_if(broadcasts_.begin(), broadcasts_.end(), in ConfigureIsoManagerMock() local
276 if (bit == broadcasts_.end()) { in ConfigureIsoManagerMock()
279 bit->second->OnSetupIsoDataPath(0, conn_handle); in ConfigureIsoManagerMock()
286 auto bit = std::find_if(broadcasts_.begin(), broadcasts_.end(), in ConfigureIsoManagerMock() local
290 if (bit == broadcasts_.end()) { in ConfigureIsoManagerMock()
293 bit->second->OnRemoveIsoDataPath(0, conn_handle); in ConfigureIsoManagerMock()
298 auto bit = std::find_if(broadcasts_.begin(), broadcasts_.end(), [big_id](auto const& entry) { in ConfigureIsoManagerMock() local
[all …]
/packages/services/BuiltInPrintService/jni/lib/
Dplugin_db.c127 unsigned long long bit = 0; in plugin_get_mime_type_bit() local
129 bit = (unsigned long long) (1 << INPUT_MIME_TYPE_PDF); in plugin_get_mime_type_bit()
131 bit = (unsigned long long) (1 << INPUT_MIME_TYPE_PCLM); in plugin_get_mime_type_bit()
133 bit = (unsigned long long) (1 << INPUT_MIME_TYPE_PWG); in plugin_get_mime_type_bit()
135 return bit; in plugin_get_mime_type_bit()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DSupplicantStaNetworkHalAidlImpl.java911 for (int bit = keyMgmt.nextSetBit(0); bit != -1; in wifiConfigurationToSupplicantKeyMgmtMask()
912 bit = keyMgmt.nextSetBit(bit + 1)) { in wifiConfigurationToSupplicantKeyMgmtMask()
913 switch (bit) { in wifiConfigurationToSupplicantKeyMgmtMask()
968 "Invalid protoMask bit in keyMgmt: " + bit); in wifiConfigurationToSupplicantKeyMgmtMask()
977 for (int bit = protoMask.nextSetBit(0); bit != -1; in wifiConfigurationToSupplicantProtoMask()
978 bit = protoMask.nextSetBit(bit + 1)) { in wifiConfigurationToSupplicantProtoMask()
979 switch (bit) { in wifiConfigurationToSupplicantProtoMask()
996 "Invalid protoMask bit in wificonfig: " + bit); in wifiConfigurationToSupplicantProtoMask()
1004 for (int bit = authAlgMask.nextSetBit(0); bit != -1; in wifiConfigurationToSupplicantAuthAlgMask()
1005 bit = authAlgMask.nextSetBit(bit + 1)) { in wifiConfigurationToSupplicantAuthAlgMask()
[all …]
DSupplicantStaNetworkHalHidlImpl.java846 for (int bit = keyMgmt.nextSetBit(0); bit != -1; in wifiConfigurationToSupplicantKeyMgmtMask()
847 bit = keyMgmt.nextSetBit(bit + 1)) { in wifiConfigurationToSupplicantKeyMgmtMask()
848 switch (bit) { in wifiConfigurationToSupplicantKeyMgmtMask()
909 "Invalid protoMask bit in keyMgmt: " + bit); in wifiConfigurationToSupplicantKeyMgmtMask()
918 for (int bit = protoMask.nextSetBit(0); bit != -1; in wifiConfigurationToSupplicantProtoMask()
919 bit = protoMask.nextSetBit(bit + 1)) { in wifiConfigurationToSupplicantProtoMask()
920 switch (bit) { in wifiConfigurationToSupplicantProtoMask()
938 "Invalid protoMask bit in wificonfig: " + bit); in wifiConfigurationToSupplicantProtoMask()
946 for (int bit = authAlgMask.nextSetBit(0); bit != -1; in wifiConfigurationToSupplicantAuthAlgMask()
947 bit = authAlgMask.nextSetBit(bit + 1)) { in wifiConfigurationToSupplicantAuthAlgMask()
[all …]
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DMdnsNsecRecord.java89 for (int bit = 0; bit < 8; bit++) { in readTypes()
90 if ((bitmapByte & (1 << (7 - bit))) != 0) { in readTypes()
91 types.add(blockNumber * 256 + bitmapIndex * 8 + bit); in readTypes()
/packages/modules/Bluetooth/system/stack/btm/
Dbtm_ble_privacy.cc153 uint8_t bit; in btm_ble_clear_irk_index() local
157 bit = index % 8; in btm_ble_clear_irk_index()
158 btm_cb.ble_ctr_cb.irk_list_mask[byte] &= (~(1 << bit)); in btm_ble_clear_irk_index()
174 uint8_t bit; in btm_ble_find_irk_index() local
178 bit = i % 8; in btm_ble_find_irk_index()
180 if ((btm_cb.ble_ctr_cb.irk_list_mask[byte] & (1 << bit)) == 0) { in btm_ble_find_irk_index()
181 btm_cb.ble_ctr_cb.irk_list_mask[byte] |= (1 << bit); in btm_ble_find_irk_index()
/packages/modules/NeuralNetworks/common/cpu_operations/
DLSHProjection.cpp134 int bit = runningSignBit<T>(input, weight, static_cast<float>(seed)); in SparseLshProjection() local
135 hash_signature = (hash_signature << 1) | bit; in SparseLshProjection()
153 int bit = runningSignBit<T>(input, weight, static_cast<float>(seed)); in DenseLshProjection() local
154 *out_buf++ = bit; in DenseLshProjection()
/packages/modules/SdkExtensions/javatests/com/android/sdkext/extensions/apexes/
DAndroid.bp39 // The automated test infra ends up building this apex for 64+32-bit and
40 // then installs it on a 32-bit-only device. Work around this weirdness
41 // by preferring 32-bit.
/packages/modules/DnsResolver/tests/
DAndroid.bp134 // TODO: Remove multilib after coverage test switched to 64-bit device.
156 // TODO: Remove resolv_test_mts_coverage_defaults after mts coverage switched to 64-bit device.
236 // 32bit apps talk to 64bit resolvers.
263 // TODO: Remove resolv_test_mts_coverage_defaults after mts coverage switched to 64-bit device.
/packages/apps/DocumentsUI/src/com/android/documentsui/base/
DEvents.java59 private static boolean hasBit(int metaState, int bit) { in hasBit() argument
60 return (metaState & bit) != 0; in hasBit()
/packages/modules/NeuralNetworks/
DTEST_MAPPING31 // should be run (4 = 2^2). The bit conversions can be
48 // // should be run (4 = 2^2). The bit conversions can be
/packages/modules/SdkExtensions/derive_classpath/
DAndroid.bp70 // Work around testing using a 64-bit test suite on 32-bit test device by
/packages/modules/SdkExtensions/derive_sdk/
DAndroid.bp67 // Work around testing using a 64-bit test suite on 32-bit test device by
/packages/modules/Bluetooth/tools/rootcanal/model/devices/
Dbaseband_sniffer.cc69 bool bit = (value ^ data) & 1; in HeaderErrorCheck() local
72 if (bit) { in HeaderErrorCheck()
/packages/modules/ExtServices/native/tests/
DAndroid.bp36 // Run this test using "atest libextservices_test -- --all-abi" or it will fail to run on 64 bit
76 // Run this test using "atest libextservices_test -- --all-abi" or it will fail to run on 64 bit
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pbap/
DBluetoothPbapVcardManager.java1263 private boolean isFilteredIn(FilterBit bit, boolean vCardType21) { in isFilteredIn() argument
1264 final int offset = (bit.pos / 8) + 1; in isFilteredIn()
1265 final int bitPos = bit.pos % 8; in isFilteredIn()
1266 if (!vCardType21 && bit.onlyCheckV21) { in isFilteredIn()
1269 if (vCardType21 && bit.excludeForV21) { in isFilteredIn()
1301 for (FilterBit bit : FilterBit.values()) { in apply()
1302 if (bit.prop.equals(currentProp)) { in apply()
1303 filteredIn = isFilteredIn(bit, vCardType21); in apply()
/packages/modules/DnsResolver/
DAndroid.bp205 // Because the test_suite target is 64 bit and the test infra is running the 64 bit test
206 // suite on cf_x86_phone (32-bit) for coverage.
208 // TODO: Remove this target after coverage test switched to 64-bit device.
/packages/modules/StatsD/lib/libstatspull/
DAndroid.bp140 //32bit and 64bit architectures.
/packages/modules/StatsD/lib/libstatssocket/
DAndroid.bp147 //32bit and 64bit architectures.

1234