• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

Revision65d27a55aba3bf1b134c2d81d6e9a605c2d2206d (tree)
Time2018-12-21 18:18:58
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Android 8.1.0 release 53
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCXAVssQAKCRDorT+BmrEO
eOCZAJ9vq6+cG0TdL0GVpkuA+aSYN9QRbACfZHDKNB0Qwu8bX8QNHFt+w8fA13Y=
=LxBV
-----END PGP SIGNATURE-----

Merge tag 'android-8.1.0_r53' into oreo-x86

Android 8.1.0 release 53

Change Summary

Incremental Difference

--- a/src/com/android/settings/bluetooth/BluetoothPairingController.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingController.java
@@ -23,12 +23,16 @@ import android.text.Editable;
2323 import android.util.Log;
2424 import android.widget.CompoundButton;
2525 import android.widget.CompoundButton.OnCheckedChangeListener;
26+
2627 import com.android.settings.R;
2728 import com.android.settings.bluetooth.BluetoothPairingDialogFragment.BluetoothPairingDialogListener;
2829 import com.android.settingslib.bluetooth.LocalBluetoothManager;
2930 import com.android.settingslib.bluetooth.LocalBluetoothProfile;
31+
3032 import java.util.Locale;
3133
34+import android.support.annotation.VisibleForTesting;
35+
3236 /**
3337 * A controller used by {@link BluetoothPairingDialog} to manage connection state while we try to
3438 * pair with a bluetooth device. It includes methods that allow the
@@ -50,8 +54,10 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
5054
5155 // Bluetooth dependencies for the connection we are trying to establish
5256 private LocalBluetoothManager mBluetoothManager;
53- private BluetoothDevice mDevice;
54- private int mType;
57+ @VisibleForTesting
58+ BluetoothDevice mDevice;
59+ @VisibleForTesting
60+ int mType;
5561 private String mUserInput;
5662 private String mPasskeyFormatted;
5763 private int mPasskey;
@@ -82,7 +88,6 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
8288 mDeviceName = mBluetoothManager.getCachedDeviceManager().getName(mDevice);
8389 mPbapClientProfile = mBluetoothManager.getProfileManager().getPbapClientProfile();
8490 mPasskeyFormatted = formatKey(mPasskey);
85-
8691 }
8792
8893 @Override
@@ -96,12 +101,13 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
96101
97102 @Override
98103 public void onDialogPositiveClick(BluetoothPairingDialogFragment dialog) {
104+ if (mPbapAllowed) {
105+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
106+ } else {
107+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED);
108+ }
109+
99110 if (getDialogType() == USER_ENTRY_DIALOG) {
100- if (mPbapAllowed) {
101- mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
102- } else {
103- mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED);
104- }
105111 onPair(mUserInput);
106112 } else {
107113 onPair(null);