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

Commit 0c5fcdec 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

Change-Id: I473d3c46707c18a109798ba3a47d698b64dc25ad
parents 847775a6 e9a7e5b0
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