I have two activities. One activity is the authorization activity and the other navigation drawer with fragments. When I walk the way of registration and get on the navigation, I should not get to the login activity using the system back button.

How can I block this transition, if my system buttons busy:

```
    @Override
public void onBackPressed() {
    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    if (drawer.isDrawerOpen(GravityCompat.START)) {
        drawer.closeDrawer(GravityCompat.START);
    } else {
        super.onBackPressed();
    }
}

```