Close the dialog activity when user click cancel or background
Bug: 241346100 Test: local test Change-Id: Id9d931fc8b74ef566ffe3c6135aaf433cd9f770b
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings.bluetooth;
|
||||
import android.app.Dialog;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
@@ -27,6 +28,7 @@ import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.android.settings.R;
|
||||
@@ -128,6 +130,12 @@ public class BluetoothBroadcastDialog extends InstrumentedDialogFragment {
|
||||
return SettingsEnums.DIALOG_LE_AUDIO_BROADCAST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(@NonNull DialogInterface dialog) {
|
||||
dismiss();
|
||||
getActivity().finish();
|
||||
}
|
||||
|
||||
private void launchFindBroadcastsActivity() {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(KEY_DEVICE_ADDRESS, mDeviceAddress);
|
||||
|
Reference in New Issue
Block a user