[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdeconnect-android/sms-history] src/org/kde/kdeconnect/Helpers: Move smsProjection to top-level
From:       Simon Redman <null () kde ! org>
Date:       2018-03-30 17:58:57
Message-ID: E1f1yIj-0007Jp-OS () code ! kde ! org
[Download RAW message or body]

Git commit f6b6c1aefa80b76c8441a1b0fdfa5470b9870681 by Simon Redman.
Committed on 30/03/2018 at 17:58.
Pushed by sredman into branch 'sms-history'.

Move smsProjection to top-level

M  +13   -10   src/org/kde/kdeconnect/Helpers/SMSHelper.java

https://commits.kde.org/kdeconnect-android/f6b6c1aefa80b76c8441a1b0fdfa5470b9870681

diff --git a/src/org/kde/kdeconnect/Helpers/SMSHelper.java \
b/src/org/kde/kdeconnect/Helpers/SMSHelper.java index 585f8cb..5650065 100644
--- a/src/org/kde/kdeconnect/Helpers/SMSHelper.java
+++ b/src/org/kde/kdeconnect/Helpers/SMSHelper.java
@@ -35,6 +35,19 @@ import java.util.Map;
 
 public class SMSHelper {
 
+    /**
+     * Define the columns which are extracted from the Android SMS database
+     */
+    protected static final String[] smsProjection = new String[]{
+            Telephony.Sms.ADDRESS,  // Phone number of the remote
+            Telephony.Sms.BODY,     // Body of the message
+            Telephony.Sms.DATE,     // Some date associated with the message \
(Received?) +            Telephony.Sms.TYPE,     // Compare with \
Telephony.TextBasedSmsColumns.MESSAGE_TYPE_* +            Telephony.Sms.PERSON,   // \
Some obscure value that corresponds to the contact +            Telephony.Sms.READ,   \
// Whether we have received a read report for this message (int) +            \
Telephony.Sms.THREAD_ID, // Magic number which binds (message) threads +    };
+
     /**
      * Get the base address for the SMS content
      *
@@ -78,16 +91,6 @@ public class SMSHelper {
 
         Uri smsUri = getSMSUri();
 
-        final String[] smsProjection = new String[]{
-                Telephony.Sms.ADDRESS,  // Phone number of the remote
-                Telephony.Sms.BODY,     // Body of the message
-                Telephony.Sms.DATE,     // Some date associated with the message \
                (Received?)
-                Telephony.Sms.TYPE,     // Compare with \
                Telephony.TextBasedSmsColumns.MESSAGE_TYPE_*
-                Telephony.Sms.PERSON,   // Some obscure value that corresponds to \
                the contact
-                Telephony.Sms.READ,     // Whether we have received a read report \
                for this message (int)
-                Telephony.Sms.THREAD_ID, // Magic number which binds (message) \
                threads
-        };
-
         Cursor smsCursor = context.getContentResolver().query(
                 smsUri,
                 smsProjection,


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic