Loading android/app/src/com/android/bluetooth/Utils.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -110,6 +110,7 @@ public final class Utils { */ */ public static final char PAUSE = ','; public static final char PAUSE = ','; public static final char WAIT = ';'; public static final char WAIT = ';'; public static final String PAIRING_UI_PROPERTY = "bluetooth.pairing_ui_package.name"; private static boolean isPause(char c) { private static boolean isPause(char c) { return c == 'p' || c == 'P'; return c == 'p' || c == 'P'; Loading android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -1088,7 +1088,10 @@ final class RemoteDevices { // Send PAIRING_CANCEL intent to dismiss any dialog requesting bonding. // Send PAIRING_CANCEL intent to dismiss any dialog requesting bonding. intent = new Intent(BluetoothDevice.ACTION_PAIRING_CANCEL); intent = new Intent(BluetoothDevice.ACTION_PAIRING_CANCEL); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); intent.setPackage(mAdapterService.getString(R.string.pairing_ui_package)); intent.setPackage(SystemProperties.get( Utils.PAIRING_UI_PROPERTY, mAdapterService.getString(R.string.pairing_ui_package))); Utils.sendBroadcast(mAdapterService, intent, BLUETOOTH_CONNECT, Utils.sendBroadcast(mAdapterService, intent, BLUETOOTH_CONNECT, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempAllowlistBroadcastOptions()); } else if (device.getBondState() == BluetoothDevice.BOND_NONE) { } else if (device.getBondState() == BluetoothDevice.BOND_NONE) { Loading android/app/src/com/android/bluetooth/hfp/AtPhonebook.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.content.Intent; import android.database.Cursor; import android.database.Cursor; import android.net.Uri; import android.net.Uri; import android.os.Bundle; import android.os.Bundle; import android.os.SystemProperties; import android.provider.CallLog.Calls; import android.provider.CallLog.Calls; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.PhoneLookup; import android.provider.ContactsContract.PhoneLookup; Loading Loading @@ -107,7 +108,9 @@ public class AtPhonebook { public AtPhonebook(Context context, HeadsetNativeInterface nativeInterface) { public AtPhonebook(Context context, HeadsetNativeInterface nativeInterface) { mContext = context; mContext = context; mPairingPackage = context.getString(R.string.pairing_ui_package); mPairingPackage = SystemProperties.get( Utils.PAIRING_UI_PROPERTY, context.getString(R.string.pairing_ui_package)); mContentResolver = context.getContentResolver(); mContentResolver = context.getContentResolver(); mNativeInterface = nativeInterface; mNativeInterface = nativeInterface; mPhonebooks.put("DC", new PhonebookResult()); // dialled calls mPhonebooks.put("DC", new PhonebookResult()); // dialled calls Loading android/app/src/com/android/bluetooth/map/BluetoothMapService.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.os.Message; import android.os.ParcelUuid; import android.os.ParcelUuid; import android.os.PowerManager; import android.os.PowerManager; import android.os.RemoteException; import android.os.RemoteException; import android.os.SystemProperties; import android.sysprop.BluetoothProperties; import android.sysprop.BluetoothProperties; import android.telephony.TelephonyManager; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.text.TextUtils; Loading Loading @@ -384,7 +385,9 @@ public class BluetoothMapService extends ProfileService { case USER_TIMEOUT: case USER_TIMEOUT: if (mIsWaitingAuthorization) { if (mIsWaitingAuthorization) { Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL); Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL); intent.setPackage(getString(R.string.pairing_ui_package)); intent.setPackage(SystemProperties.get( Utils.PAIRING_UI_PROPERTY, getString(R.string.pairing_ui_package))); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, sRemoteDevice); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, sRemoteDevice); intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS); BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS); Loading Loading @@ -951,7 +954,9 @@ public class BluetoothMapService extends ProfileService { if (sendIntent) { if (sendIntent) { // This will trigger Settings app's dialog. // This will trigger Settings app's dialog. Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_REQUEST); Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_REQUEST); intent.setPackage(getString(R.string.pairing_ui_package)); intent.setPackage(SystemProperties.get( Utils.PAIRING_UI_PROPERTY, getString(R.string.pairing_ui_package))); intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS); BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, sRemoteDevice); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, sRemoteDevice); Loading android/app/src/com/android/bluetooth/pbap/BluetoothPbapService.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,7 @@ import android.os.HandlerThread; import android.os.Looper; import android.os.Looper; import android.os.Message; import android.os.Message; import android.os.PowerManager; import android.os.PowerManager; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserHandle; import android.os.UserManager; import android.os.UserManager; import android.sysprop.BluetoothProperties; import android.sysprop.BluetoothProperties; Loading Loading @@ -457,7 +458,9 @@ public class BluetoothPbapService extends ProfileService implements IObexConnect break; break; case USER_TIMEOUT: case USER_TIMEOUT: Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL); Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL); intent.setPackage(getString(R.string.pairing_ui_package)); intent.setPackage(SystemProperties.get( Utils.PAIRING_UI_PROPERTY, getString(R.string.pairing_ui_package))); PbapStateMachine stateMachine = (PbapStateMachine) msg.obj; PbapStateMachine stateMachine = (PbapStateMachine) msg.obj; intent.putExtra(BluetoothDevice.EXTRA_DEVICE, stateMachine.getRemoteDevice()); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, stateMachine.getRemoteDevice()); intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, Loading Loading
android/app/src/com/android/bluetooth/Utils.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -110,6 +110,7 @@ public final class Utils { */ */ public static final char PAUSE = ','; public static final char PAUSE = ','; public static final char WAIT = ';'; public static final char WAIT = ';'; public static final String PAIRING_UI_PROPERTY = "bluetooth.pairing_ui_package.name"; private static boolean isPause(char c) { private static boolean isPause(char c) { return c == 'p' || c == 'P'; return c == 'p' || c == 'P'; Loading
android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -1088,7 +1088,10 @@ final class RemoteDevices { // Send PAIRING_CANCEL intent to dismiss any dialog requesting bonding. // Send PAIRING_CANCEL intent to dismiss any dialog requesting bonding. intent = new Intent(BluetoothDevice.ACTION_PAIRING_CANCEL); intent = new Intent(BluetoothDevice.ACTION_PAIRING_CANCEL); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); intent.setPackage(mAdapterService.getString(R.string.pairing_ui_package)); intent.setPackage(SystemProperties.get( Utils.PAIRING_UI_PROPERTY, mAdapterService.getString(R.string.pairing_ui_package))); Utils.sendBroadcast(mAdapterService, intent, BLUETOOTH_CONNECT, Utils.sendBroadcast(mAdapterService, intent, BLUETOOTH_CONNECT, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempAllowlistBroadcastOptions()); } else if (device.getBondState() == BluetoothDevice.BOND_NONE) { } else if (device.getBondState() == BluetoothDevice.BOND_NONE) { Loading
android/app/src/com/android/bluetooth/hfp/AtPhonebook.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.content.Intent; import android.database.Cursor; import android.database.Cursor; import android.net.Uri; import android.net.Uri; import android.os.Bundle; import android.os.Bundle; import android.os.SystemProperties; import android.provider.CallLog.Calls; import android.provider.CallLog.Calls; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.PhoneLookup; import android.provider.ContactsContract.PhoneLookup; Loading Loading @@ -107,7 +108,9 @@ public class AtPhonebook { public AtPhonebook(Context context, HeadsetNativeInterface nativeInterface) { public AtPhonebook(Context context, HeadsetNativeInterface nativeInterface) { mContext = context; mContext = context; mPairingPackage = context.getString(R.string.pairing_ui_package); mPairingPackage = SystemProperties.get( Utils.PAIRING_UI_PROPERTY, context.getString(R.string.pairing_ui_package)); mContentResolver = context.getContentResolver(); mContentResolver = context.getContentResolver(); mNativeInterface = nativeInterface; mNativeInterface = nativeInterface; mPhonebooks.put("DC", new PhonebookResult()); // dialled calls mPhonebooks.put("DC", new PhonebookResult()); // dialled calls Loading
android/app/src/com/android/bluetooth/map/BluetoothMapService.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.os.Message; import android.os.ParcelUuid; import android.os.ParcelUuid; import android.os.PowerManager; import android.os.PowerManager; import android.os.RemoteException; import android.os.RemoteException; import android.os.SystemProperties; import android.sysprop.BluetoothProperties; import android.sysprop.BluetoothProperties; import android.telephony.TelephonyManager; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.text.TextUtils; Loading Loading @@ -384,7 +385,9 @@ public class BluetoothMapService extends ProfileService { case USER_TIMEOUT: case USER_TIMEOUT: if (mIsWaitingAuthorization) { if (mIsWaitingAuthorization) { Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL); Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL); intent.setPackage(getString(R.string.pairing_ui_package)); intent.setPackage(SystemProperties.get( Utils.PAIRING_UI_PROPERTY, getString(R.string.pairing_ui_package))); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, sRemoteDevice); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, sRemoteDevice); intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS); BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS); Loading Loading @@ -951,7 +954,9 @@ public class BluetoothMapService extends ProfileService { if (sendIntent) { if (sendIntent) { // This will trigger Settings app's dialog. // This will trigger Settings app's dialog. Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_REQUEST); Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_REQUEST); intent.setPackage(getString(R.string.pairing_ui_package)); intent.setPackage(SystemProperties.get( Utils.PAIRING_UI_PROPERTY, getString(R.string.pairing_ui_package))); intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS); BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, sRemoteDevice); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, sRemoteDevice); Loading
android/app/src/com/android/bluetooth/pbap/BluetoothPbapService.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,7 @@ import android.os.HandlerThread; import android.os.Looper; import android.os.Looper; import android.os.Message; import android.os.Message; import android.os.PowerManager; import android.os.PowerManager; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserHandle; import android.os.UserManager; import android.os.UserManager; import android.sysprop.BluetoothProperties; import android.sysprop.BluetoothProperties; Loading Loading @@ -457,7 +458,9 @@ public class BluetoothPbapService extends ProfileService implements IObexConnect break; break; case USER_TIMEOUT: case USER_TIMEOUT: Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL); Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL); intent.setPackage(getString(R.string.pairing_ui_package)); intent.setPackage(SystemProperties.get( Utils.PAIRING_UI_PROPERTY, getString(R.string.pairing_ui_package))); PbapStateMachine stateMachine = (PbapStateMachine) msg.obj; PbapStateMachine stateMachine = (PbapStateMachine) msg.obj; intent.putExtra(BluetoothDevice.EXTRA_DEVICE, stateMachine.getRemoteDevice()); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, stateMachine.getRemoteDevice()); intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE, Loading