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

Commit 86d27b26 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Update call log provider docs to clarify how to use LIMIT.

Clarifying that you CANNOT use LIMIT in the where clause and provide
instructions on the right way to limit results.

Test: Docs only change
Bug: 175599057
Change-Id: Ib4e828fc33ae9b75e7a240e9f456907049fcc35e
parent a9c6fbdf
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -76,6 +76,25 @@ public class CallLog {

    /**
     * Contains the recent calls.
     * <p>
     * Note: If you want to query the call log and limit the results to a single value, you should
     * append the {@link #LIMIT_PARAM_KEY} parameter to the content URI.  For example:
     * <pre>
     * {@code
     * getContentResolver().query(
     *                 Calls.CONTENT_URI.buildUpon().appendQueryParameter(LIMIT_PARAM_KEY, "1")
     *                 .build(),
     *                 null, null, null, null);
     * }
     * </pre>
     * <p>
     * The call log provider enforces strict SQL grammar, so you CANNOT append "LIMIT" to the SQL
     * query as below:
     * <pre>
     * {@code
     * getContentResolver().query(Calls.CONTENT_URI, null, "LIMIT 1", null, null);
     * }
     * </pre>
     */
    public static class Calls implements BaseColumns {
        /**