code: private void hideToolbarNavigationIcon() {
          if (!displayHomeAsUp) {
              ActionBar actionBar = getSupportActionBar();
  
              if (actionBar != null) {
                  actionBar.setDisplayHomeAsUpEnabled(false);
                  actionBar.setHomeButtonEnabled(false);
              }
          }
      }
docs: Hides the navigation icon of the activity's toolbar, respectively sets it to the previous
  icon.