Merge "No need to show user consent for SingleDevice && isSkipPrompt" into tm-dev

This commit is contained in:
Evan Chen
2022-05-07 00:42:59 +00:00
committed by Android (Google) Code Review

View File

@@ -484,6 +484,14 @@ public class CompanionDeviceActivity extends FragmentActivity implements
if (deviceFilterPairs.isEmpty()) return;
mSelectedDevice = requireNonNull(deviceFilterPairs.get(0));
// No need to show user consent dialog if it is a singleDevice
// and isSkipPrompt(true) AssociationRequest.
// See AssociationRequestsProcessor#mayAssociateWithoutPrompt.
if (mRequest.isSkipPrompt()) {
mSingleDeviceSpinner.setVisibility(View.GONE);
onUserSelectedDevice(mSelectedDevice);
return;
}
final String deviceName = mSelectedDevice.getDisplayName();
final Spanned title = getHtmlFromResources(