275e085d5a
Require that method callers always provide relevant paths, instead of relying on constructor. Move DisplayMetrics to be an overall parser parameter, and move PARSE_TRUSTED_OVERLAY to flags. Parse split APKs and apply deterministic ordering based on split names. Assert consistent package name and version code across all split APKs in a package, and enforce unique split names and required base APK. Collect certificates for split APKs, enforcing they're all signed consistently. Better flow control and resource cleanup when collecting certs. Refactor validation code so it's easier to reason about. Cleaner maintenance of read buffer when draining stream contents. Change-Id: I8bc8c62095fbb933227b9e76ad8771f4b1246fe8