Home
last modified time | relevance | path

Searched refs:stateResidencyResult (Results 1 – 5 of 5) sorted by relevance

/frameworks/base/services/core/java/com/android/server/powerstats/
DProtoStreamUtils.java112 public static void adjustTimeSinceBootToEpoch(StateResidencyResult[] stateResidencyResult, in adjustTimeSinceBootToEpoch() argument
114 if (stateResidencyResult == null) return; in adjustTimeSinceBootToEpoch()
116 for (int i = 0; i < stateResidencyResult.length; i++) { in adjustTimeSinceBootToEpoch()
117 final int stateLength = stateResidencyResult[i].stateResidencyData.length; in adjustTimeSinceBootToEpoch()
120 stateResidencyResult[i].stateResidencyData[j]; in adjustTimeSinceBootToEpoch()
126 public static byte[] getProtoBytes(StateResidencyResult[] stateResidencyResult) { in getProtoBytes() argument
128 packProtoMessage(stateResidencyResult, pos); in getProtoBytes()
132 public static void packProtoMessage(StateResidencyResult[] stateResidencyResult, in packProtoMessage() argument
134 if (stateResidencyResult == null) return; in packProtoMessage()
136 for (int i = 0; i < stateResidencyResult.length; i++) { in packProtoMessage()
[all …]
DPowerStatsLogger.java240 StateResidencyResult[] stateResidencyResult = in writeResidencyDataToFile()
242 StateResidencyResultUtils.packProtoMessage(stateResidencyResult, pos); in writeResidencyDataToFile()
243 if (DEBUG) StateResidencyResultUtils.print(stateResidencyResult); in writeResidencyDataToFile()
/frameworks/base/tools/powerstats/
DPowerStatsServiceProtoParser.java120 StateResidencyResultProto stateResidencyResult = proto.getStateResidencyResult(i); in printStateResidencyResult() local
121 csvRow += stateResidencyResult.getId() + ","; in printStateResidencyResult()
123 for (int j = 0; j < stateResidencyResult.getStateResidencyDataCount(); j++) { in printStateResidencyResult()
124 StateResidencyProto stateResidency = stateResidencyResult.getStateResidencyData(j); in printStateResidencyResult()
/frameworks/base/services/core/jni/
Dcom_android_server_powerstats_PowerStatsService.cpp238 jobject stateResidencyResult = env->NewObject(class_SRR, method_SRR_init); in nativeGetStateResidency() local
239 env->SetIntField(stateResidencyResult, field_SRR_id, results[i].powerEntityId); in nativeGetStateResidency()
240 env->SetObjectField(stateResidencyResult, field_SRR_stateResidencyData, in nativeGetStateResidency()
242 env->SetObjectArrayElement(stateResidencyResultArray, i, stateResidencyResult); in nativeGetStateResidency()
243 env->DeleteLocalRef(stateResidencyResult); in nativeGetStateResidency()
/frameworks/base/services/tests/servicestests/src/com/android/server/powerstats/
DPowerStatsServiceTest.java415 assertTrue(pssProto.stateResidencyResult.length == POWER_ENTITY_COUNT); in testWrittenResidencyDataMatchesReadIncidentReportData()
416 for (int i = 0; i < pssProto.stateResidencyResult.length; i++) { in testWrittenResidencyDataMatchesReadIncidentReportData()
417 StateResidencyResultProto stateResidencyResult = pssProto.stateResidencyResult[i]; in testWrittenResidencyDataMatchesReadIncidentReportData() local
418 assertTrue(stateResidencyResult.id == i); in testWrittenResidencyDataMatchesReadIncidentReportData()
419 assertTrue(stateResidencyResult.stateResidencyData.length == STATE_RESIDENCY_COUNT); in testWrittenResidencyDataMatchesReadIncidentReportData()
420 for (int j = 0; j < stateResidencyResult.stateResidencyData.length; j++) { in testWrittenResidencyDataMatchesReadIncidentReportData()
421 StateResidencyProto stateResidency = stateResidencyResult.stateResidencyData[j]; in testWrittenResidencyDataMatchesReadIncidentReportData()
561 assertTrue(pssProto.stateResidencyResult.length == 0); in testCorruptOnDeviceResidencyStorage()
697 assertTrue(pssProto.stateResidencyResult.length == 0); in testNotEnoughBytesAfterResidencyLengthField()