unregistered null callback will cause a crash later
Bug: N/A Change-Id: I7acbc084d8a401817879d416f0283ca40e060069 Test: N/A
This commit is contained in:
parent
28b9a29e04
commit
cf42d60c53
1 changed files with 3 additions and 0 deletions
|
|
@ -2407,6 +2407,9 @@ public class Tethering {
|
|||
|
||||
/** Unregister tethering event callback */
|
||||
void unregisterTetheringEventCallback(ITetheringEventCallback callback) {
|
||||
if (callback == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
mHandler.post(() -> {
|
||||
mTetheringEventCallbacks.unregister(callback);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue