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

Commit e9a7e5b0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents e42bd8ae 28e1b8a3
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