Prevents drawer menu from showing depending on intent.

When ChooseLockScreenGeneric is started via the set password
intents, it should not allow the drawer menu to show.

bug:26288300
Change-Id: I10d512e20fedab2be8c725c7d524db0c55666590
This commit is contained in:
Udam Saini
2016-03-28 14:29:48 -07:00
parent 1997f76cfc
commit 92779ce701
5 changed files with 25 additions and 0 deletions

View File

@@ -199,6 +199,8 @@ public class SettingsActivity extends SettingsDrawerActivity
public static final String EXTRA_SHOW_FRAGMENT_AS_SUBSETTING =
":settings:show_fragment_as_subsetting";
public static final String EXTRA_HIDE_DRAWER = ":settings:hide_drawer";
public static final String META_DATA_KEY_FRAGMENT_CLASS =
"com.android.settings.FRAGMENT_CLASS";
@@ -511,6 +513,9 @@ public class SettingsActivity extends SettingsDrawerActivity
if (intent.hasExtra(EXTRA_UI_OPTIONS)) {
getWindow().setUiOptions(intent.getIntExtra(EXTRA_UI_OPTIONS, 0));
}
if (intent.getBooleanExtra(EXTRA_HIDE_DRAWER, false)) {
setIsDrawerPresent(false);
}
mDevelopmentPreferences = getSharedPreferences(DevelopmentSettings.PREF_FILE,
Context.MODE_PRIVATE);