diff options
| author | Greg Kaiser <gkaiser@google.com> | 2018-12-18 08:42:08 -0800 |
|---|---|---|
| committer | Greg Kaiser <gkaiser@google.com> | 2018-12-20 10:30:17 -0800 |
| commit | 2bc201e6bbf6bb554de85171566f63387a3c781d (patch) | |
| tree | 1d25f41e5c0a2e4b7dd70753429bcec06fd9ea9e /VolumeManager.h | |
| parent | c608caca3d6568d8a42efcad58291b880703b451 (diff) | |
vold: const-ify some of the API
We make some of the C++ member functions 'const', to reflect how
they (don't) affect the state of the class.
Test: TreeHugger
Change-Id: Iec1c2801bfe721e2741406ed1ac0ef95662840a6
Diffstat (limited to 'VolumeManager.h')
| -rw-r--r-- | VolumeManager.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/VolumeManager.h b/VolumeManager.h index b1aa954..e25ba9b 100644 --- a/VolumeManager.h +++ b/VolumeManager.h @@ -52,7 +52,7 @@ class VolumeManager { std::mutex& getCryptLock() { return mCryptLock; } void setListener(android::sp<android::os::IVoldListener> listener) { mListener = listener; } - android::sp<android::os::IVoldListener> getListener() { return mListener; } + android::sp<android::os::IVoldListener> getListener() const { return mListener; } int start(); int stop(); @@ -68,8 +68,8 @@ class VolumeManager { return !fnmatch(mSysPattern.c_str(), sysPath.c_str(), 0); } - const std::string& getNickname() { return mNickname; } - int getFlags() { return mFlags; } + const std::string& getNickname() const { return mNickname; } + int getFlags() const { return mFlags; } private: std::string mSysPattern; @@ -82,7 +82,7 @@ class VolumeManager { std::shared_ptr<android::vold::Disk> findDisk(const std::string& id); std::shared_ptr<android::vold::VolumeBase> findVolume(const std::string& id); - void listVolumes(android::vold::VolumeBase::Type type, std::list<std::string>& list); + void listVolumes(android::vold::VolumeBase::Type type, std::list<std::string>& list) const; int forgetPartition(const std::string& partGuid, const std::string& fsUuid); |
