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

Commit a2dc3f08 authored by Vasu Nori's avatar Vasu Nori
Browse files

When a sent-notification is delivered, return error code

as mentioned in SmsManager.

Otherwise, messaging apps won't like it.

Bug: 71910324
Test: tested manually
Change-Id: I0c069887bafb93169be09e244e9201a50a1804a9
parent 357c4019
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
 */
package com.android.bluetooth.mapclient;

import android.app.Activity;
import android.app.PendingIntent;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
@@ -51,6 +52,7 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Message;
import android.telecom.PhoneAccount;
import android.telephony.SmsManager;
import android.util.Log;

import com.android.bluetooth.btservice.ProfileService;
@@ -605,10 +607,10 @@ final class MceStateMachine extends StateMachine {
                    if (DBG) {
                        Log.d(TAG, "*******Sending " + intentToSend);
                    }
                    int result = 0;
                    int result = Activity.RESULT_OK;
                    if (status == EventReport.Type.SENDING_FAILURE
                            || status == EventReport.Type.DELIVERY_FAILURE) {
                        result = -1;
                        result = SmsManager.RESULT_ERROR_GENERIC_FAILURE;
                    }
                    intentToSend.send(result);
                } catch (PendingIntent.CanceledException e) {