Don't dial any number if DIAL intent is not supported.
Bug: 30868123 Change-Id: Ieb971fdd86011ef0699fdbcfec1ecce2112d0209
This commit is contained in:
@@ -450,9 +450,15 @@ public final class SupportItemAdapter extends RecyclerView.Adapter<SupportItemAd
|
||||
final SupportPhone phone = mSupportFeatureProvider
|
||||
.getSupportPhones(mSelectedCountry, true /* isTollFree */);
|
||||
if (phone != null) {
|
||||
MetricsLogger.action(mActivity,
|
||||
MetricsProto.MetricsEvent.ACTION_SUPPORT_DAIL_TOLLFREE);
|
||||
mActivity.startActivity(phone.getDialIntent());
|
||||
final Intent intent = phone.getDialIntent();
|
||||
final boolean canDial = !mActivity.getPackageManager()
|
||||
.queryIntentActivities(intent, 0)
|
||||
.isEmpty();
|
||||
if (canDial) {
|
||||
MetricsLogger.action(mActivity,
|
||||
MetricsProto.MetricsEvent.ACTION_SUPPORT_DAIL_TOLLFREE);
|
||||
mActivity.startActivity(intent);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user