Lines Matching refs:args
255 Vector<String8> args; in onTransact() local
257 args.add(String8(data.readString16())); in onTransact()
263 err = command(in, out, err, args, resultReceiver); in onTransact()
282 status_t StatsService::dump(int fd, const Vector<String16>& args) { in dump() argument
286 int lastArg = args.size() - 1; in dump()
288 if (lastArg >= 0 && !args[lastArg].compare(String16("--proto"))) { // last argument in dump()
292 if (args.size() > 0 && !args[0].compare(String16("--metadata"))) { // first argument in dump()
295 if (lastArg >= 0 && !args[lastArg].compare(String16("-v"))) { in dump()
350 status_t StatsService::command(int in, int out, int err, Vector<String8>& args, in command() argument
357 const int argCount = args.size(); in command()
360 if (!args[0].compare(String8("config"))) { in command()
361 return cmd_config(in, out, err, args); in command()
364 if (!args[0].compare(String8("print-uid-map"))) { in command()
365 return cmd_print_uid_map(out, args); in command()
368 if (!args[0].compare(String8("dump-report"))) { in command()
369 return cmd_dump_report(out, args); in command()
372 if (!args[0].compare(String8("pull-source")) && args.size() > 1) { in command()
373 return cmd_print_pulled_metrics(out, args); in command()
376 if (!args[0].compare(String8("send-broadcast"))) { in command()
377 return cmd_trigger_broadcast(out, args); in command()
380 if (!args[0].compare(String8("print-stats"))) { in command()
381 return cmd_print_stats(out, args); in command()
384 if (!args[0].compare(String8("meminfo"))) { in command()
388 if (!args[0].compare(String8("write-to-disk"))) { in command()
392 if (!args[0].compare(String8("log-app-breadcrumb"))) { in command()
393 return cmd_log_app_breadcrumb(out, args); in command()
396 if (!args[0].compare(String8("log-binary-push"))) { in command()
397 return cmd_log_binary_push(out, args); in command()
400 if (!args[0].compare(String8("clear-puller-cache"))) { in command()
404 if (!args[0].compare(String8("print-logs"))) { in command()
405 return cmd_print_logs(out, args); in command()
407 if (!args[0].compare(String8("send-active-configs"))) { in command()
408 return cmd_trigger_active_config_broadcast(out, args); in command()
410 if (!args[0].compare(String8("data-subscribe"))) { in command()
419 timeoutSec = atoi(args[1].c_str()); in command()
548 status_t StatsService::cmd_trigger_broadcast(int out, Vector<String8>& args) { in cmd_trigger_broadcast() argument
552 const int argCount = args.size(); in cmd_trigger_broadcast()
556 name.assign(args[1].c_str(), args[1].size()); in cmd_trigger_broadcast()
559 good = getUidFromArgs(args, 1, uid); in cmd_trigger_broadcast()
564 name.assign(args[2].c_str(), args[2].size()); in cmd_trigger_broadcast()
576 VLOG("Could not find receiver for %s, %s", args[1].c_str(), args[2].c_str()) in cmd_trigger_broadcast()
579 VLOG("StatsService::trigger broadcast succeeded to %s, %s", args[1].c_str(), in cmd_trigger_broadcast()
580 args[2].c_str()); in cmd_trigger_broadcast()
586 status_t StatsService::cmd_trigger_active_config_broadcast(int out, Vector<String8>& args) { in cmd_trigger_active_config_broadcast() argument
587 const int argCount = args.size(); in cmd_trigger_active_config_broadcast()
596 if(args[curArg].find("--uid=") == 0) { in cmd_trigger_active_config_broadcast()
597 string uidArgStr(args[curArg].c_str()); in cmd_trigger_active_config_broadcast()
608 if (curArg == argCount || args[curArg] != "--configs") { in cmd_trigger_active_config_broadcast()
616 int64_t configID = strtoll(args[i].c_str(), &endp, 10); in cmd_trigger_active_config_broadcast()
617 if (endp == args[i].c_str() || *endp != '\0') { in cmd_trigger_active_config_broadcast()
639 status_t StatsService::cmd_config(int in, int out, int err, Vector<String8>& args) { in cmd_config() argument
640 const int argCount = args.size(); in cmd_config()
642 if (args[1] == "update" || args[1] == "remove") { in cmd_config()
650 name.assign(args[2].c_str(), args[2].size()); in cmd_config()
653 good = getUidFromArgs(args, 2, uid); in cmd_config()
658 name.assign(args[3].c_str(), args[3].size()); in cmd_config()
659 } else if (argCount == 2 && args[1] == "remove") { in cmd_config()
669 if (args[1] == "update") { in cmd_config()
709 status_t StatsService::cmd_dump_report(int out, const Vector<String8>& args) { in cmd_dump_report() argument
711 int argCount = args.size(); in cmd_dump_report()
718 if (!std::strcmp("--proto", args[argCount-1].c_str())) { in cmd_dump_report()
722 if (!std::strcmp("--include_current_bucket", args[argCount-1].c_str())) { in cmd_dump_report()
726 if (!std::strcmp("--keep_data", args[argCount-1].c_str())) { in cmd_dump_report()
733 name.assign(args[1].c_str(), args[1].size()); in cmd_dump_report()
736 good = getUidFromArgs(args, 1, uid); in cmd_dump_report()
741 name.assign(args[2].c_str(), args[2].size()); in cmd_dump_report()
768 status_t StatsService::cmd_print_stats(int out, const Vector<String8>& args) { in cmd_print_stats() argument
769 int argCount = args.size(); in cmd_print_stats()
771 if (!std::strcmp("--proto", args[argCount-1].c_str())) { in cmd_print_stats()
794 status_t StatsService::cmd_print_uid_map(int out, const Vector<String8>& args) { in cmd_print_uid_map() argument
795 if (args.size() > 1) { in cmd_print_uid_map()
797 pkg.assign(args[1].c_str(), args[1].size()); in cmd_print_uid_map()
816 status_t StatsService::cmd_log_app_breadcrumb(int out, const Vector<String8>& args) { in cmd_log_app_breadcrumb() argument
821 const int argCount = args.size(); in cmd_log_app_breadcrumb()
825 label = atoi(args[1].c_str()); in cmd_log_app_breadcrumb()
826 state = atoi(args[2].c_str()); in cmd_log_app_breadcrumb()
829 good = getUidFromArgs(args, 1, uid); in cmd_log_app_breadcrumb()
835 label = atoi(args[2].c_str()); in cmd_log_app_breadcrumb()
836 state = atoi(args[3].c_str()); in cmd_log_app_breadcrumb()
848 status_t StatsService::cmd_log_binary_push(int out, const Vector<String8>& args) { in cmd_log_binary_push() argument
850 const int argCount = args.size(); in cmd_log_binary_push()
855 android::String16 trainName = android::String16(args[1].c_str()); in cmd_log_binary_push()
856 int64_t trainVersion = strtoll(args[2].c_str(), nullptr, 10); in cmd_log_binary_push()
858 if (args[3] == "1") { in cmd_log_binary_push()
861 if (args[4] == "1") { in cmd_log_binary_push()
864 if (args[5] == "1") { in cmd_log_binary_push()
867 int32_t state = atoi(args[6].c_str()); in cmd_log_binary_push()
870 vector<string> experimentIdsString = android::base::Split(string(args[7].c_str()), ","); in cmd_log_binary_push()
881 status_t StatsService::cmd_print_pulled_metrics(int out, const Vector<String8>& args) { in cmd_print_pulled_metrics() argument
882 int s = atoi(args[1].c_str()); in cmd_print_pulled_metrics()
920 status_t StatsService::cmd_print_logs(int out, const Vector<String8>& args) { in cmd_print_logs() argument
926 if (args.size() >= 2) { in cmd_print_logs()
927 enabled = atoi(args[1].c_str()) != 0; in cmd_print_logs()
936 bool StatsService::getUidFromArgs(const Vector<String8>& args, size_t uidArgIndex, int32_t& uid) { in getUidFromArgs() argument
937 return getUidFromString(args[uidArgIndex].c_str(), uid); in getUidFromArgs()