Merge "[Telephony] Return if context is null when register TelephonyCallback" am: a805d39229 am: 51f11f9b0b am: aab9659d41
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644386 Change-Id: Iee971b6fdac174392e75e1ae49ef09446faf1257
This commit is contained in:
@@ -15100,6 +15100,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