Skip to content

Commit

Permalink
vold: remove unused stop() methods
Browse files Browse the repository at this point in the history
NetlinkManager::stop() and VolumeManager::stop() are never called, so
remove them.

Change-Id: I868aa2ad24066d2830816984afcc10000cbabad1
  • Loading branch information
ebiggers committed Sep 23, 2020
1 parent 5a99d3c commit adba2fc
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 33 deletions.
4 changes: 0 additions & 4 deletions NetlinkHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ int NetlinkHandler::start() {
return this->startListener();
}

int NetlinkHandler::stop() {
return this->stopListener();
}

void NetlinkHandler::onEvent(NetlinkEvent* evt) {
VolumeManager* vm = VolumeManager::Instance();
const char* subsys = evt->getSubsystem();
Expand Down
1 change: 0 additions & 1 deletion NetlinkHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class NetlinkHandler : public NetlinkListener {
virtual ~NetlinkHandler();

int start(void);
int stop(void);

protected:
virtual void onEvent(NetlinkEvent* evt);
Expand Down
16 changes: 0 additions & 16 deletions NetlinkManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,3 @@ int NetlinkManager::start() {
close(mSock);
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;
}
1 change: 0 additions & 1 deletion NetlinkManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class NetlinkManager {
virtual ~NetlinkManager();

int start();
int stop();

void setBroadcaster(SocketListener* sl) { mBroadcaster = sl; }
SocketListener* getBroadcaster() { return mBroadcaster; }
Expand Down
10 changes: 0 additions & 10 deletions VolumeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,6 @@ int VolumeManager::start() {
return 0;
}

int VolumeManager::stop() {
CHECK(!mInternalEmulatedVolumes.empty());
for (const auto& vol : mInternalEmulatedVolumes) {
vol->destroy();
}
mInternalEmulatedVolumes.clear();

return 0;
}

void VolumeManager::handleBlockEvent(NetlinkEvent* evt) {
std::lock_guard<std::mutex> lock(mLock);

Expand Down
1 change: 0 additions & 1 deletion VolumeManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class VolumeManager {
android::sp<android::os::IVoldListener> getListener() const { return mListener; }

int start();
int stop();

void handleBlockEvent(NetlinkEvent* evt);

Expand Down

0 comments on commit adba2fc

Please sign in to comment.