Merge "Fixing possible NullPointerException" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d45d287761
@@ -316,6 +316,10 @@ public class ForegroundServiceTypeLoggerModule {
|
|||||||
// then we should care, otherwise we assume
|
// then we should care, otherwise we assume
|
||||||
// it's not related to any FGS
|
// it's not related to any FGS
|
||||||
UidState uidState = mUids.get(uid);
|
UidState uidState = mUids.get(uid);
|
||||||
|
if (uidState == null) {
|
||||||
|
Log.w(TAG, "API event end called before start!");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
if (uidState.mOpenWithFgsCount.contains(apiType)) {
|
if (uidState.mOpenWithFgsCount.contains(apiType)) {
|
||||||
// are there any calls that started with an FGS?
|
// are there any calls that started with an FGS?
|
||||||
if (uidState.mOpenWithFgsCount.get(apiType) != 0) {
|
if (uidState.mOpenWithFgsCount.get(apiType) != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user