Loading init/reboot.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,6 @@ #include "sigchld_handler.h" #include "util.h" #define PROC_SYSRQ "/proc/sysrq-trigger" using namespace std::literals; using android::base::boot_clock; Loading init/reboot_utils.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include <cutils/android_reboot.h> #include "capabilities.h" #include "reboot_utils.h" namespace android { namespace init { Loading Loading @@ -138,6 +139,9 @@ void __attribute__((noreturn)) InitFatalReboot(int signal_number) { LOG(ERROR) << backtrace->FormatFrameData(i); } if (init_fatal_panic) { LOG(ERROR) << __FUNCTION__ << ": Trigger crash"; android::base::WriteStringToFile("c", PROC_SYSRQ); LOG(ERROR) << __FUNCTION__ << ": Sys-Rq failed to crash the system; fallback to exit()."; _exit(signal_number); } RebootSystem(ANDROID_RB_RESTART2, init_fatal_reboot_target); Loading init/reboot_utils.h +2 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #include <string> #define PROC_SYSRQ "/proc/sysrq-trigger" namespace android { namespace init { Loading libprocessgroup/profiles/Android.bp +3 −3 Original line number Diff line number Diff line Loading @@ -89,15 +89,15 @@ cc_test { "test_vendor.cpp", ], static_libs: [ "libbase", "libgmock", "liblog", "libjsoncpp", "libjsonpbverify", "libjsonpbparse", "libprocessgroup_proto", ], shared_libs: [ "libbase", "liblog", "libjsoncpp", "libprotobuf-cpp-full", ], test_suites: [ Loading libstats/push_compat/StatsEventCompat.cpp +1 −10 Original line number Diff line number Diff line Loading @@ -28,17 +28,8 @@ using android::base::boot_clock; using android::base::GetProperty; const static int kStatsEventTag = 1937006964; /* Checking ro.build.version.release is fragile, as the release field is * an opaque string without structural guarantees. However, testing confirms * that on Q devices, the property is "10," and on R, it is "R." Until * android_get_device_api_level() is updated, this is the only solution. * * TODO(b/146019024): migrate to android_get_device_api_level() */ const bool StatsEventCompat::mPlatformAtLeastR = GetProperty("ro.build.version.codename", "") == "R" || android_get_device_api_level() > __ANDROID_API_Q__; android_get_device_api_level() >= __ANDROID_API_R__; // initializations of static class variables bool StatsEventCompat::mAttemptedLoad = false; Loading Loading
init/reboot.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,6 @@ #include "sigchld_handler.h" #include "util.h" #define PROC_SYSRQ "/proc/sysrq-trigger" using namespace std::literals; using android::base::boot_clock; Loading
init/reboot_utils.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include <cutils/android_reboot.h> #include "capabilities.h" #include "reboot_utils.h" namespace android { namespace init { Loading Loading @@ -138,6 +139,9 @@ void __attribute__((noreturn)) InitFatalReboot(int signal_number) { LOG(ERROR) << backtrace->FormatFrameData(i); } if (init_fatal_panic) { LOG(ERROR) << __FUNCTION__ << ": Trigger crash"; android::base::WriteStringToFile("c", PROC_SYSRQ); LOG(ERROR) << __FUNCTION__ << ": Sys-Rq failed to crash the system; fallback to exit()."; _exit(signal_number); } RebootSystem(ANDROID_RB_RESTART2, init_fatal_reboot_target); Loading
init/reboot_utils.h +2 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #include <string> #define PROC_SYSRQ "/proc/sysrq-trigger" namespace android { namespace init { Loading
libprocessgroup/profiles/Android.bp +3 −3 Original line number Diff line number Diff line Loading @@ -89,15 +89,15 @@ cc_test { "test_vendor.cpp", ], static_libs: [ "libbase", "libgmock", "liblog", "libjsoncpp", "libjsonpbverify", "libjsonpbparse", "libprocessgroup_proto", ], shared_libs: [ "libbase", "liblog", "libjsoncpp", "libprotobuf-cpp-full", ], test_suites: [ Loading
libstats/push_compat/StatsEventCompat.cpp +1 −10 Original line number Diff line number Diff line Loading @@ -28,17 +28,8 @@ using android::base::boot_clock; using android::base::GetProperty; const static int kStatsEventTag = 1937006964; /* Checking ro.build.version.release is fragile, as the release field is * an opaque string without structural guarantees. However, testing confirms * that on Q devices, the property is "10," and on R, it is "R." Until * android_get_device_api_level() is updated, this is the only solution. * * TODO(b/146019024): migrate to android_get_device_api_level() */ const bool StatsEventCompat::mPlatformAtLeastR = GetProperty("ro.build.version.codename", "") == "R" || android_get_device_api_level() > __ANDROID_API_Q__; android_get_device_api_level() >= __ANDROID_API_R__; // initializations of static class variables bool StatsEventCompat::mAttemptedLoad = false; Loading