code: public
      @Nullable
      List<Appstore> discoverOpenStores() {
          if (Utils.uiThread()) {
              throw new IllegalStateException("Must not be called from UI thread");
          }
  
          final List<Appstore> openAppstores = new ArrayList<Appstore>();
          final CountDownLatch countDownLatch = new CountDownLatch(1);
          discoverOpenStores(new OpenStoresDiscoveredListener() {
              @Override
              public void openStoresDiscovered(@NotNull final List<Appstore> appstores) {
                  openAppstores.addAll(appstores);
                  countDownLatch.countDown();
              }
          });
          try {
              countDownLatch.await();
          } catch (InterruptedException e) {
              return null;
          }
          return openAppstores;
      }
docs: Discovers a list of all available Open Stores.
  
  @return a list of all available Open Stores.