vold: remove unused stop() methods
NetlinkManager::stop() and VolumeManager::stop() are never called, so remove them. Change-Id: I868aa2ad24066d2830816984afcc10000cbabad1
This commit is contained in:
parent
5a99d3cfbb
commit
adba2fcc36
6 changed files with 0 additions and 33 deletions
|
@ -33,10 +33,6 @@ int NetlinkHandler::start() {
|
||||||
return this->startListener();
|
return this->startListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
int NetlinkHandler::stop() {
|
|
||||||
return this->stopListener();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetlinkHandler::onEvent(NetlinkEvent* evt) {
|
void NetlinkHandler::onEvent(NetlinkEvent* evt) {
|
||||||
VolumeManager* vm = VolumeManager::Instance();
|
VolumeManager* vm = VolumeManager::Instance();
|
||||||
const char* subsys = evt->getSubsystem();
|
const char* subsys = evt->getSubsystem();
|
||||||
|
|
|
@ -25,7 +25,6 @@ class NetlinkHandler : public NetlinkListener {
|
||||||
virtual ~NetlinkHandler();
|
virtual ~NetlinkHandler();
|
||||||
|
|
||||||
int start(void);
|
int start(void);
|
||||||
int stop(void);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void onEvent(NetlinkEvent* evt);
|
virtual void onEvent(NetlinkEvent* evt);
|
||||||
|
|
|
@ -90,19 +90,3 @@ out:
|
||||||
close(mSock);
|
close(mSock);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int NetlinkManager::stop() {
|
|
||||||
int status = 0;
|
|
||||||
|
|
||||||
if (mHandler->stop()) {
|
|
||||||
PLOG(ERROR) << "Unable to stop NetlinkHandler";
|
|
||||||
status = -1;
|
|
||||||
}
|
|
||||||
delete mHandler;
|
|
||||||
mHandler = NULL;
|
|
||||||
|
|
||||||
close(mSock);
|
|
||||||
mSock = -1;
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ class NetlinkManager {
|
||||||
virtual ~NetlinkManager();
|
virtual ~NetlinkManager();
|
||||||
|
|
||||||
int start();
|
int start();
|
||||||
int stop();
|
|
||||||
|
|
||||||
void setBroadcaster(SocketListener* sl) { mBroadcaster = sl; }
|
void setBroadcaster(SocketListener* sl) { mBroadcaster = sl; }
|
||||||
SocketListener* getBroadcaster() { return mBroadcaster; }
|
SocketListener* getBroadcaster() { return mBroadcaster; }
|
||||||
|
|
|
@ -198,16 +198,6 @@ int VolumeManager::start() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int VolumeManager::stop() {
|
|
||||||
CHECK(!mInternalEmulatedVolumes.empty());
|
|
||||||
for (const auto& vol : mInternalEmulatedVolumes) {
|
|
||||||
vol->destroy();
|
|
||||||
}
|
|
||||||
mInternalEmulatedVolumes.clear();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void VolumeManager::handleBlockEvent(NetlinkEvent* evt) {
|
void VolumeManager::handleBlockEvent(NetlinkEvent* evt) {
|
||||||
std::lock_guard<std::mutex> lock(mLock);
|
std::lock_guard<std::mutex> lock(mLock);
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ class VolumeManager {
|
||||||
android::sp<android::os::IVoldListener> getListener() const { return mListener; }
|
android::sp<android::os::IVoldListener> getListener() const { return mListener; }
|
||||||
|
|
||||||
int start();
|
int start();
|
||||||
int stop();
|
|
||||||
|
|
||||||
void handleBlockEvent(NetlinkEvent* evt);
|
void handleBlockEvent(NetlinkEvent* evt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue