commit | f4e0f096b5a87ab3083d4e423b2baf0de7bae9ac | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Sat Jan 07 02:11:16 2023 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Sat Jan 07 02:11:16 2023 +0000 |
tree | 5d7f54d0cc4e9bc76c9678e9d796499d0dc7eba9 | |
parent | 4f46dd8d7846fb399d376e348bf153e175499b20 [diff] | |
parent | cf42d60c5309ba946ed67af508f242ba714b32a9 [diff] |
Merge "unregistered null callback will cause a crash later"
diff --git a/Tethering/src/com/android/networkstack/tethering/Tethering.java b/Tethering/src/com/android/networkstack/tethering/Tethering.java index b3ec805..e1b7016 100644 --- a/Tethering/src/com/android/networkstack/tethering/Tethering.java +++ b/Tethering/src/com/android/networkstack/tethering/Tethering.java
@@ -2407,6 +2407,9 @@ /** Unregister tethering event callback */ void unregisterTetheringEventCallback(ITetheringEventCallback callback) { + if (callback == null) { + throw new NullPointerException(); + } mHandler.post(() -> { mTetheringEventCallbacks.unregister(callback); });