Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22ead1c3 authored by Ryan Mitchell's avatar Ryan Mitchell
Browse files

Remove lite optimization from protos

aapt2 does not require the lite runtime optimization to reduce binary
size. Removing the allows for the protos to be optimized for speed
instead of binary size and grants access to refelctive operations.

Test: aapt2_tests on linux and windows
Change-Id: Ie7ed9df4061e2eb60adbd300eb358d4c3f32c80c
parent 9c6483c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ cc_defaults {
        "libziparchive",
        "libpng",
        "libbase",
        "libprotobuf-cpp-lite",
        "libprotobuf-cpp-full",
        "libz",
        "libbuildversion",
    ],
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ syntax = "proto3";
package aapt.pb;

option java_package = "com.android.aapt";
option optimize_for = LITE_RUNTIME;

// A description of the requirements a device must have in order for a
// resource to be matched and selected.
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import "frameworks/base/tools/aapt2/Configuration.proto";
package aapt.pb;

option java_package = "com.android.aapt";
option optimize_for = LITE_RUNTIME;

// A string pool that wraps the binary form of the C++ class android::ResStringPool.
message StringPool {
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import "frameworks/base/tools/aapt2/Resources.proto";
package aapt.pb.internal;

option java_package = "android.aapt.pb.internal";
option optimize_for = LITE_RUNTIME;

// The top level message representing an external resource file (layout XML, PNG, etc).
// This is used to represent a compiled file before it is linked. Only useful to aapt2.
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ bool CopyFileToArchivePreserveCompression(IAaptContext* context, io::IFile* file
  return CopyFileToArchive(context, file, out_path, compression_flags, writer);
}

bool CopyProtoToArchive(IAaptContext* context, ::google::protobuf::MessageLite* proto_msg,
bool CopyProtoToArchive(IAaptContext* context, ::google::protobuf::Message* proto_msg,
                        const std::string& out_path, uint32_t compression_flags,
                        IArchiveWriter* writer) {
  TRACE_CALL();
Loading