code: void unregisterReceiver() {
          try {
              final Context context = contextRef.get();
              if (context != null) {
                  context.unregisterReceiver(receiver);
              }
          } catch (IllegalArgumentException e) {
          }
      }
docs: Unregister network state broadcast receiver