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
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index c4585d1..cecf708 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -199,6 +199,8 @@
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 @@
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);