Merge "Add an isCheckpointing() binder call for adb remount." am: b50480bb96
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1330854 Change-Id: I14674da2b3cf86c09179b94e28e76fec30378e12
This commit is contained in:
commit
60e41b7084
5 changed files with 16 additions and 0 deletions
|
@ -294,6 +294,10 @@ bool cp_needsCheckpoint() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cp_isCheckpointing() {
|
||||||
|
return isCheckpointing;
|
||||||
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const std::string kSleepTimeProp = "ro.sys.cp_msleeptime";
|
const std::string kSleepTimeProp = "ro.sys.cp_msleeptime";
|
||||||
const uint32_t msleeptime_default = 1000; // 1 s
|
const uint32_t msleeptime_default = 1000; // 1 s
|
||||||
|
|
|
@ -39,6 +39,8 @@ bool cp_needsRollback();
|
||||||
|
|
||||||
bool cp_needsCheckpoint();
|
bool cp_needsCheckpoint();
|
||||||
|
|
||||||
|
bool cp_isCheckpointing();
|
||||||
|
|
||||||
android::binder::Status cp_prepareCheckpoint();
|
android::binder::Status cp_prepareCheckpoint();
|
||||||
|
|
||||||
android::binder::Status cp_restoreCheckpoint(const std::string& mountPoint, int count = 0);
|
android::binder::Status cp_restoreCheckpoint(const std::string& mountPoint, int count = 0);
|
||||||
|
|
|
@ -778,6 +778,14 @@ binder::Status VoldNativeService::needsCheckpoint(bool* _aidl_return) {
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binder::Status VoldNativeService::isCheckpointing(bool* _aidl_return) {
|
||||||
|
ENFORCE_SYSTEM_OR_ROOT;
|
||||||
|
ACQUIRE_LOCK;
|
||||||
|
|
||||||
|
*_aidl_return = cp_isCheckpointing();
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
|
||||||
binder::Status VoldNativeService::commitChanges() {
|
binder::Status VoldNativeService::commitChanges() {
|
||||||
ENFORCE_SYSTEM_OR_ROOT;
|
ENFORCE_SYSTEM_OR_ROOT;
|
||||||
ACQUIRE_LOCK;
|
ACQUIRE_LOCK;
|
||||||
|
|
|
@ -133,6 +133,7 @@ class VoldNativeService : public BinderService<VoldNativeService>, public os::Bn
|
||||||
binder::Status startCheckpoint(int32_t retry);
|
binder::Status startCheckpoint(int32_t retry);
|
||||||
binder::Status needsCheckpoint(bool* _aidl_return);
|
binder::Status needsCheckpoint(bool* _aidl_return);
|
||||||
binder::Status needsRollback(bool* _aidl_return);
|
binder::Status needsRollback(bool* _aidl_return);
|
||||||
|
binder::Status isCheckpointing(bool* _aidl_return);
|
||||||
binder::Status commitChanges();
|
binder::Status commitChanges();
|
||||||
binder::Status prepareCheckpoint();
|
binder::Status prepareCheckpoint();
|
||||||
binder::Status restoreCheckpoint(const std::string& mountPoint);
|
binder::Status restoreCheckpoint(const std::string& mountPoint);
|
||||||
|
|
|
@ -110,6 +110,7 @@ interface IVold {
|
||||||
void startCheckpoint(int retry);
|
void startCheckpoint(int retry);
|
||||||
boolean needsCheckpoint();
|
boolean needsCheckpoint();
|
||||||
boolean needsRollback();
|
boolean needsRollback();
|
||||||
|
boolean isCheckpointing();
|
||||||
void abortChanges(in @utf8InCpp String device, boolean retry);
|
void abortChanges(in @utf8InCpp String device, boolean retry);
|
||||||
void commitChanges();
|
void commitChanges();
|
||||||
void prepareCheckpoint();
|
void prepareCheckpoint();
|
||||||
|
|
Loading…
Reference in a new issue