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

Commit c7c1cff0 authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

Merge "PBAP: Send correct Get response when storage is locked." am: e9a7e5b0

am: 0c5fcdec

Change-Id: I5cab03a2b8baa3268da178ed02da1d43d52e3082
parents 91a27178 0c5fcdec
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.content.Context;
import android.database.Cursor;
import android.os.Handler;
import android.os.Message;
import android.os.UserManager;
import android.provider.CallLog;
import android.provider.CallLog.Calls;
import android.text.TextUtils;
@@ -431,6 +432,12 @@ public class BluetoothPbapObexServer extends ServerRequestHandler {
        if (type == null) {
            return ResponseCodes.OBEX_HTTP_NOT_ACCEPTABLE;
        }

        if (!UserManager.get(mContext).isUserUnlocked()) {
            Log.e(TAG, "Storage locked, " + type + " failed");
            return ResponseCodes.OBEX_HTTP_UNAVAILABLE;
        }

        // Accroding to specification,the name header could be omitted such as
        // sony erriccsonHBH-DS980