Ejemplo n.º 1
0
  /**
   * Clear the tracked visited folders & the cached {@link LocalPkgInfo} for the given filter types.
   *
   * @param filters A set of PkgType constants or {@link PkgType#PKG_ALL} to clear everything.
   */
  public void clearLocalPkg(@NonNull EnumSet<PkgType> filters) {
    mLegacyBuildTools = null;

    synchronized (mLocalPackages) {
      for (PkgType filter : filters) {
        mVisitedDirs.removeAll(filter);
        mLocalPackages.removeAll(filter);
      }

      // Clear the targets if the platforms or addons are being cleared
      if (filters.contains(PkgType.PKG_PLATFORM) || filters.contains(PkgType.PKG_ADDON)) {
        mCachedMissingTargets = null;
        mCachedTargets = null;
      }
    }
  }