Merge "Mark ui_print with __printflike."
am: 220b531e3d
Change-Id: Ia13734618844f2ca82f83da897823183d8c9e443
This commit is contained in:
@@ -40,7 +40,7 @@ extern const char* reason;
|
|||||||
// fopen a file, mounting volumes and making parent dirs as necessary.
|
// fopen a file, mounting volumes and making parent dirs as necessary.
|
||||||
FILE* fopen_path(const std::string& path, const char* mode);
|
FILE* fopen_path(const std::string& path, const char* mode);
|
||||||
|
|
||||||
void ui_print(const char* format, ...);
|
void ui_print(const char* format, ...) __printflike(1, 2);
|
||||||
|
|
||||||
bool is_ro_debuggable();
|
bool is_ro_debuggable();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1296,7 +1296,7 @@ static bool is_battery_ok() {
|
|||||||
charge_status != android::BATTERY_STATUS_NOT_CHARGING);
|
charge_status != android::BATTERY_STATUS_NOT_CHARGING);
|
||||||
android::BatteryProperty capacity;
|
android::BatteryProperty capacity;
|
||||||
android::status_t status = monitor.getProperty(android::BATTERY_PROP_CAPACITY, &capacity);
|
android::status_t status = monitor.getProperty(android::BATTERY_PROP_CAPACITY, &capacity);
|
||||||
ui_print("charge_status %d, charged %d, status %d, capacity %lld\n", charge_status,
|
ui_print("charge_status %d, charged %d, status %d, capacity %" PRId64 "\n", charge_status,
|
||||||
charged, status, capacity.valueInt64);
|
charged, status, capacity.valueInt64);
|
||||||
// At startup, the battery drivers in devices like N5X/N6P take some time to load
|
// At startup, the battery drivers in devices like N5X/N6P take some time to load
|
||||||
// the battery profile. Before the load finishes, it reports value 50 as a fake
|
// the battery profile. Before the load finishes, it reports value 50 as a fake
|
||||||
|
|||||||
Reference in New Issue
Block a user