diff --git a/InternalPythonModules/android/calllog.py b/InternalPythonModules/android/calllog.py index 5b3faf0697..13775e80f7 100644 --- a/InternalPythonModules/android/calllog.py +++ b/InternalPythonModules/android/calllog.py @@ -103,10 +103,7 @@ class CallLogAnalyzer(general.AndroidComponentAnalyzer): calleeId = None timeStamp = resultSet.getLong("date") / 1000 - number = resultSet.getString("number") - if not general.isValidPhoneNumer(number): - number = None duration = resultSet.getLong("duration") # duration of call is in seconds name = resultSet.getString("name") # name of person dialed or called. None if unregistered diff --git a/InternalPythonModules/android/general.py b/InternalPythonModules/android/general.py index daa789a57c..4048c05c0f 100644 --- a/InternalPythonModules/android/general.py +++ b/InternalPythonModules/android/general.py @@ -45,19 +45,15 @@ def appendAttachmentList(msgBody, attachmentsList): """ Checks if the given string might be a phone number. """ -def isValidPhoneNumer(data): - try: - return CommunicationsUtils.normalizePhoneNum(data) is not None - except TskCoreException as ex: - return False +def isValidPhoneNumber(data): + return CommunicationsUtils.isValidPhoneNumber(data) + """ Checks if the given string is a valid email address. """ def isValidEmailAddress(data): - try: - return CommunicationsUtils.normalizeEmailAddress(data) is not None - except TskCoreException as ex: - return False + return CommunicationsUtils.isValidEmailAddress(data) + diff --git a/InternalPythonModules/android/textnow.py b/InternalPythonModules/android/textnow.py index e05763cae9..005e1191dd 100644 --- a/InternalPythonModules/android/textnow.py +++ b/InternalPythonModules/android/textnow.py @@ -286,7 +286,7 @@ class TextNowContactsParser(TskContactsParser): def get_phone(self): number = self.result_set.getString("number") - return (number if general.isValidPhoneNumer(number) else None) + return (number if general.isValidPhoneNumber(number) else None) def get_email(self): # occasionally the 'number' column may have an email address instead diff --git a/InternalPythonModules/android/whatsapp.py b/InternalPythonModules/android/whatsapp.py index 5346545450..c67502d22b 100644 --- a/InternalPythonModules/android/whatsapp.py +++ b/InternalPythonModules/android/whatsapp.py @@ -435,7 +435,7 @@ class WhatsAppContactsParser(TskContactsParser): def get_phone(self): number = self.result_set.getString("number") - return (number if general.isValidPhoneNumer(number) else None) + return (number if general.isValidPhoneNumber(number) else None) def get_email(self): # occasionally the 'number' column may have an email address instead