Don't show afw default app pref if there is no candidate.

Change-Id: I25f077662264406a8a4d819db7b4713be753a33b
Fix: 22564285
Test: make RunSettingsRoboTests
This commit is contained in:
Fan Zhang
2017-02-22 14:29:22 -08:00
parent c1a7723c17
commit c13b950b02
6 changed files with 73 additions and 21 deletions

View File

@@ -125,6 +125,10 @@ public final class SmsDefaultDialog extends AlertActivity implements
p.mOnClickListener = this;
p.mNegativeButtonText = getString(R.string.cancel);
p.mNegativeButtonListener = this;
if (p.mAdapter.isEmpty()) {
// If there is nothing to choose from, don't build the dialog.
return false;
}
}
setupAlert();