Added width specs when creating brightness dialog from settings

The new default width for brightness slider UI is half width when in
landscape mode. However for settings we want full width, now settings
will also send a boolean along with the Intent to start brightness
dialog activity, specifying that the width of the brightness dialog
should be full width.

Test: open settings->display. click or press "Brightness Level" and
check that the brightness slider UI takes the full width of the right
hand pane of settings
Fixes: 303633970

Change-Id: Id40112c652e518b14cf000c791b7965bbb0991cd
diff --git a/src/com/android/settings/display/BrightnessLevelPreferenceController.java b/src/com/android/settings/display/BrightnessLevelPreferenceController.java
index b6a0ca3..ac1a1cb 100644
--- a/src/com/android/settings/display/BrightnessLevelPreferenceController.java
+++ b/src/com/android/settings/display/BrightnessLevelPreferenceController.java
@@ -14,6 +14,7 @@
 package com.android.settings.display;
 
 import static android.content.Intent.ACTION_SHOW_BRIGHTNESS_DIALOG;
+import static android.content.Intent.EXTRA_BRIGHTNESS_DIALOG_IS_FULL_WIDTH;
 
 import static com.android.settingslib.display.BrightnessUtils.GAMMA_SPACE_MAX;
 import static com.android.settingslib.display.BrightnessUtils.GAMMA_SPACE_MIN;
@@ -53,7 +54,6 @@
     private static final String TAG = "BrightnessPrefCtrl";
     private static final String KEY_BRIGHTNESS = "brightness";
     private static final Uri BRIGHTNESS_ADJ_URI;
-
     private final ContentResolver mContentResolver;
     private final Handler mHandler = new Handler(Looper.getMainLooper());
     private final DisplayManager mDisplayManager;
@@ -141,6 +141,7 @@
         final Intent intent = new Intent(ACTION_SHOW_BRIGHTNESS_DIALOG);
         intent.putExtra(SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE,
                 SettingsTransitionHelper.TransitionType.TRANSITION_NONE);
+        intent.putExtra(EXTRA_BRIGHTNESS_DIALOG_IS_FULL_WIDTH, true);
 
         // Start activity in the same task and pass fade animations
         final ActivityOptions options = ActivityOptions.makeCustomAnimation(mContext,