diff options
author | 2022-09-14 14:25:32 +0800 | |
---|---|---|
committer | 2022-09-14 06:30:27 +0000 | |
commit | d3b21f910a1f1b44be5c1f6dcf88c4b7502e1cb5 (patch) | |
tree | ec2c68e50e8cf35850ab74bdfbbb3117b9cd2a4e /services/profcollect | |
parent | f63f20af72e63c29d341ce68187d5e581de4cf30 (diff) |
profcollect: Fix possible NPE in ProfcollectBGJobService
The native service might have died, in which case, abort.
Test: presubmit
Bug: 246660820
Change-Id: I171a0031db104d2c008ee7ef9709f15f76d70b1a
Diffstat (limited to 'services/profcollect')
-rw-r--r-- | services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java index 3c6866205fda..f05b1d47ac0b 100644 --- a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java +++ b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java @@ -218,6 +218,9 @@ public final class ProfcollectForwardingService extends SystemService { BackgroundThread.get().getThreadHandler().post( () -> { try { + if (sSelfService.mIProfcollect == null) { + return; + } sSelfService.mIProfcollect.process(); } catch (RemoteException e) { Log.e(LOG_TAG, "Failed to process profiles in background: " |