OSDN Git Service

Check for null executor
authorSooraj Sasindran <sasindran@google.com>
Mon, 24 Jun 2019 22:17:21 +0000 (15:17 -0700)
committerSooraj Sasindran <sasindran@google.com>
Mon, 24 Jun 2019 22:22:55 +0000 (15:22 -0700)
Check for null executor when invalid parameters are passed

Test: build
Bug: 135927110
Change-Id: I12014f4da00d3783506642162ad7668fc7c05d9d

telephony/java/android/telephony/TelephonyManager.java

index 2b843cd..7b3fdf1 100644 (file)
@@ -10884,6 +10884,9 @@ public class TelephonyManager {
         try {
             IOns iOpportunisticNetworkService = getIOns();
             if (iOpportunisticNetworkService == null || availableNetworks == null) {
+                if (executor == null || callback == null) {
+                    return;
+                }
                 Binder.withCleanCallingIdentity(() -> executor.execute(() -> {
                     callback.accept(UPDATE_AVAILABLE_NETWORKS_INVALID_ARGUMENTS);
                 }));