Clear registered prediction callbacks on destroy

destroy() removes callbacks from AppPredictionManagerService but not
from mRegisteredCallbacks.

Bug: 149388856
Test: manual
Change-Id: Id08d6b20362486bd1640310c64da35e0382d9b5e
This commit is contained in:
Samuel Fufa
2020-02-21 19:03:35 -08:00
parent 27f83cdbce
commit 191149a4d0

View File

@@ -260,6 +260,7 @@ public final class AppPredictor {
Log.e(TAG, "Failed to notify app target event", e);
e.rethrowAsRuntimeException();
}
mRegisteredCallbacks.clear();
} else {
throw new IllegalStateException("This client has already been destroyed.");
}