docs: public static int[] extractThemeAttrs(TypedArray array) {
          int[] scrap = null;
          /*if (mRecycled) {
              throw new RuntimeException("Cannot make calls to a recycled instance!");
          }*/
  
          int[] attrs = null;
          int[] mData = null;
  
          try {
              Field mDataField = array.getClass().getDeclaredField("mData");
              mDataField.setAccessible(true);
              mData = (int[]) mDataField.get(array);
          } catch (NoSuchFieldException e) {
              e.printStackTrace();
          } catch (IllegalAccessException e) {
              e.printStackTrace();
          }
          final int[] data = mData;
          final int N = array.length();
          for (int i = 0; i < N; i++) {
              final int index = i * STYLE_NUM_ENTRIES;
              if (data[index + STYLE_TYPE] != TypedValue.TYPE_ATTRIBUTE) {
                  // Not an attribute, ignore.
                  continue;
              }
  
              // Null the entry so that we can safely call getZzz().
              data[index + STYLE_TYPE] = TypedValue.TYPE_NULL;
  
              final int attr = data[index + STYLE_DATA];
              if (attr == 0) {
                  // Useless data, ignore.
                  continue;
              }
  
              // Ensure we have a usable attribute array.
              if (attrs == null) {
                  if (scrap != null && scrap.length == N) {
                      attrs = scrap;
                      Arrays.fill(attrs, 0);
                  } else {
                      attrs = new int[N];
                  }
              }
  
              attrs[i] = attr;
          }
  
          return attrs;
      }