From kde-commits Sat Mar 31 22:52:51 2018 From: Simon Redman Date: Sat, 31 Mar 2018 22:52:51 +0000 To: kde-commits Subject: [kdeconnect-android/sms-history] src/org/kde/kdeconnect/Helpers: Run autoformatter Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=152253678306204 Git commit af5b5ae7d3636a875adde1bf94c870ef2c244cfd by Simon Redman. Committed on 31/03/2018 at 22:28. Pushed by sredman into branch 'sms-history'. Run autoformatter M +8 -10 src/org/kde/kdeconnect/Helpers/SMSHelper.java https://commits.kde.org/kdeconnect-android/af5b5ae7d3636a875adde1bf94c870ef= 2c244cfd diff --git a/src/org/kde/kdeconnect/Helpers/SMSHelper.java b/src/org/kde/kd= econnect/Helpers/SMSHelper.java index 9272de9..702e35a 100644 --- a/src/org/kde/kdeconnect/Helpers/SMSHelper.java +++ b/src/org/kde/kdeconnect/Helpers/SMSHelper.java @@ -50,7 +50,7 @@ public class SMSHelper { = /** * Get the base address for the SMS content - * + *

* If we want to support API < 19, it seems to be possible to read via= this query * This is highly undocumented and very likely varies between vendors = but appears to work */ @@ -60,7 +60,7 @@ public class SMSHelper { = /** * Get the base address for the SMS content - * + *

* Use the new API way which should work on any phone API >=3D 19 */ @RequiresApi(Build.VERSION_CODES.KITKAT) @@ -71,8 +71,7 @@ public class SMSHelper { protected static Uri getSMSUri() { if (Build.VERSION.SDK_INT >=3D Build.VERSION_CODES.KITKAT) { return getSMSURIGood(); - } else - { + } else { return getSMSURIBad(); } } @@ -92,9 +91,9 @@ public class SMSHelper { = /** * Get all the SMS threads on the phone as well as a bunch of useful-l= ooking data - * + *

* Return a map keyed by Android's Thread ID to a list of all the mess= ages in that thread - * Each message is represented by a map containing the keys which see= med most useful and interesting + * Each message is represented by a map containing the keys which seem= ed most useful and interesting * * @param context android.content.Context running the request * @return Mapping of thread ID to list of messages in that thread @@ -115,8 +114,7 @@ public class SMSHelper { int threadColumn =3D smsCursor.getColumnIndexOrThrow(Telephony= .Sms.THREAD_ID); do { int thread =3D smsCursor.getInt(threadColumn); - if (! toReturn.containsKey(thread)) - { + if (!toReturn.containsKey(thread)) { toReturn.put(thread, new ArrayList= >()); } Map messageInfo =3D new HashMap<>(); @@ -131,7 +129,7 @@ public class SMSHelper { // No SMSes available? } = - if (smsCursor !=3D null){ + if (smsCursor !=3D null) { smsCursor.close(); } = @@ -174,7 +172,7 @@ public class SMSHelper { // No conversations available? } = - if (conversationsCursor !=3D null){ + if (conversationsCursor !=3D null) { conversationsCursor.close(); } =