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

Commit 61bf82bc authored by Michele's avatar Michele
Browse files

Use TelephonyManager API to check if device is SMS capable.

Bug: 146019274
Test: make
Change-Id: I88531c63d1cbf19160c1cd35807b6cab249a420a
parent 9a12610f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.os.Message;
import android.os.ParcelUuid;
import android.os.PowerManager;
import android.os.RemoteException;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
import android.util.SparseArray;
@@ -637,7 +638,8 @@ public class BluetoothMapService extends ProfileService {
        mAdapter = BluetoothAdapter.getDefaultAdapter();
        mAppObserver = new BluetoothMapAppObserver(this, this);

        mSmsCapable = getResources().getBoolean(com.android.internal.R.bool.config_sms_capable);
        TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
        mSmsCapable = tm.isSmsCapable();

        mEnabledAccounts = mAppObserver.getEnabledAccountItems();
        createMasInstances();  // Uses mEnabledAccounts