static LoadedArsc Load(StringPiece data,
      LoadedIdmap loaded_idmap /* = null */, boolean system /* = false */,
      boolean load_as_shared_library /* = false */) {
    // ATRACE_NAME("LoadedArsc::LoadTable");

    // Not using make_unique because the constructor is private.
    LoadedArsc loaded_arsc = new LoadedArsc();
    loaded_arsc.system_ = system;

    Chunk.Iterator iter = new Iterator(data, data.size());
    while (iter.HasNext()) {
      Chunk chunk = iter.Next();
      switch (chunk.type()) {
        case RES_TABLE_TYPE:
          if (!loaded_arsc.LoadTable(chunk, loaded_idmap, load_as_shared_library)) {
            return emptyBraces();
          }
          break;

        default:
          logWarning(String.format("Unknown chunk type '%02x'.", chunk.type()));
          break;
      }
    }

    if (iter.HadError()) {
      logError(iter.GetLastError());
      if (iter.HadFatalError()) {
        return emptyBraces();
      }
    }

    // Need to force a move for mingw32.
    // return std.move(loaded_arsc);
    return loaded_arsc;
  }
static LoadedArsc Load(StringPiece data,
      LoadedIdmap loaded_idmap , boolean system ,
      boolean load_as_shared_library ) {
    

    
    LoadedArsc loaded_arsc = new LoadedArsc();
    loaded_arsc.system_ = system;

    Chunk.Iterator iter = new Iterator(data, data.size());
    while (iter.HasNext()) {
      Chunk chunk = iter.Next();
      switch (chunk.type()) {
        case RES_TABLE_TYPE:
          if (!loaded_arsc.LoadTable(chunk, loaded_idmap, load_as_shared_library)) {
            return emptyBraces();
          }
          break;

        default:
          logWarning(String.format("Unknown chunk type '%02x'.", chunk.type()));
          break;
      }
    }

    if (iter.HadError()) {
      logError(iter.GetLastError());
      if (iter.HadFatalError()) {
        return emptyBraces();
      }
    }

    
    
    return loaded_arsc;
  }
static LoadedArsc Load ( StringPiece data , LoadedIdmap loaded_idmap /* = null */ , boolean system /* = false */ , boolean load_as_shared_library /* = false */ ) { // ATRACE_NAME("LoadedArsc::LoadTable"); // Not using make_unique because the constructor is private. LoadedArsc loaded_arsc = new LoadedArsc ( ) ; loaded_arsc . system_ = system ; Chunk . Iterator iter = new Iterator ( data , data . size ( ) ) ; while ( iter . HasNext ( ) ) { Chunk chunk = iter . Next ( ) ; switch ( chunk . type ( ) ) { case RES_TABLE_TYPE : if ( ! loaded_arsc . LoadTable ( chunk , loaded_idmap , load_as_shared_library ) ) { return emptyBraces ( ) ; } break ; default : logWarning ( String . format ( "Unknown chunk type '%02x'." , chunk . type ( ) ) ) ; break ; } } if ( iter . HadError ( ) ) { logError ( iter . GetLastError ( ) ) ; if ( iter . HadFatalError ( ) ) { return emptyBraces ( ) ; } } // Need to force a move for mingw32. // return std.move(loaded_arsc); return loaded_arsc ; }
ID.
ID .