code: @Implementation(minSdk = P)
    protected static int nativeGetResourceArraySize(long ptr, @ArrayRes int resid) {
      CppAssetManager2 assetmanager = AssetManagerFromLong(ptr);
      ResolvedBag bag = assetmanager.GetBag(resid);
      if (bag == null) {
        return -1;
      }
      return (int) (bag.entry_count);
    }
docs: static jint NativeGetResourceArraySize(JNIEnv* /*env*/, jclass /*clazz*/, jlong ptr, jint resid) {