clang-format the rest of the files
Apply clang-format to fix the remaining files not fixed by
change I23cde3f0bbcac13bef555d13514e922c79d5ad48
Test: Format-only changes; treehugger suffices.
Change-Id: I1bfd5c8d68d298596875d5edae26cdfe27c03489
Merged-In: I1bfd5c8d68d298596875d5edae26cdfe27c03489
diff --git a/model/VolumeBase.cpp b/model/VolumeBase.cpp
index 429f134..300add1 100644
--- a/model/VolumeBase.cpp
+++ b/model/VolumeBase.cpp
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-#include "Utils.h"
#include "VolumeBase.h"
+#include "Utils.h"
#include "VolumeManager.h"
-#include <android-base/stringprintf.h>
#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include <fcntl.h>
#include <stdlib.h>
@@ -32,10 +32,13 @@
namespace android {
namespace vold {
-VolumeBase::VolumeBase(Type type) :
- mType(type), mMountFlags(0), mMountUserId(-1), mCreated(false), mState(
- State::kUnmounted), mSilent(false) {
-}
+VolumeBase::VolumeBase(Type type)
+ : mType(type),
+ mMountFlags(0),
+ mMountUserId(-1),
+ mCreated(false),
+ mState(State::kUnmounted),
+ mSilent(false) {}
VolumeBase::~VolumeBase() {
CHECK(!mCreated);
@@ -45,7 +48,9 @@
mState = state;
auto listener = getListener();
- if (listener) listener->onVolumeStateChanged(getId(), static_cast<int32_t>(mState));
+ if (listener) {
+ listener->onVolumeStateChanged(getId(), static_cast<int32_t>(mState));
+ }
}
status_t VolumeBase::setDiskId(const std::string& diskId) {
@@ -131,7 +136,9 @@
mInternalPath = internalPath;
auto listener = getListener();
- if (listener) listener->onVolumeInternalPathChanged(getId(), mInternalPath);
+ if (listener) {
+ listener->onVolumeInternalPathChanged(getId(), mInternalPath);
+ }
return OK;
}
@@ -168,8 +175,9 @@
status_t res = doCreate();
auto listener = getListener();
- if (listener) listener->onVolumeCreated(getId(),
- static_cast<int32_t>(mType), mDiskId, mPartGuid);
+ if (listener) {
+ listener->onVolumeCreated(getId(), static_cast<int32_t>(mType), mDiskId, mPartGuid);
+ }
setState(State::kUnmounted);
return res;
@@ -189,9 +197,10 @@
setState(State::kRemoved);
}
-
auto listener = getListener();
- if (listener) listener->onVolumeDestroyed(getId());
+ if (listener) {
+ listener->onVolumeDestroyed(getId());
+ }
status_t res = doDestroy();
mCreated = false;
@@ -228,8 +237,7 @@
setState(State::kEjecting);
for (const auto& vol : mVolumes) {
if (vol->destroy()) {
- LOG(WARNING) << getId() << " failed to destroy " << vol->getId()
- << " stacked above";
+ LOG(WARNING) << getId() << " failed to destroy " << vol->getId() << " stacked above";
}
}
mVolumes.clear();