Error handler for start dialog from adb command
This CL added null check for the case that dialog is started from adb command. Bug: 129783237 Test: manually Change-Id: I47d47cb5ddfe3487e2d616d1cf2ed08bd11d215d
This commit is contained in:
@@ -65,6 +65,11 @@ public class BluetoothPairingDialog extends FragmentActivity {
|
|||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
|
if (intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE) == null) {
|
||||||
|
// Error handler for the case that dialog is started from adb command.
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
mBluetoothPairingController = new BluetoothPairingController(intent, this);
|
mBluetoothPairingController = new BluetoothPairingController(intent, this);
|
||||||
// build the dialog fragment
|
// build the dialog fragment
|
||||||
boolean fragmentFound = true;
|
boolean fragmentFound = true;
|
||||||
|
Reference in New Issue
Block a user