Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8eac3a3f authored by Zoey Chen's avatar Zoey Chen
Browse files

[Telephony] Return if context is null when register TelephonyCallback

Bug: 183064691
Test: make
Change-Id: Ic77a6085f05c942dcd7514bc78b7bfa46938ec38
parent 36b03734
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -14576,6 +14576,11 @@ public class TelephonyManager {
     */
    public void registerTelephonyCallback(@NonNull @CallbackExecutor Executor executor,
            @NonNull TelephonyCallback callback) {
        if (mContext == null) {
            throw new IllegalStateException("telephony service is null.");
        }
        if (executor == null || callback == null) {
            throw new IllegalArgumentException("TelephonyCallback and executor must be non-null");
        }