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

Commit 66ef01e2 authored by Nicolas Catania's avatar Nicolas Catania
Browse files

Revert "New method to return the last dialed number"

This reverts commit 439b7b31.
parent 52e2ef8c
Loading
Loading
Loading
Loading
+14 −40
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import com.android.internal.telephony.Connection;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.text.TextUtils;

@@ -188,31 +187,6 @@ public class CallLog {
            return result;
        }
        
        /**
         * Query the call log database for the last dialed number.
         * @param context To get the content resolver from.
         * @return The last outgoing phone number dialed or an empty
         * string if none exist.
         */
        public static String getLastOutgoingCall(Context context) {
            final ContentResolver resolver = context.getContentResolver();
            Cursor c = null;
            try {
                c = resolver.query(
                    CONTENT_URI,
                    new String[] {NUMBER},
                    TYPE + " = " + OUTGOING_TYPE,
                    null,
                    DEFAULT_SORT_ORDER + " LIMIT 1");
                if (c == null || !c.moveToFirst()) {
                    return "";
                }
                return c.getString(0);
            } finally {
                if (c != null) c.close();
            }
        }

        private static void removeExpiredEntries(Context context) {
            final ContentResolver resolver = context.getContentResolver();
            resolver.delete(CONTENT_URI, "_id IN " +