/packages/services/Car/tools/hidl_parser/ |
D | parser.py | 85 def __init__(self, name): argument 86 self.name = name 88 def __str__(self): argument 89 return self.name 92 def __init__(self, name, arg): argument 93 self.name = name 94 self.arg = arg 96 def __str__(self): argument 97 return '%s<%s>' % (self.name, self.arg) 100 def __init__(self, name, base): argument [all …]
|
/packages/services/Car/tools/emulator/ |
D | vhal_emulator_test.py | 61 def _getMidpoint(self, minVal, maxVal): argument 66 def _generateTestValue(self, cfg, idx, origValue): argument 68 if valType in self._types.TYPE_STRING: 70 elif valType in self._types.TYPE_BYTES: 75 elif valType in self._types.TYPE_INT32: 77 testValue = self._getMidpoint(cfg.area_configs[idx].min_int32_value, 82 elif valType in self._types.TYPE_INT64: 84 testValue = self._getMidpoint(cfg.area_configs[idx].min_int64_value, 89 elif valType in self._types.TYPE_FLOAT: 91 testValue = self._getMidpoint(cfg.area_configs[idx].min_float_value, [all …]
|
D | obd2_to_diagjson.py | 40 def __init__(self, doc): argument 41 self.doc = doc 43 def __str__(self): argument 44 return str(self.doc) 46 def __repr__(self): argument 47 return self.__str__() 49 def __getattr__(self, attr): argument 50 return Json.wrapIfNeeded(self.doc.get(attr)) 52 def __iter__(self): argument 54 def __init__(self, doc): argument [all …]
|
D | diagnostic_builder.py | 27 def __init__(self, numElements): argument 28 self.count = numElements 30 self.data = bytearray(numElements/8) 33 self.data = bytearray(1+numElements/8) 35 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)) 42 def setBit(self, bit): argument 43 byteIdx, bitIdx = self._getIndices(bit) 45 self.data[byteIdx] = self.data[byteIdx] | bitValue [all …]
|
D | driving_info_generator.py | 71 def __init__(self, trkptDom): argument 75 self.datetime = datetime.datetime.strptime(timeElements[0].firstChild.nodeValue, 79 self.speedInMps = float(speedElements[0].firstChild.nodeValue) 91 def __init__(self, gpxFile, vhal): argument 92 self.gpxDom = minidom.parse(gpxFile) 94 self.speedInMps = 0 96 self.rpm = RPM_LOW 98 self.odometerInKm = 0 100 self.selectedGear = c.VEHICLEGEAR_GEAR_PARK 102 self.currentGear = c.VEHICLEGEAR_GEAR_PARK [all …]
|
D | user_action_generator.py | 57 def __init__(self, vhalConfig): argument 58 self.supportedAreas = self._getSupportedAreas(vhalConfig) 59 self.areaConfigs = self._getAreaConfigs(vhalConfig, self.supportedAreas, 62 def _getSupportedAreas(self, vhalConfig): argument 69 def _getAreaConfigs(self, vhalConfig, supportedAreas, valueType): argument 88 def __init__(self, vhalAreaConfig, valueType): argument 93 self.min = vhalAreaConfig.min_int32_value 94 self.max = vhalAreaConfig.max_int32_value 96 self.min = vhalAreaConfig.min_int64_value 97 self.max = vhalAreaConfig.max_int64_value [all …]
|
D | vhal_emulator.py | 111 def _txCmd(self, cmd): argument 121 self.sock.sendall(msgHdr) 123 self.sock.sendall(msgStr) 126 def printHex(self, data): argument 132 def openSocket(self, device=None): argument 146 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 147 self.sock.connect(('localhost', localPortNumber)) 149 def rxMsg(self): argument 156 b = self.sock.recv(4) 161 b = self.sock.recv(msgLen) [all …]
|
D | diagnostic_injector.py | 52 def __init__(self, device): argument 53 self.vhal = Vhal(c.vhal_types_2_0, device) 54 self.liveFrameConfig = self.chat( 56 self.freezeFrameConfig = self.chat( 58 self.eventTypeData = { 60 'builder' : lambda: DiagnosticEventBuilder(self.liveFrameConfig), 64 'builder' : lambda: DiagnosticEventBuilder(self.freezeFrameConfig), 69 def chat(self, request): argument 70 request(self.vhal) 71 return self.vhal.rxMsg() [all …]
|
D | vhal_prop_simulator.py | 37 def __init__(self, device, gpxFile,): argument 38 self.vhal = Vhal(c.vhal_types_2_0, device) 39 self.gpxFile = gpxFile 41 def handle(self, prop, area_id, value, desc=None): argument 46 self.vhal.setProperty(prop, area_id, value) 48 def _startGeneratorThread(self, generator): argument 49 thread = Thread(target=generator.generate, args=(self,)) 53 def run(self, timeout): argument 54 userActionGenerator = user_action_generator.UserActionGenerator(self.vhal) 55 drivingInfoGenerator = driving_info_generator.DrivingInfoGenerator(self.gpxFile, self.vhal) [all …]
|
/packages/services/Car/tests/BugReportApp/utils/ |
D | bugreport_app_tester_test.py | 29 def setUp(self): argument 30 self._mock_popen = SimpleMagicMock() # type: subprocess.Popen object. 31 self._mock_popen_fn = SimpleMagicMock(return_value=self._mock_popen) 32 bugreport_app_tester.subprocess.Popen = self._mock_popen_fn 33 self._subject = bugreport_app_tester.Device(serialno=None) 35 def test_read_lines_from_subprocess(self): argument 36 self._mock_popen.stdout.read.return_value = '\n \n asd\r\n\r\nqwe 123 $\n\n' 37 result = self._subject._read_lines_from_subprocess(self._mock_popen) 38 self.assertEqual(result, ['', ' ', ' asd', '', 'qwe 123 $', '', '']) 40 def test_read_lines_from_subprocess_empty(self): argument [all …]
|
D | bugreport_app_tester.py | 143 def __init__(self, serialno): argument 149 self._serialno = serialno 151 def _read_lines_from_subprocess(self, popen): argument 163 def adb(self, cmd): argument 175 if self._serialno: 176 full_cmd = ['adb', '-s', self._serialno] + cmd 180 stdout_lines = self._read_lines_from_subprocess(popen) 184 def adbx(self, cmd): argument 193 exit_code, stdout_lines = self.adb(cmd) 198 def is_adb_root(self): argument [all …]
|
/packages/services/Car/tools/ioanalyze/ |
D | analyzer.py | 10 def __init__(self, activity): argument 11 self.uid = activity['uid'] 12 self.foregroundWrittenBytes = activity['foregroundWrittenBytes'] 13 self.foregroundFsyncCalls = activity['foregroundFsyncCalls'] 14 self.backgroundFsyncCalls = activity['backgroundFsyncCalls'] 15 self.backgroundWrittenBytes = activity['backgroundWrittenBytes'] 16 self.appPackages = activity['appPackages'] 17 self.runtimeMs = activity['runtimeMs'] 18 self.totalWrittenBytes = self.foregroundWrittenBytes + self.backgroundWrittenBytes 19 self.totalFsyncCalls = self.backgroundFsyncCalls + self.foregroundFsyncCalls [all …]
|
/packages/services/BuiltInPrintService/jni/plugins/ |
D | pdf_render.c | 52 pdf_render_st_t *self = (pdf_render_st_t *) obj; in openDocument() local 53 jstring fileNameString = (*self->env)->NewStringUTF(self->env, fileName); in openDocument() 54 int count = (*self->env)->CallIntMethod(self->env, self->obj, gPdfRenderOpenDocument, in openDocument() 64 pdf_render_st_t *self = (pdf_render_st_t *) obj; in getPageAttributes() local 66 jobject size = (*self->env)->CallObjectMethod(self->env, self->obj, gPdfRenderGetPageSize, in getPageAttributes() 71 *width = (double) (*self->env)->CallDoubleMethod(self->env, size, gSizeDGetWidth); in getPageAttributes() 72 *height = (double) (*self->env)->CallDoubleMethod(self->env, size, gSizeDGetHeight); in getPageAttributes() 81 pdf_render_st_t *self = (pdf_render_st_t *) obj; in renderPageStripe() local 84 jobject byteBuffer = (*self->env)->NewDirectByteBuffer(self->env, buffer, bufferSize); in renderPageStripe() 86 if (!(*self->env)->CallBooleanMethod(self->env, self->obj, gPdfRenderRenderPageStripe, page, in renderPageStripe() [all …]
|
D | wprint_mupdf.h | 37 int (*openDocument)(pdf_render_ifc_t *self, const char *fileName); 43 status_t (*renderPageStripe)(pdf_render_ifc_t *self, int page, int width, 49 status_t (*getPageAttributes)(pdf_render_ifc_t *self, int page, 55 void (*destroy)(pdf_render_ifc_t *self);
|
/packages/services/Car/tools/ |
D | update-obd2-sensors.py | 30 def __init__(self, descriptor): argument 31 self.sensors = [] 32 self.id = -1 33 self.descriptor = descriptor 35 def addSensor(self, sensor): argument 38 self.id += 1 39 sensor.id = self.id 40 self.sensors.append(sensor) 42 def finalizeList(self): argument 44 self.id -= 1 [all …]
|
/packages/apps/Car/libs/car-ui-lib/tests/apitest/ |
D | resource_utils.py | 20 def __init__(self, file, line=None): argument 21 self.file = file 22 self.line = line 24 def __str__(self): argument 25 if self.line is not None: 26 return self.file + ':' + str(self.line) 28 return self.file 31 def __init__(self, name, type, location=None): argument 32 self.name = name 33 self.type = type [all …]
|
/packages/apps/Car/libs/ |
D | resource_generator.py | 27 def __init__(self): argument 28 self.COLORS = "colors" 29 self.DIMENS = "dimens" 31 self.TAG_DIMEN = "dimen" 33 self.resource_handlers = { 34 self.COLORS : self.HandleColors, 35 self.DIMENS : self.HandleDimens, 38 self.ENCODING = "utf-8" 39 self.XML_HEADER = '<?xml version="1.0" encoding="%s"?>' % self.ENCODING 42 self.AOSP_HEADER = """ [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/data/ |
D | SelfParticipantsData.java | 61 for (final ParticipantData self : mSelfParticipantMap.values()) { in getSelfParticipants() 62 if (!activeOnly || self.isActiveSubscription()) { in getSelfParticipants() 63 list.add(self); in getSelfParticipants() 92 final ParticipantData self = getSelfParticipantById(selfId); in isDefaultSelf() local 93 return self == null ? false : self.getSubId() == ParticipantData.DEFAULT_SELF_SUB_ID; in isDefaultSelf() 98 for (final ParticipantData self : mSelfParticipantMap.values()) { in getSelfParticipantsCountExcludingDefault() 99 if (!self.isDefaultSelf() && (!activeOnly || self.isActiveSubscription())) { in getSelfParticipantsCountExcludingDefault() 107 for (final ParticipantData self : mSelfParticipantMap.values()) { in getDefaultSelfParticipant() 108 if (self.isDefaultSelf()) { in getDefaultSelfParticipant() 109 return self; in getDefaultSelfParticipant()
|
D | SettingsData.java | 89 final ParticipantData self) { in fromSelfParticipant() argument 90 Assert.isTrue(self.isSelf()); in fromSelfParticipant() 91 Assert.isTrue(self.isActiveSubscription()); in fromSelfParticipant() 92 final String displayDetail = TextUtils.isEmpty(self.getDisplayDestination()) ? in fromSelfParticipant() 94 self.getDisplayDestination(); in fromSelfParticipant() 96 self.getSubscriptionName()); in fromSelfParticipant() 98 TYPE_PER_SUBSCRIPTION_SETTINGS, self.getSubId()); in fromSelfParticipant() 204 for (ParticipantData self : selfs) { in getSettingsItems() 205 if (!self.isDefaultSelf()) { in getSettingsItems() 207 settingsItems.add(SettingsItem.fromSelfParticipant(mContext, self)); in getSettingsItems() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/ui/conversation/ |
D | MessageDetailsDialog.java | 54 final ConversationParticipantsData participants, final ParticipantData self) { in show() argument 59 return getMessageDetails(context, data, participants, self); in show() 68 String messageDetails = getMessageDetails(context, data, participants, self); in show() 75 final ConversationParticipantsData participants, final ParticipantData self) { in getMessageDetails() argument 78 messageDetails = getSmsMessageDetails(data, participants, self); in getMessageDetails() 81 messageDetails = getMmsMessageDetails(context, data, participants, self); in getMessageDetails() 103 final ConversationParticipantsData participants, final ParticipantData self) { in getSmsMessageDetails() argument 141 appendSimInfo(res, self, details); in getSmsMessageDetails() 156 final ConversationParticipantsData participants, final ParticipantData self) { in getMmsMessageDetails() argument 207 appendSimInfo(res, self, details); in getMmsMessageDetails() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/ |
D | InsertNewMessageAction.java | 133 final ParticipantData self = getSelf(db, conversationId, message); in executeAction() local 134 if (self == null) { in executeAction() 137 message.bindSelfId(self.getId()); in executeAction() 142 message.bindParticipantId(self.getId()); in executeAction() 152 final int subId = self.getSubId(); in executeAction() 198 ParticipantData self; in getSelf() local 205 self = BugleDatabaseOperations.getOrCreateSelf(db, requestedSubId); in getSelf() 231 self = BugleDatabaseOperations.getOrCreateSelf(db, defaultSubId); in getSelf() 233 self = unboundSelf; in getSelf() 236 return self; in getSelf() [all …]
|
D | SyncMessageBatch.java | 158 final ParticipantData self = ParticipantData.getSelfParticipant(sms.getSubId()); in storeSms() local 160 BugleDatabaseOperations.getOrCreateParticipantInTransaction(db, self); in storeSms() 162 self : in storeSms() 252 final ParticipantData self = ParticipantData.getSelfParticipant(mms.getSubId()); in storeMms() local 254 BugleDatabaseOperations.getOrCreateParticipantInTransaction(db, self); in storeMms() 256 self : ParticipantData.getFromRawPhoneBySimLocale(senderId, mms.getSubId()); in storeMms()
|
D | ReceiveMmsMessageAction.java | 69 final ParticipantData self = BugleDatabaseOperations.getOrCreateSelf(db, subId); in executeAction() local 78 context, pushData, self.getSubId(), self.getNormalizedDestination()); in executeAction() 111 BugleDatabaseOperations.getOrCreateParticipantInTransaction(db, self); in executeAction()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | UserBinaryDictionary.java | 75 public void onChange(final boolean self) { in UserBinaryDictionary() 79 onChange(self, null); in UserBinaryDictionary() 85 public void onChange(final boolean self, final Uri uri) { in UserBinaryDictionary()
|
/packages/services/Car/procfs-inspector/server/ |
D | main.cpp | 32 sp<ProcessState> processSelf(ProcessState::self()); in main() 42 IPCThreadState::self()->joinThreadPool(); in main()
|