code: private void updateAppearance() {
          // Expand overflow button.
          if (mAdapter.getCount() > 0) {
              mExpandActivityOverflowButton.setEnabled(true);
          } else {
              mExpandActivityOverflowButton.setEnabled(false);
          }
          // Default activity button.
          final int activityCount = mAdapter.getActivityCount();
          final int historySize = mAdapter.getHistorySize();
          if (activityCount > 0 && historySize > 0) {
              mDefaultActivityButton.setVisibility(VISIBLE);
              ResolveInfo activity = mAdapter.getDefaultActivity();
              PackageManager packageManager = mContext.getPackageManager();
              mDefaultActivityButtonImage.setImageDrawable(activity.loadIcon(packageManager));
              if (mDefaultActionButtonContentDescription != 0) {
                  CharSequence label = activity.loadLabel(packageManager);
                  String contentDescription = mContext.getString(
                          mDefaultActionButtonContentDescription, label);
                  mDefaultActivityButton.setContentDescription(contentDescription);
              }
  
              // Work-around for #415.
              mAdapter.setShowDefaultActivity(false, false);
          } else {
              mDefaultActivityButton.setVisibility(View.GONE);
          }
          // Activity chooser content.
          if (mDefaultActivityButton.getVisibility() == VISIBLE) {
              mActivityChooserContent.setBackgroundDrawable(mActivityChooserContentBackground);
          } else {
              mActivityChooserContent.setBackgroundDrawable(null);
              mActivityChooserContent.setPadding(0, 0, 0, 0);
          }
      }
docs: Updates the buttons state.