Loading src/java/com/android/internal/telephony/BtSmsInterfaceManager.java +6 −10 Original line number Diff line number Diff line Loading @@ -18,7 +18,9 @@ package com.android.internal.telephony; import android.app.PendingIntent; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothMapClient; import android.bluetooth.BluetoothProfile; import android.content.Context; import android.net.Uri; Loading @@ -40,10 +42,6 @@ public class BtSmsInterfaceManager { */ public void sendText(Context context, String destAddr, String text, PendingIntent sentIntent, PendingIntent deliveryIntent, SubscriptionInfo info) { /* This is to remove the usage of hidden constant MAP_CLIENT and hidden API BluetoothMapClient.sendMessage(). This code is currently not functional anyway; it will be re-enabled in a later release. BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter(); if (btAdapter == null) { // No bluetooth service on this platform? Loading @@ -56,10 +54,11 @@ public class BtSmsInterfaceManager { sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_INVALID_BLUETOOTH_ADDRESS); return; } btAdapter.getProfileProxy(context.getApplicationContext(), if (btAdapter.getProfileProxy(context.getApplicationContext(), new MapMessageSender(destAddr, text, device, sentIntent, deliveryIntent), BluetoothProfile.MAP_CLIENT); */ BluetoothProfile.MAP_CLIENT)) { return; } throw new RuntimeException("Can't send message through BluetoothMapClient"); } Loading Loading @@ -100,7 +99,6 @@ public class BtSmsInterfaceManager { @Override public void onServiceConnected(int profile, BluetoothProfile proxy) { Log.d(LOG_TAG, "Service connected"); /* if (profile != BluetoothProfile.MAP_CLIENT) { return; } Loading @@ -112,8 +110,6 @@ public class BtSmsInterfaceManager { } BluetoothAdapter.getDefaultAdapter() .closeProfileProxy(BluetoothProfile.MAP_CLIENT, mapProfile); */ throw new RuntimeException("Can't send message through BluetoothMapClient"); } @Override Loading Loading
src/java/com/android/internal/telephony/BtSmsInterfaceManager.java +6 −10 Original line number Diff line number Diff line Loading @@ -18,7 +18,9 @@ package com.android.internal.telephony; import android.app.PendingIntent; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothMapClient; import android.bluetooth.BluetoothProfile; import android.content.Context; import android.net.Uri; Loading @@ -40,10 +42,6 @@ public class BtSmsInterfaceManager { */ public void sendText(Context context, String destAddr, String text, PendingIntent sentIntent, PendingIntent deliveryIntent, SubscriptionInfo info) { /* This is to remove the usage of hidden constant MAP_CLIENT and hidden API BluetoothMapClient.sendMessage(). This code is currently not functional anyway; it will be re-enabled in a later release. BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter(); if (btAdapter == null) { // No bluetooth service on this platform? Loading @@ -56,10 +54,11 @@ public class BtSmsInterfaceManager { sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_INVALID_BLUETOOTH_ADDRESS); return; } btAdapter.getProfileProxy(context.getApplicationContext(), if (btAdapter.getProfileProxy(context.getApplicationContext(), new MapMessageSender(destAddr, text, device, sentIntent, deliveryIntent), BluetoothProfile.MAP_CLIENT); */ BluetoothProfile.MAP_CLIENT)) { return; } throw new RuntimeException("Can't send message through BluetoothMapClient"); } Loading Loading @@ -100,7 +99,6 @@ public class BtSmsInterfaceManager { @Override public void onServiceConnected(int profile, BluetoothProfile proxy) { Log.d(LOG_TAG, "Service connected"); /* if (profile != BluetoothProfile.MAP_CLIENT) { return; } Loading @@ -112,8 +110,6 @@ public class BtSmsInterfaceManager { } BluetoothAdapter.getDefaultAdapter() .closeProfileProxy(BluetoothProfile.MAP_CLIENT, mapProfile); */ throw new RuntimeException("Can't send message through BluetoothMapClient"); } @Override Loading