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

Commit 088eee4a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth: MAP: Delete Email for valid message hanlde ."

parents e59c8e5a d6859e2b
Loading
Loading
Loading
Loading
+26 −15
Original line number Diff line number Diff line
@@ -436,9 +436,12 @@ public class BluetoothMapContentEmailObserver extends BluetoothMapContentObserve

 @Override
    public boolean setMessageStatusDeleted(long handle, TYPE type, int statusValue) {
        boolean res = true;

        boolean res = false;
        long accountId = BluetoothMapUtils.getEmailAccountId(mContext);
        Uri uri = Uri.parse("content://com.android.email.provider/message/"+handle);
        Cursor crEmail = mResolver.query(uri, null, null, null, null);

        if(crEmail != null && crEmail.moveToFirst()) {
           if (D) Log.d(TAG, "setMessageStatusDeleted: EMAIL handle " + handle
               + " type " + type + " value " + statusValue + "accountId: "+accountId);
           Intent emailIn = new Intent();
@@ -453,7 +456,15 @@ public class BluetoothMapContentEmailObserver extends BluetoothMapContentObserve
           emailIn.putExtra("com.android.email.intent.extra.ACCOUNT", accountId);
           emailIn.putExtra("org.codeaurora.email.intent.extra.MESSAGE_ID", handle);
           mContext.startService(emailIn);
           res = true;
        } else {
           if(V) Log.v(TAG,"Returning from setMessage Status Deleted");
        }
        if (crEmail != null) {
            crEmail.close();
        }
        return res;

    }

    @Override