profcollect: Fix possible NPE in ProfcollectBGJobService
The native service might have died, in which case, abort.
Test: presubmit
Bug: 246660820
Change-Id: I171a0031db104d2c008ee7ef9709f15f76d70b1a
(cherry picked from commit d3b21f910a)
Merged-In: I171a0031db104d2c008ee7ef9709f15f76d70b1a
This commit is contained in:
committed by
Cherrypicker Worker
parent
1d04b19658
commit
703bd8e67e
@@ -218,6 +218,9 @@ public final class ProfcollectForwardingService extends SystemService {
|
|||||||
BackgroundThread.get().getThreadHandler().post(
|
BackgroundThread.get().getThreadHandler().post(
|
||||||
() -> {
|
() -> {
|
||||||
try {
|
try {
|
||||||
|
if (sSelfService.mIProfcollect == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
sSelfService.mIProfcollect.process();
|
sSelfService.mIProfcollect.process();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(LOG_TAG, "Failed to process profiles in background: "
|
Log.e(LOG_TAG, "Failed to process profiles in background: "
|
||||||
|
|||||||
Reference in New Issue
Block a user