Used to save space in the framework.jar which isn't r8 optimized to remove unused constants. Bug: 321668269 Test: abtd running v2/android-crystalball-eng/health/microbench/bootup/idle/aosp/system-processes-memory and checking pinner_system_/system/framework/framework.jar_bytes metric value Change-Id: I32d16f80364e3446799498318e40844bc8adfc5a
45 lines
902 B
C++
45 lines
902 B
C++
#include <stdio.h>
|
|
|
|
#include <iomanip>
|
|
#include <iostream>
|
|
#include <map>
|
|
#include <sstream>
|
|
#include <string>
|
|
|
|
#include "Errors.h"
|
|
#include "java_proto_stream_code_generator.h"
|
|
#include "stream_proto_utils.h"
|
|
|
|
using namespace android::stream_proto;
|
|
using namespace google::protobuf::io;
|
|
using namespace std;
|
|
|
|
/**
|
|
*
|
|
* Main.
|
|
*/
|
|
int
|
|
main(int argc, char const*const* argv)
|
|
{
|
|
(void)argc;
|
|
(void)argv;
|
|
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
// Read the request
|
|
CodeGeneratorRequest request;
|
|
request.ParseFromIstream(&cin);
|
|
|
|
CodeGeneratorResponse response = generate_java_protostream_code(request);
|
|
|
|
// If we had errors, don't write the response. Print the errors and exit.
|
|
if (ERRORS.HasErrors()) {
|
|
ERRORS.Print();
|
|
return 1;
|
|
}
|
|
|
|
// If we didn't have errors, write the response and exit happily.
|
|
response.SerializeToOstream(&cout);
|
|
return 0;
|
|
}
|