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

Commit 9d9c67ce authored by a5206c's avatar a5206c Committed by Android Git Automerger
Browse files

am efc9c372: For PBAP, Limit the number of call log to CALLLOG_NUM_LIMIT

Merge commit 'efc9c372' into gingerbread-plus-aosp

* commit 'efc9c372':
  For PBAP, Limit the number of call log to CALLLOG_NUM_LIMIT
parents 7941c2ab efc9c372
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -148,6 +148,8 @@ public class BluetoothPbapObexServer extends ServerRequestHandler {


    private int mOrderBy  = ORDER_BY_INDEXED;
    private int mOrderBy  = ORDER_BY_INDEXED;


    private static int CALLLOG_NUM_LIMIT = 50;

    public static int ORDER_BY_INDEXED = 0;
    public static int ORDER_BY_INDEXED = 0;


    public static int ORDER_BY_ALPHABETICAL = 1;
    public static int ORDER_BY_ALPHABETICAL = 1;
@@ -903,6 +905,13 @@ public class BluetoothPbapObexServer extends ServerRequestHandler {
            return ResponseCodes.OBEX_HTTP_OK;
            return ResponseCodes.OBEX_HTTP_OK;
        }
        }


        // Limit the number of call log to CALLLOG_NUM_LIMIT
        if (appParamValue.needTag != BluetoothPbapObexServer.ContentType.PHONEBOOK) {
            if (requestSize > CALLLOG_NUM_LIMIT) {
               requestSize = CALLLOG_NUM_LIMIT;
            }
        }

        int endPoint = startPoint + requestSize - 1;
        int endPoint = startPoint + requestSize - 1;
        if (endPoint > pbSize - 1) {
        if (endPoint > pbSize - 1) {
            endPoint = pbSize - 1;
            endPoint = pbSize - 1;