Merge "[Telephony] Return if context is null when register TelephonyCallback" am: a805d39229

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644386

Change-Id: I3290feb8ffea6f18240995c6d96c3893e2fa4b51
This commit is contained in:
Zoey Chen
2021-03-19 09:59:22 +00:00
committed by Automerger Merge Worker

View File

@@ -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");
}