Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8de18607 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move getUndeliveredSmsExpirationTime out of while loop."

parents 23b8ab62 6c8ebf04
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@ public class SmsBroadcastUndelivered {
            }

            boolean isCurrentFormat3gpp2 = InboundSmsHandler.isCurrentFormat3gpp2();
            long expirationTime = getUndeliveredSmsExpirationTime(context);
            while (cursor.moveToNext()) {
                InboundSmsTracker tracker;
                try {
@@ -178,7 +179,6 @@ public class SmsBroadcastUndelivered {
                    Integer receivedCount = multiPartReceivedCount.get(reference);
                    if (receivedCount == null) {
                        multiPartReceivedCount.put(reference, 1);    // first segment seen
                        long expirationTime = getUndeliveredSmsExpirationTime(context);
                        if (tracker.getTimestamp() <
                                (System.currentTimeMillis() - expirationTime)) {
                            // older than 30 days; delete if we don't find all the segments