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

Commit cbc1fb63 authored by Eugene Susla's avatar Eugene Susla Committed by android-build-merger
Browse files

Merge "[Companion] Fix NPE due to looking up view btoo soon" into oc-mr1-dev

am: 978b8e18

Change-Id: If3a550f694858d636e19b77a20837516f75a9545
parents 2c931c9e 978b8e18
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -55,8 +55,6 @@ public class DeviceChooserActivity extends Activity {
            Log.e(LOG_TAG, "About to show UI, but no devices to show");
        }

        mPairButton = findViewById(R.id.button_pair);

        if (getService().mRequest.isSingleDevice()) {
            setContentView(R.layout.device_confirmation);
            final DeviceFilterPair selectedDevice = getService().mDevicesFound.get(0);
@@ -64,11 +62,13 @@ public class DeviceChooserActivity extends Activity {
                    R.string.confirmation_title,
                    getCallingAppName(),
                    selectedDevice.getDisplayName()), 0));
            mPairButton = findViewById(R.id.button_pair);
            mPairButton.setOnClickListener(v -> onDeviceConfirmed(getService().mSelectedDevice));
            getService().mSelectedDevice = selectedDevice;
            onSelectionUpdate();
        } else {
            setContentView(R.layout.device_chooser);
            mPairButton = findViewById(R.id.button_pair);
            mPairButton.setVisibility(View.GONE);
            setTitle(Html.fromHtml(getString(R.string.chooser_title, getCallingAppName()), 0));
            mDeviceListView = findViewById(R.id.device_list);