Merge "Calling setIsDrawerPresent(false) twice causes a crash." into nyc-dev

This commit is contained in:
Udam Saini
2016-03-29 19:42:42 +00:00
committed by Android (Google) Code Review

View File

@@ -155,8 +155,10 @@ public class SettingsDrawerActivity extends Activity {
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
updateDrawer(); updateDrawer();
} else { } else {
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); if (mDrawerLayout != null) {
mDrawerLayout = null; mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
mDrawerLayout = null;
}
} }
} }