Merge "[Telephony] Return if context is null when register TelephonyCallback"
This commit is contained in:
@@ -14574,6 +14574,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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user