Use the right method to get the component state

Bug: 346935456
Test: atest CtsPackageManagerStatsHostTestCases
Change-Id: I956481478954c9eaadb4ba782a3109a7b25cf1f4
1 file changed