Loading src/com/android/settings/bluetooth/BluetoothPairingDialog.java +11 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.settings.bluetooth; import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothUuid; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; Loading @@ -43,6 +44,7 @@ import com.android.internal.app.AlertController; import com.android.settings.R; import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager; import com.android.settingslib.bluetooth.LocalBluetoothManager; import com.android.settingslib.bluetooth.LocalBluetoothProfile; import java.util.Locale; Loading @@ -64,6 +66,8 @@ public final class BluetoothPairingDialog extends AlertActivity implements private String mPairingKey; private EditText mPairingView; private Button mOkButton; private LocalBluetoothProfile mPbapClientProfile; /** * Dismiss the dialog if the bond state changes to bonded or none, Loading Loading @@ -109,6 +113,7 @@ public final class BluetoothPairingDialog extends AlertActivity implements return; } mCachedDeviceManager = mBluetoothManager.getCachedDeviceManager(); mPbapClientProfile = mBluetoothManager.getProfileManager().getPbapClientProfile(); mDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); mType = intent.getIntExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, BluetoothDevice.ERROR); Loading Loading @@ -188,6 +193,9 @@ public final class BluetoothPairingDialog extends AlertActivity implements R.id.phonebook_sharing_message_entry_pin); contactSharing.setText(getString(R.string.bluetooth_pairing_shares_phonebook, mCachedDeviceManager.getName(mDevice))); if (mPbapClientProfile != null && mPbapClientProfile.isProfileReady()) { contactSharing.setVisibility(View.GONE); } if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_ALLOWED) { contactSharing.setChecked(true); } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){ Loading Loading @@ -261,6 +269,9 @@ public final class BluetoothPairingDialog extends AlertActivity implements R.id.phonebook_sharing_message_confirm_pin); contactSharing.setText(getString(R.string.bluetooth_pairing_shares_phonebook, mCachedDeviceManager.getName(mDevice))); if (mPbapClientProfile != null && mPbapClientProfile.isProfileReady()) { contactSharing.setVisibility(View.GONE); } if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_ALLOWED) { contactSharing.setChecked(true); } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){ Loading Loading
src/com/android/settings/bluetooth/BluetoothPairingDialog.java +11 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.settings.bluetooth; import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothUuid; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; Loading @@ -43,6 +44,7 @@ import com.android.internal.app.AlertController; import com.android.settings.R; import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager; import com.android.settingslib.bluetooth.LocalBluetoothManager; import com.android.settingslib.bluetooth.LocalBluetoothProfile; import java.util.Locale; Loading @@ -64,6 +66,8 @@ public final class BluetoothPairingDialog extends AlertActivity implements private String mPairingKey; private EditText mPairingView; private Button mOkButton; private LocalBluetoothProfile mPbapClientProfile; /** * Dismiss the dialog if the bond state changes to bonded or none, Loading Loading @@ -109,6 +113,7 @@ public final class BluetoothPairingDialog extends AlertActivity implements return; } mCachedDeviceManager = mBluetoothManager.getCachedDeviceManager(); mPbapClientProfile = mBluetoothManager.getProfileManager().getPbapClientProfile(); mDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); mType = intent.getIntExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, BluetoothDevice.ERROR); Loading Loading @@ -188,6 +193,9 @@ public final class BluetoothPairingDialog extends AlertActivity implements R.id.phonebook_sharing_message_entry_pin); contactSharing.setText(getString(R.string.bluetooth_pairing_shares_phonebook, mCachedDeviceManager.getName(mDevice))); if (mPbapClientProfile != null && mPbapClientProfile.isProfileReady()) { contactSharing.setVisibility(View.GONE); } if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_ALLOWED) { contactSharing.setChecked(true); } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){ Loading Loading @@ -261,6 +269,9 @@ public final class BluetoothPairingDialog extends AlertActivity implements R.id.phonebook_sharing_message_confirm_pin); contactSharing.setText(getString(R.string.bluetooth_pairing_shares_phonebook, mCachedDeviceManager.getName(mDevice))); if (mPbapClientProfile != null && mPbapClientProfile.isProfileReady()) { contactSharing.setVisibility(View.GONE); } if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_ALLOWED) { contactSharing.setChecked(true); } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){ Loading