Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 58) sorted by relevance

123

/packages/services/Car/tools/hidl_parser/
Dparser.py85 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/
Dvhal_emulator_test.py61 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 …]
Dobd2_to_diagjson.py40 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 …]
Ddiagnostic_builder.py27 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 …]
Ddriving_info_generator.py71 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 …]
Duser_action_generator.py57 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 …]
Dvhal_emulator.py111 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 …]
Ddiagnostic_injector.py52 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 …]
Dvhal_prop_simulator.py37 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/
Dbugreport_app_tester_test.py29 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 …]
Dbugreport_app_tester.py128 def __init__(self, serialno): argument
134 self._serialno = serialno
136 def _read_lines_from_subprocess(self, popen): argument
148 def adb(self, cmd): argument
160 if self._serialno:
161 full_cmd = ['adb', '-s', self._serialno] + cmd
165 stdout_lines = self._read_lines_from_subprocess(popen)
169 def adbx(self, cmd): argument
178 exit_code, stdout_lines = self.adb(cmd)
183 def is_adb_root(self): argument
[all …]
/packages/services/Car/tools/ioanalyze/
Danalyzer.py10 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/
Dpdf_render.c52 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 …]
Dwprint_mupdf.h37 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/
Dupdate-obd2-sensors.py30 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/
Dresource_generator.py27 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/
DSelfParticipantsData.java59 for (final ParticipantData self : mSelfParticipantMap.values()) { in getSelfParticipants()
60 if (!activeOnly || self.isActiveSubscription()) { in getSelfParticipants()
61 list.add(self); in getSelfParticipants()
81 final ParticipantData self = getSelfParticipantById(selfId); in isDefaultSelf() local
82 return self == null ? false : self.getSubId() == ParticipantData.DEFAULT_SELF_SUB_ID; in isDefaultSelf()
87 for (final ParticipantData self : mSelfParticipantMap.values()) { in getSelfParticipantsCountExcludingDefault()
88 if (!self.isDefaultSelf() && (!activeOnly || self.isActiveSubscription())) { in getSelfParticipantsCountExcludingDefault()
96 for (final ParticipantData self : mSelfParticipantMap.values()) { in getDefaultSelfParticipant()
97 if (self.isDefaultSelf()) { in getDefaultSelfParticipant()
98 return self; in getDefaultSelfParticipant()
DSettingsData.java89 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/
DMessageDetailsDialog.java54 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/
DInsertNewMessageAction.java134 final ParticipantData self = getSelf(db, conversationId, message); in executeAction() local
135 if (self == null) { in executeAction()
138 message.bindSelfId(self.getId()); in executeAction()
143 message.bindParticipantId(self.getId()); in executeAction()
153 final int subId = self.getSubId(); in executeAction()
197 ParticipantData self; in getSelf() local
204 self = BugleDatabaseOperations.getOrCreateSelf(db, requestedSubId); in getSelf()
230 self = BugleDatabaseOperations.getOrCreateSelf(db, defaultSubId); in getSelf()
232 self = unboundSelf; in getSelf()
235 return self; in getSelf()
[all …]
DSyncMessageBatch.java158 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()
DReceiveMmsMessageAction.java69 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/
DUserBinaryDictionary.java75 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/
Dmain.cpp32 sp<ProcessState> processSelf(ProcessState::self()); in main()
42 IPCThreadState::self()->joinThreadPool(); in main()
/packages/services/Car/tests/PowerTestService/src/
Dmain.cpp51 sp<ProcessState> processSelf(ProcessState::self()); in main()
72 IPCThreadState::self()->joinThreadPool(); in main()

123