From 47df70a7b450339abf4b8c3f65755dfe66a286df Mon Sep 17 00:00:00 2001 From: Raman Date: Mon, 23 Sep 2019 11:10:42 -0400 Subject: [PATCH] 5561: Test ShareIt module. --- InternalPythonModules/android/shareit.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/InternalPythonModules/android/shareit.py b/InternalPythonModules/android/shareit.py index 937a663393..9e58bd93da 100644 --- a/InternalPythonModules/android/shareit.py +++ b/InternalPythonModules/android/shareit.py @@ -71,27 +71,28 @@ class ShareItAnalyzer(general.AndroidComponentAnalyzer): self._MODULE_NAME, historyDb.getDBFile(), Account.Type.SHAREIT) - queryString = "SELECT history_type, device_id, device_name, description, timestamp, import_path FROM history" + queryString = "SELECT history_type, device_id, device_name, description, timestamp, file_path FROM history"\ + " JOIN item where history.content_id = item.item_id" historyResultSet = historyDb.runQuery(queryString) if historyResultSet is not None: while historyResultSet.next(): direction = "" fromAddress = None - toAdddress = None + toAddress = None if (historyResultSet.getInt("history_type") == 1): - direction = CommunicationDirection.OUTGOING - toAddress = Account.Address(historyResultSet.getString("device_id"), historyResultSet.getString("device_name") ) - else: direction = CommunicationDirection.INCOMING fromAddress = Account.Address(historyResultSet.getString("device_id"), historyResultSet.getString("device_name") ) + else: + direction = CommunicationDirection.OUTGOING + toAddress = Account.Address(historyResultSet.getString("device_id"), historyResultSet.getString("device_name") ) msgBody = "" # there is no body. - attachments = [historyResultSet.getString("import_path")] + attachments = [historyResultSet.getString("file_path")] msgBody = general.appendAttachmentList(msgBody, attachments) timeStamp = historyResultSet.getLong("timestamp") / 1000 - messageArtifact = transferDbHelper.addMessage( + messageArtifact = historyDbHelper.addMessage( self._MESSAGE_TYPE, direction, fromAddress,