mirror of
https://github.com/nerzhul/ownCloud-SMS-App.git
synced 2025-06-08 08:26:09 +00:00
Remove a useless try/catch
This commit is contained in:
parent
0407f719ef
commit
56eecb98bc
@ -48,7 +48,6 @@ public class AndroidSmsFetcher {
|
||||
do {
|
||||
SmsEntry entry = new SmsEntry();
|
||||
|
||||
try {
|
||||
for (int idx = 0; idx < c.getColumnCount(); idx++) {
|
||||
handleProviderColumn(c, idx, entry);
|
||||
}
|
||||
@ -56,10 +55,6 @@ public class AndroidSmsFetcher {
|
||||
// Mailbox ID is required by server
|
||||
entry.mailboxId = mbID.ordinal();
|
||||
smsBuffer.push(mbID, entry);
|
||||
|
||||
} catch (JSONException e) {
|
||||
Log.e(AndroidSmsFetcher.TAG, "JSON Exception when reading SMS Mailbox", e);
|
||||
}
|
||||
}
|
||||
while (c.moveToNext());
|
||||
}
|
||||
@ -106,7 +101,6 @@ public class AndroidSmsFetcher {
|
||||
SmsEntry entry = new SmsEntry();
|
||||
SmsBuffer results = new SmsBuffer();
|
||||
|
||||
try {
|
||||
Integer mboxId = -1;
|
||||
for (int idx = 0; idx < c.getColumnCount(); idx++) {
|
||||
Integer rid = handleProviderColumn(c, idx, entry);
|
||||
@ -122,9 +116,6 @@ public class AndroidSmsFetcher {
|
||||
*/
|
||||
entry.mailboxId = mboxId - 1;
|
||||
results.push(mbID, entry);
|
||||
} catch (JSONException e) {
|
||||
Log.e(AndroidSmsFetcher.TAG, "JSON Exception when reading SMS Mailbox", e);
|
||||
}
|
||||
|
||||
c.close();
|
||||
|
||||
@ -160,7 +151,7 @@ public class AndroidSmsFetcher {
|
||||
c.close();
|
||||
}
|
||||
|
||||
private Integer handleProviderColumn(Cursor c, int idx, SmsEntry entry) throws JSONException {
|
||||
private Integer handleProviderColumn(Cursor c, int idx, SmsEntry entry) {
|
||||
String colName = c.getColumnName(idx);
|
||||
|
||||
// Id column is must be an integer
|
||||
|
@ -1,7 +1,5 @@
|
||||
package fr.unix_experience.owncloud_sms.jni;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
import fr.unix_experience.owncloud_sms.engine.SmsEntry;
|
||||
import fr.unix_experience.owncloud_sms.enums.MailboxID;
|
||||
|
||||
@ -48,7 +46,7 @@ public class SmsBuffer {
|
||||
public native void print();
|
||||
public native String asRawJsonString();
|
||||
|
||||
public void push(MailboxID mbid, SmsEntry smsEntry) throws JSONException {
|
||||
public void push(MailboxID mbid, SmsEntry smsEntry) {
|
||||
push(smsEntry.id,
|
||||
mbid.ordinal(),
|
||||
smsEntry.type,
|
||||
|
Loading…
x
Reference in New Issue
Block a user