Bluetooth: do not dimiss fragment when Activity.finish() is called

* When Activity.finish() is called, it's associtated fragments are all
  dismissed automatically
* Cached used fragments are dimissed in onCreate() before new ones are
  created

Bug: 62230203
Test: Pair with Bluetooth device, Settings unit tests
Change-Id: Ieca88ba0660c5407f0d88d572d06a722c642ac39
This commit is contained in:
Jack He
2017-08-30 16:12:45 -07:00
parent f5d7db2cfa
commit 6108d6c22e

View File

@@ -108,12 +108,6 @@ public class BluetoothPairingDialog extends Activity {
@VisibleForTesting
void dismiss() {
if (!isFinishing()) {
BluetoothPairingDialogFragment bluetoothFragment =
(BluetoothPairingDialogFragment) getFragmentManager()
.findFragmentByTag(FRAGMENT_TAG);
if (bluetoothFragment != null) {
bluetoothFragment.dismiss();
}
finish();
}
}