Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors. Test: We can't test it now. But we will have an integration test later. Bug: 110259478 Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
package com.android.settings.bluetooth;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.app.Activity;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@@ -26,12 +25,13 @@ import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
/**
|
||||
* BluetoothPairingDialog asks the user to enter a PIN / Passkey / simple confirmation
|
||||
* for pairing with a remote Bluetooth device. It is an activity that appears as a dialog.
|
||||
*/
|
||||
public class BluetoothPairingDialog extends Activity {
|
||||
public class BluetoothPairingDialog extends FragmentActivity {
|
||||
public static final String FRAGMENT_TAG = "bluetooth.pairing.fragment";
|
||||
|
||||
private BluetoothPairingController mBluetoothPairingController;
|
||||
@@ -70,7 +70,8 @@ public class BluetoothPairingDialog extends Activity {
|
||||
boolean fragmentFound = true;
|
||||
// check if the fragment has been preloaded
|
||||
BluetoothPairingDialogFragment bluetoothFragment =
|
||||
(BluetoothPairingDialogFragment) getFragmentManager().findFragmentByTag(FRAGMENT_TAG);
|
||||
(BluetoothPairingDialogFragment) getSupportFragmentManager().
|
||||
findFragmentByTag(FRAGMENT_TAG);
|
||||
// dismiss the fragment if it is already used
|
||||
if (bluetoothFragment != null && (bluetoothFragment.isPairingControllerSet()
|
||||
|| bluetoothFragment.isPairingDialogActivitySet())) {
|
||||
@@ -86,7 +87,7 @@ public class BluetoothPairingDialog extends Activity {
|
||||
bluetoothFragment.setPairingDialogActivity(this);
|
||||
// pass the fragment to the manager when it is created from scratch
|
||||
if (!fragmentFound) {
|
||||
bluetoothFragment.show(getFragmentManager(), FRAGMENT_TAG);
|
||||
bluetoothFragment.show(getSupportFragmentManager(), FRAGMENT_TAG);
|
||||
}
|
||||
/*
|
||||
* Leave this registered through pause/resume since we still want to
|
||||
|
Reference in New Issue
Block a user