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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17948532

Change-Id: I8e7a1cedac8325fcc37d4be5da5b2c849c2a91f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Evan Chen
2022-05-07 01:07:32 +00:00
committed by Automerger Merge Worker

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(