From 03b473db35a21680503c9db40a6f468e7eedac0e Mon Sep 17 00:00:00 2001 From: Rafal Slawik Date: Thu, 11 Mar 2021 13:35:17 +0000 Subject: [PATCH] Fix: pass frequency as int Frequency should be passed as an int to match the field type declared in the atom. Bug: 182375361 Test: existing tests pass Test: atest CpuStatsTests Test: cmd stats pull-source 10095 Change-Id: I6ef06874dd8acafa74def4dae7035c9bf3cd764d --- .../com/android/server/stats/pull/StatsPullAtomService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java index 7ed7a592a9729..ecea10dedd9a2 100644 --- a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java +++ b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java @@ -1479,7 +1479,7 @@ public class StatsPullAtomService extends SystemService { } for (int freqIndex = 0; freqIndex < timesMs.length; ++freqIndex) { int cluster = freqsClusters[freqIndex]; - long freq = freqs[freqIndex]; + int freq = (int) freqs[freqIndex]; long timeMs = timesMs[freqIndex]; pulledData.add(FrameworkStatsLog.buildStatsEvent(atomTag, cluster, freq, timeMs)); }