Loading PREUPLOAD.cfg +1 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,7 @@ clang_format = true [Builtin Hooks Options] [Builtin Hooks Options] # Only turn on clang-format check for the following subfolders. # Only turn on clang-format check for the following subfolders. clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp libs/binder/ndk/ libs/graphicsenv/ libs/graphicsenv/ libs/gui/ libs/gui/ libs/renderengine/ libs/renderengine/ Loading cmds/atrace/atrace_userdebug.rc +2 −2 Original line number Original line Diff line number Diff line Loading @@ -9,8 +9,8 @@ on post-fs chmod 0666 /sys/kernel/debug/tracing/events/workqueue/enable chmod 0666 /sys/kernel/debug/tracing/events/workqueue/enable chmod 0666 /sys/kernel/tracing/events/regulator/enable chmod 0666 /sys/kernel/tracing/events/regulator/enable chmod 0666 /sys/kernel/debug/tracing/events/regulator/enable chmod 0666 /sys/kernel/debug/tracing/events/regulator/enable chmod 0666 /sys/kernel/tracing/events/pagecache/enable chmod 0666 /sys/kernel/tracing/events/filemap/enable chmod 0666 /sys/kernel/debug/tracing/events/pagecache/enable chmod 0666 /sys/kernel/debug/tracing/events/filemap/enable # irq # irq chmod 0666 /sys/kernel/tracing/events/irq/enable chmod 0666 /sys/kernel/tracing/events/irq/enable Loading cmds/dumpstate/DumpstateService.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -108,7 +108,8 @@ binder::Status DumpstateService::startBugreport(int, int bugreport_mode, int32_t bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_REMOTE && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_REMOTE && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_WEAR && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_WEAR && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_TELEPHONY && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_TELEPHONY && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_WIFI) { bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_WIFI && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_DEFAULT) { return exception(binder::Status::EX_ILLEGAL_ARGUMENT, return exception(binder::Status::EX_ILLEGAL_ARGUMENT, StringPrintf("Invalid bugreport mode: %d", bugreport_mode)); StringPrintf("Invalid bugreport mode: %d", bugreport_mode)); } } Loading cmds/dumpstate/binder/android/os/IDumpstate.aidl +4 −1 Original line number Original line Diff line number Diff line Loading @@ -40,7 +40,7 @@ interface IDumpstate { boolean getSectionDetails); boolean getSectionDetails); // These modes encapsulate a set of run time options for generating bugreports. // These modes encapsulate a set of run time options for generating bugreports. // A zipped bugreport; default mode. // Takes a bugreport without user interference. const int BUGREPORT_MODE_FULL = 0; const int BUGREPORT_MODE_FULL = 0; // Interactive bugreport, i.e. triggered by the user. // Interactive bugreport, i.e. triggered by the user. Loading @@ -58,6 +58,9 @@ interface IDumpstate { // Bugreport limited to only wifi info. // Bugreport limited to only wifi info. const int BUGREPORT_MODE_WIFI = 5; const int BUGREPORT_MODE_WIFI = 5; // Default mode. const int BUGREPORT_MODE_DEFAULT = 6; /* /* * Starts a bugreport in the background. * Starts a bugreport in the background. */ */ Loading cmds/dumpstate/dumpstate.cpp +8 −2 Original line number Original line Diff line number Diff line Loading @@ -2048,6 +2048,8 @@ static inline const char* ModeToString(Dumpstate::BugreportMode mode) { return "BUGREPORT_TELEPHONY"; return "BUGREPORT_TELEPHONY"; case Dumpstate::BugreportMode::BUGREPORT_WIFI: case Dumpstate::BugreportMode::BUGREPORT_WIFI: return "BUGREPORT_WIFI"; return "BUGREPORT_WIFI"; case Dumpstate::BugreportMode::BUGREPORT_DEFAULT: return "BUGREPORT_DEFAULT"; } } } } Loading Loading @@ -2088,12 +2090,14 @@ static void SetOptionsFromMode(Dumpstate::BugreportMode mode, Dumpstate::DumpOpt options->do_fb = true; options->do_fb = true; options->do_broadcast = true; options->do_broadcast = true; break; break; case Dumpstate::BugreportMode::BUGREPORT_DEFAULT: break; } } } } static Dumpstate::BugreportMode getBugreportModeFromProperty() { static Dumpstate::BugreportMode getBugreportModeFromProperty() { // If the system property is not set, it's assumed to be a full bugreport. // If the system property is not set, it's assumed to be a default bugreport. Dumpstate::BugreportMode mode = Dumpstate::BugreportMode::BUGREPORT_FULL; Dumpstate::BugreportMode mode = Dumpstate::BugreportMode::BUGREPORT_DEFAULT; std::string extra_options = android::base::GetProperty(PROPERTY_EXTRA_OPTIONS, ""); std::string extra_options = android::base::GetProperty(PROPERTY_EXTRA_OPTIONS, ""); if (!extra_options.empty()) { if (!extra_options.empty()) { Loading @@ -2101,6 +2105,8 @@ static Dumpstate::BugreportMode getBugreportModeFromProperty() { // Currently, it contains the type of the requested bugreport. // Currently, it contains the type of the requested bugreport. if (extra_options == "bugreportplus") { if (extra_options == "bugreportplus") { mode = Dumpstate::BugreportMode::BUGREPORT_INTERACTIVE; mode = Dumpstate::BugreportMode::BUGREPORT_INTERACTIVE; } else if (extra_options == "bugreportfull") { mode = Dumpstate::BugreportMode::BUGREPORT_FULL; } else if (extra_options == "bugreportremote") { } else if (extra_options == "bugreportremote") { mode = Dumpstate::BugreportMode::BUGREPORT_REMOTE; mode = Dumpstate::BugreportMode::BUGREPORT_REMOTE; } else if (extra_options == "bugreportwear") { } else if (extra_options == "bugreportwear") { Loading Loading
PREUPLOAD.cfg +1 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,7 @@ clang_format = true [Builtin Hooks Options] [Builtin Hooks Options] # Only turn on clang-format check for the following subfolders. # Only turn on clang-format check for the following subfolders. clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp libs/binder/ndk/ libs/graphicsenv/ libs/graphicsenv/ libs/gui/ libs/gui/ libs/renderengine/ libs/renderengine/ Loading
cmds/atrace/atrace_userdebug.rc +2 −2 Original line number Original line Diff line number Diff line Loading @@ -9,8 +9,8 @@ on post-fs chmod 0666 /sys/kernel/debug/tracing/events/workqueue/enable chmod 0666 /sys/kernel/debug/tracing/events/workqueue/enable chmod 0666 /sys/kernel/tracing/events/regulator/enable chmod 0666 /sys/kernel/tracing/events/regulator/enable chmod 0666 /sys/kernel/debug/tracing/events/regulator/enable chmod 0666 /sys/kernel/debug/tracing/events/regulator/enable chmod 0666 /sys/kernel/tracing/events/pagecache/enable chmod 0666 /sys/kernel/tracing/events/filemap/enable chmod 0666 /sys/kernel/debug/tracing/events/pagecache/enable chmod 0666 /sys/kernel/debug/tracing/events/filemap/enable # irq # irq chmod 0666 /sys/kernel/tracing/events/irq/enable chmod 0666 /sys/kernel/tracing/events/irq/enable Loading
cmds/dumpstate/DumpstateService.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -108,7 +108,8 @@ binder::Status DumpstateService::startBugreport(int, int bugreport_mode, int32_t bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_REMOTE && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_REMOTE && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_WEAR && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_WEAR && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_TELEPHONY && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_TELEPHONY && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_WIFI) { bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_WIFI && bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_DEFAULT) { return exception(binder::Status::EX_ILLEGAL_ARGUMENT, return exception(binder::Status::EX_ILLEGAL_ARGUMENT, StringPrintf("Invalid bugreport mode: %d", bugreport_mode)); StringPrintf("Invalid bugreport mode: %d", bugreport_mode)); } } Loading
cmds/dumpstate/binder/android/os/IDumpstate.aidl +4 −1 Original line number Original line Diff line number Diff line Loading @@ -40,7 +40,7 @@ interface IDumpstate { boolean getSectionDetails); boolean getSectionDetails); // These modes encapsulate a set of run time options for generating bugreports. // These modes encapsulate a set of run time options for generating bugreports. // A zipped bugreport; default mode. // Takes a bugreport without user interference. const int BUGREPORT_MODE_FULL = 0; const int BUGREPORT_MODE_FULL = 0; // Interactive bugreport, i.e. triggered by the user. // Interactive bugreport, i.e. triggered by the user. Loading @@ -58,6 +58,9 @@ interface IDumpstate { // Bugreport limited to only wifi info. // Bugreport limited to only wifi info. const int BUGREPORT_MODE_WIFI = 5; const int BUGREPORT_MODE_WIFI = 5; // Default mode. const int BUGREPORT_MODE_DEFAULT = 6; /* /* * Starts a bugreport in the background. * Starts a bugreport in the background. */ */ Loading
cmds/dumpstate/dumpstate.cpp +8 −2 Original line number Original line Diff line number Diff line Loading @@ -2048,6 +2048,8 @@ static inline const char* ModeToString(Dumpstate::BugreportMode mode) { return "BUGREPORT_TELEPHONY"; return "BUGREPORT_TELEPHONY"; case Dumpstate::BugreportMode::BUGREPORT_WIFI: case Dumpstate::BugreportMode::BUGREPORT_WIFI: return "BUGREPORT_WIFI"; return "BUGREPORT_WIFI"; case Dumpstate::BugreportMode::BUGREPORT_DEFAULT: return "BUGREPORT_DEFAULT"; } } } } Loading Loading @@ -2088,12 +2090,14 @@ static void SetOptionsFromMode(Dumpstate::BugreportMode mode, Dumpstate::DumpOpt options->do_fb = true; options->do_fb = true; options->do_broadcast = true; options->do_broadcast = true; break; break; case Dumpstate::BugreportMode::BUGREPORT_DEFAULT: break; } } } } static Dumpstate::BugreportMode getBugreportModeFromProperty() { static Dumpstate::BugreportMode getBugreportModeFromProperty() { // If the system property is not set, it's assumed to be a full bugreport. // If the system property is not set, it's assumed to be a default bugreport. Dumpstate::BugreportMode mode = Dumpstate::BugreportMode::BUGREPORT_FULL; Dumpstate::BugreportMode mode = Dumpstate::BugreportMode::BUGREPORT_DEFAULT; std::string extra_options = android::base::GetProperty(PROPERTY_EXTRA_OPTIONS, ""); std::string extra_options = android::base::GetProperty(PROPERTY_EXTRA_OPTIONS, ""); if (!extra_options.empty()) { if (!extra_options.empty()) { Loading @@ -2101,6 +2105,8 @@ static Dumpstate::BugreportMode getBugreportModeFromProperty() { // Currently, it contains the type of the requested bugreport. // Currently, it contains the type of the requested bugreport. if (extra_options == "bugreportplus") { if (extra_options == "bugreportplus") { mode = Dumpstate::BugreportMode::BUGREPORT_INTERACTIVE; mode = Dumpstate::BugreportMode::BUGREPORT_INTERACTIVE; } else if (extra_options == "bugreportfull") { mode = Dumpstate::BugreportMode::BUGREPORT_FULL; } else if (extra_options == "bugreportremote") { } else if (extra_options == "bugreportremote") { mode = Dumpstate::BugreportMode::BUGREPORT_REMOTE; mode = Dumpstate::BugreportMode::BUGREPORT_REMOTE; } else if (extra_options == "bugreportwear") { } else if (extra_options == "bugreportwear") { Loading