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

Commit 7cab8853 authored by Evan Chen's avatar Evan Chen Committed by Android (Google) Code Review
Browse files

Merge "Fix screen is flickering after selecting the deivce" into main

parents 622acdbb bf3d1545
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -554,11 +554,18 @@ public class CompanionAssociationActivity extends FragmentActivity implements
        mSelectedDevice = requireNonNull(selectedDevice);

        Slog.d(TAG, "onDeviceClicked(): " + mSelectedDevice.toShortString());

        // The permission consent dialog should not be displayed if it's a isSkipPrompt(true)
        // AssociationRequest or when there is no device profile available
        // for the multiple devices dialog.
        // See AssociationRequestsProcessor#mayAssociateWithoutPrompt.
        final String deviceProfile = mRequest.getDeviceProfile();
        if (deviceProfile == null || mRequest.isSkipPrompt()) {
            onUserSelectedDevice(mSelectedDevice);
            return;
        }
        // The permission consent dialog should be displayed for the multiple device
        // dialog if a device profile exists.
        updateSingleDeviceUi();

        if (mRequest.isSkipPrompt()) return;

        mSummary.setVisibility(View.VISIBLE);
        mButtonAllow.setVisibility(View.VISIBLE);
        mButtonNotAllow.setVisibility(View.VISIBLE);
@@ -588,9 +595,6 @@ public class CompanionAssociationActivity extends FragmentActivity implements
        if (deviceProfile == null && mRequest.isSingleDevice()) {
            summary = getHtmlFromResources(this, summaryResourceId, remoteDeviceName);
            mConstraintList.setVisibility(View.GONE);
        } else if (deviceProfile == null) {
            onUserSelectedDevice(mSelectedDevice);
            return;
        } else {
            summary = getHtmlFromResources(
                    this, summaryResourceId, getString(R.string.device_type));