Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fa5be2f authored by Jake Hamby's avatar Jake Hamby Committed by Android (Google) Code Review
Browse files

Merge "Bluetooth : fix for handling back key during pair dialog display"

parents ce477dbd aaf8ffff
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import android.widget.TextView;
import com.android.internal.app.AlertActivity;
import com.android.internal.app.AlertController;
import com.android.settings.R;
import android.view.KeyEvent;

/**
 * BluetoothPairingDialog asks the user to enter a PIN / Passkey / simple confirmation
@@ -340,6 +341,13 @@ public final class BluetoothPairingDialog extends AlertActivity implements
        mDevice.cancelPairingUserInput();
    }

    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            onCancel();
        }
        return super.onKeyDown(keyCode,event);
    }

    public void onClick(DialogInterface dialog, int which) {
        switch (which) {
            case BUTTON_POSITIVE: