Merge "Do not call setAlwaysButtonEnabled if the activity doesn't support defaults." into oc-mr1-dev

am: c1235a1ff2

Change-Id: I109b96ae365e102428fbe6c7174ebd140145e293
This commit is contained in:
Ruchi Kandoi
2017-08-31 20:01:13 +00:00
committed by android-build-merger

View File

@@ -1941,7 +1941,8 @@ public class ResolverActivity extends Activity {
final int checkedPos = mAdapterView.getCheckedItemPosition();
final boolean hasValidSelection = checkedPos != ListView.INVALID_POSITION;
if (!useLayoutWithDefault()
&& (!hasValidSelection || mLastSelected != checkedPos)) {
&& (!hasValidSelection || mLastSelected != checkedPos)
&& mAlwaysButton != null) {
setAlwaysButtonEnabled(hasValidSelection, checkedPos, true);
mOnceButton.setEnabled(hasValidSelection);
if (hasValidSelection) {