summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenJian <jian.ren@ck-telecom.com>2015-04-15 11:32:15 +0800
committerRenJian <jian.ren@ck-telecom.com>2015-04-21 09:47:23 +0800
commit8b8d02886bd9fb8d5ad451c03e486cfad74aa74e (patch)
treed5b992000a4e63a3dfc6b500dee92ea3f6607749
parent059c0a72ea250e7e326c5a50536b48311ac6cc9a (diff)
downloadframeworks_av-stable/cm-12.0-YNG3C.tar.gz
frameworks_av-stable/cm-12.0-YNG3C.tar.bz2
frameworks_av-stable/cm-12.0-YNG3C.zip
Ensure there is no two same storages showing on the computer.stable/cm-12.0-YNG3C
[Preconditions] 1. Insert a SIM card into phone and set the SIM lock as "on" 2. Select MTP mode 3. Power off the mobile [Procedures] 1.Connected the phone and PC with usb cable 2.Power on the phone->Input PIN code of SIM lock to enter the IDLE view 3.Check the storage list on PC [Reproduce] Rarely Change-Id: I8efc3f812b669f2d4e2c3be89e3f97b5cc895628
-rw-r--r--media/mtp/MtpServer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index 07199e3bdd..b288ad6104 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -119,6 +119,8 @@ MtpServer::~MtpServer() {
void MtpServer::addStorage(MtpStorage* storage) {
Mutex::Autolock autoLock(mMutex);
+ if(hasStorage(storage->getStorageID()))
+ return;
mStorages.push(storage);
sendStoreAdded(storage->getStorageID());
}