code: @Nonnull
      public List<Resource> getResourcesById(long resourceId) {
          // An Android Resource id is a 32-bit integer. It comprises
          // an 8-bit Package id [bits 24-31]
          // an 8-bit Type id [bits 16-23]
          // a 16-bit Entry index [bits 0-15]
  
  
          short packageId = (short) (resourceId >> 24 & 0xff);
          short typeId = (short) ((resourceId >> 16) & 0xff);
          int entryIndex = (int) (resourceId & 0xffff);
          ResourcePackage resourcePackage = this.getPackage(packageId);
          if (resourcePackage == null) {
              return Collections.emptyList();
          }
          TypeSpec typeSpec = resourcePackage.getTypeSpec(typeId);
          List<Type> types = resourcePackage.getTypes(typeId);
          if (typeSpec == null || types == null) {
              return Collections.emptyList();
          }
          if (!typeSpec.exists(entryIndex)) {
              return Collections.emptyList();
          }
  
          // read from type resource
          List<Resource> result = new ArrayList<>();
          for (Type type : types) {
              ResourceEntry resourceEntry = type.getResourceEntry(entryIndex);
              if (resourceEntry == null) {
                  continue;
              }
              ResourceValue currentResourceValue = resourceEntry.getValue();
              if (currentResourceValue == null) {
                  continue;
              }
  
              // cyclic reference detect
              if (currentResourceValue instanceof ResourceValue.ReferenceResourceValue) {
                  if (resourceId == ((ResourceValue.ReferenceResourceValue) currentResourceValue)
                          .getReferenceResourceId()) {
                      continue;
                  }
              }
  
              result.add(new Resource(typeSpec, type, resourceEntry));
          }
          return result;
      }
docs: Get resources match the given resource id.