diff options
24 files changed, 104 insertions, 43 deletions
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 88d7710e56c6..ac88b4590f5f 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -681,7 +681,7 @@ <activity android:name=".settings.brightness.BrightnessDialog" android:label="@string/quick_settings_brightness_dialog_title" - android:theme="@*android:style/Theme.DeviceDefault.SystemUI.Dialog" + android:theme="@style/Theme.SystemUI.QuickSettings.BrightnessDialog" android:finishOnCloseSystemDialogs="true" android:launchMode="singleInstance" android:excludeFromRecents="true" diff --git a/packages/SystemUI/res/drawable/brightness_mirror_background.xml b/packages/SystemUI/res/drawable/brightness_mirror_background.xml index 4b225b763f3e..ae3d31290a3f 100644 --- a/packages/SystemUI/res/drawable/brightness_mirror_background.xml +++ b/packages/SystemUI/res/drawable/brightness_mirror_background.xml @@ -15,6 +15,6 @@ ~ limitations under the License --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="?android:attr/colorBackgroundFloating" /> + <solid android:color="?attr/underSurfaceColor" /> <corners android:radius="8dp" /> </shape> diff --git a/packages/SystemUI/res/drawable/brightness_progress_drawable.xml b/packages/SystemUI/res/drawable/brightness_progress_drawable.xml index 73b02f4fa481..88d8f78fa610 100644 --- a/packages/SystemUI/res/drawable/brightness_progress_drawable.xml +++ b/packages/SystemUI/res/drawable/brightness_progress_drawable.xml @@ -24,7 +24,7 @@ <shape> <size android:height="@dimen/rounded_slider_track_width" /> <corners android:radius="@dimen/rounded_slider_track_corner_radius" /> - <solid android:color="?android:attr/textColorPrimary" /> + <solid android:color="?attr/offStateColor" /> </shape> </inset> </item> diff --git a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml index f8f455d390c7..ceef9f909c97 100644 --- a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml +++ b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml @@ -16,12 +16,13 @@ --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:priv-android="http://schemas.android.com/apk/prv/res/android" android:autoMirrored="true"> <item android:id="@+id/slider_foreground" android:height="@dimen/rounded_slider_height"> <shape> <size android:height="@dimen/rounded_slider_height" /> - <solid android:color="?android:attr/colorControlActivated" /> + <solid android:color="?priv-android:attr/colorAccentPrimary" /> <corners android:radius="@dimen/rounded_slider_corner_radius"/> </shape> </item> diff --git a/packages/SystemUI/res/drawable/qs_background_primary.xml b/packages/SystemUI/res/drawable/qs_background_primary.xml index 0a3afc575c4a..30d026ec2948 100644 --- a/packages/SystemUI/res/drawable/qs_background_primary.xml +++ b/packages/SystemUI/res/drawable/qs_background_primary.xml @@ -16,7 +16,7 @@ --> <inset xmlns:android="http://schemas.android.com/apk/res/android"> <shape> - <solid android:color="?android:attr/colorBackground"/> + <solid android:color="?attr/underSurfaceColor"/> <corners android:radius="@dimen/notification_corner_radius" /> </shape> </inset>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml b/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml index f086cec01234..1124a9220a2c 100644 --- a/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml +++ b/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml @@ -14,4 +14,4 @@ limitations under the License. --> <color xmlns:android="http://schemas.android.com/apk/res/android" - android:color="@color/qs_customize_decoration"/>
\ No newline at end of file + android:color="?android:attr/colorBackground"/>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/qs_customizer_background_primary.xml b/packages/SystemUI/res/drawable/qs_customizer_background_primary.xml index c2d0841a1b8f..ea0aafd321e1 100644 --- a/packages/SystemUI/res/drawable/qs_customizer_background_primary.xml +++ b/packages/SystemUI/res/drawable/qs_customizer_background_primary.xml @@ -15,7 +15,7 @@ --> <inset xmlns:android="http://schemas.android.com/apk/res/android"> <shape> - <solid android:color="?android:attr/colorBackgroundFloating"/> + <solid android:color="?attr/underSurfaceColor"/> <corners android:radius="?android:attr/dialogCornerRadius" /> </shape> </inset> diff --git a/packages/SystemUI/res/drawable/qs_customizer_toolbar.xml b/packages/SystemUI/res/drawable/qs_customizer_toolbar.xml index 416583013e64..ef950fe67ad2 100644 --- a/packages/SystemUI/res/drawable/qs_customizer_toolbar.xml +++ b/packages/SystemUI/res/drawable/qs_customizer_toolbar.xml @@ -15,6 +15,6 @@ --> <inset xmlns:android="http://schemas.android.com/apk/res/android"> <shape> - <solid android:color="?android:attr/colorBackgroundFloating"/> + <solid android:color="?attr/underSurfaceColor"/> </shape> </inset> diff --git a/packages/SystemUI/res/drawable/privacy_dialog_bg.xml b/packages/SystemUI/res/drawable/qs_dialog_bg.xml index 96136c4afab8..b307781c6ac4 100644 --- a/packages/SystemUI/res/drawable/privacy_dialog_bg.xml +++ b/packages/SystemUI/res/drawable/qs_dialog_bg.xml @@ -18,5 +18,5 @@ <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="?android:attr/colorBackground" /> - <corners android:radius="@dimen/ongoing_appops_dialog_bg_corner_radius" /> + <corners android:radius="?android:attr/dialogCornerRadius" /> </shape>
\ No newline at end of file diff --git a/packages/SystemUI/res/layout/brightness_mirror.xml b/packages/SystemUI/res/layout/brightness_mirror.xml index 8b47ab915fb4..b714767e7d83 100644 --- a/packages/SystemUI/res/layout/brightness_mirror.xml +++ b/packages/SystemUI/res/layout/brightness_mirror.xml @@ -16,6 +16,7 @@ --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:theme="@style/Theme.SystemUI.QuickSettings" android:id="@+id/brightness_mirror" android:layout_width="@dimen/qs_panel_width" android:layout_height="@dimen/brightness_mirror_height" diff --git a/packages/SystemUI/res/layout/privacy_dialog.xml b/packages/SystemUI/res/layout/privacy_dialog.xml index 4d77a0d75689..720ae8dbf4d8 100644 --- a/packages/SystemUI/res/layout/privacy_dialog.xml +++ b/packages/SystemUI/res/layout/privacy_dialog.xml @@ -28,7 +28,7 @@ android:paddingRight="@dimen/ongoing_appops_dialog_side_padding" android:paddingBottom="12dp" android:paddingTop="8dp" - android:background="@drawable/privacy_dialog_bg" + android:background="@drawable/qs_dialog_bg" /> <!-- 12dp padding bottom so there's 20dp total under the icon --> <!-- 8dp padding top, as there's 4dp margin in each row -->
\ No newline at end of file diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml index 471f36b3849e..d7a610300fe8 100644 --- a/packages/SystemUI/res/values-night/colors.xml +++ b/packages/SystemUI/res/values-night/colors.xml @@ -47,9 +47,6 @@ <color name="notification_section_clear_all_btn_color">@color/GM2_grey_500</color> <color name="notification_channel_dialog_separator">@color/GM2_grey_700</color> - <!-- The color of the background in the bottom part of QSCustomizer --> - <color name="qs_customize_decoration">@color/GM2_grey_900</color> - <!-- The color of the background in the separated list of the Global Actions menu --> <color name="global_actions_separated_background">@color/GM2_grey_900</color> diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml index 886f98e55d67..e4bdbf3f0727 100644 --- a/packages/SystemUI/res/values/attrs.xml +++ b/packages/SystemUI/res/values/attrs.xml @@ -126,6 +126,8 @@ <attr name="wallpaperTextColorSecondary" format="reference|color" /> <attr name="wallpaperTextColorAccent" format="reference|color" /> <attr name="backgroundProtectedStyle" format="reference" /> + <attr name="offStateColor" format="reference|color" /> + <attr name="underSurfaceColor" format="reference|color" /> <declare-styleable name="SmartReplyView"> <attr name="spacing" format="dimension" /> diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index bc7fcde4ae5d..a807d4f95a0d 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -35,7 +35,6 @@ <color name="status_bar_clock_color">#FFFFFFFF</color> <color name="qs_user_detail_icon_muted">#FFFFFFFF</color> <!-- not so muted after all --> <color name="qs_tile_disabled_color">#9E9E9E</color> <!-- 38% black --> - <color name="qs_customize_decoration">@color/GM2_grey_300</color> <color name="qs_footer_action_border">#2E312C</color> <!-- The color of the background in the separated list of the Global Actions menu --> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 237edf8c973b..b08aa74ffee8 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -1213,8 +1213,6 @@ <!-- Radius of Ongoing App Ops chip corners --> <dimen name="ongoing_appops_chip_bg_corner_radius">16dp</dimen> - <dimen name="ongoing_appops_dialog_bg_corner_radius">@dimen/notification_corner_radius</dimen> - <dimen name="ongoing_appops_dialog_side_margins">@dimen/notification_shade_content_margin_horizontal</dimen> <dimen name="ongoing_appops_dialog_circle_size">32dp</dimen> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index ba07829d02fc..ce8c0c2897b8 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -382,6 +382,17 @@ <item name="android:colorError">@*android:color/error_color_material_dark</item> <item name="android:windowIsFloating">true</item> <item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item> + <item name="offStateColor">@android:color/system_neutral1_800</item> + <item name="underSurfaceColor">@android:color/system_neutral1_1000</item> + <item name="android:colorBackground">@android:color/system_neutral1_900</item> + </style> + + <style name="Theme.SystemUI.QuickSettings.BrightnessDialog" parent="@android:style/Theme.DeviceDefault.Dialog"> + <item name="android:dialogCornerRadius">8dp</item> + </style> + + <style name="Theme.SystemUI.QuickSettings.Dialog" parent="@android:style/Theme.DeviceDefault.Dialog"> + <item name="android:dialogCornerRadius">@dimen/notification_corner_radius</item> </style> <!-- Overridden by values-television/styles.xml with tv-specific settings --> @@ -588,10 +599,6 @@ <item name="android:elevation">10dp</item> </style> - <style name="Theme.SystemUI.QuickSettings.Edit"> - <item name="android:colorBackground">?android:attr/colorSecondary</item> - </style> - <style name="MediaPlayer.Button" parent="@android:style/Widget.Material.Button.Borderless.Small"> <item name="android:background">@drawable/qs_media_light_source</item> <item name="android:tint">?android:attr/textColorPrimary</item> @@ -628,7 +635,12 @@ </style> <!-- Privacy dialog --> - <style name="PrivacyDialog" parent="ScreenRecord"> + <style name="PrivacyDialog" parent="Theme.SystemUI.QuickSettings.Dialog"> + <item name="android:windowIsTranslucent">true</item> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:windowIsFloating">true</item> + <item name="android:backgroundDimEnabled">true</item> + <item name="android:windowCloseOnTouchOutside">true</item> <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item> </style> diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooter.java b/packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooter.java index 2c5dbcd51f21..670475fac5ef 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooter.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooter.java @@ -36,7 +36,6 @@ import android.text.SpannableStringBuilder; import android.text.method.LinkMovementMethod; import android.text.style.ClickableSpan; import android.util.Log; -import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; @@ -89,7 +88,7 @@ class QSSecurityFooter implements OnClickListener, DialogInterface.OnClickListen private Drawable mPrimaryFooterIconDrawable; @Inject - QSSecurityFooter(@Named(QS_SECURITY_FOOTER_VIEW) View rootView, Context context, + QSSecurityFooter(@Named(QS_SECURITY_FOOTER_VIEW) View rootView, UserTracker userTracker, @Main Handler mainHandler, ActivityStarter activityStarter, SecurityController securityController, @Background Looper bgLooper) { mRootView = rootView; @@ -98,7 +97,7 @@ class QSSecurityFooter implements OnClickListener, DialogInterface.OnClickListen mFooterIcon = mRootView.findViewById(R.id.footer_icon); mPrimaryFooterIcon = mRootView.findViewById(R.id.primary_footer_icon); mFooterIconId = R.drawable.ic_info_outline; - mContext = context; + mContext = rootView.getContext(); mMainHandler = mainHandler; mActivityStarter = activityStarter; mSecurityController = securityController; @@ -308,7 +307,7 @@ class QSSecurityFooter implements OnClickListener, DialogInterface.OnClickListen } private void createDialog() { - mDialog = new SystemUIDialog(mContext); + mDialog = new SystemUIDialog(mContext, 0); // Use mContext theme mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); mDialog.setButton(DialogInterface.BUTTON_POSITIVE, getPositiveButton(), this); mDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getNegativeButton(), this); @@ -344,8 +343,7 @@ class QSSecurityFooter implements OnClickListener, DialogInterface.OnClickListen final String vpnNameWorkProfile = mSecurityController.getWorkProfileVpnName(); - View dialogView = LayoutInflater.from( - new ContextThemeWrapper(mContext, R.style.Theme_SystemUI_Dialog)) + View dialogView = LayoutInflater.from(mContext) .inflate(R.layout.quick_settings_footer_dialog, null, false); // device management section @@ -420,8 +418,7 @@ class QSSecurityFooter implements OnClickListener, DialogInterface.OnClickListen } private View createParentalControlsDialogView() { - View dialogView = LayoutInflater.from( - new ContextThemeWrapper(mContext, R.style.Theme_SystemUI_Dialog)) + View dialogView = LayoutInflater.from(mContext) .inflate(R.layout.quick_settings_footer_dialog_parental_controls, null, false); DeviceAdminInfo info = mSecurityController.getDeviceAdminInfo(); diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java index 6f789d3c8541..30a08c6f1b66 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java @@ -22,7 +22,6 @@ import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.util.TypedValue; -import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.Menu; import android.view.View; @@ -63,7 +62,7 @@ public class QSCustomizer extends LinearLayout { private boolean mIsShowingNavBackdrop; public QSCustomizer(Context context, AttributeSet attrs) { - super(new ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings_Edit), attrs); + super(context, attrs); LayoutInflater.from(getContext()).inflate(R.layout.qs_customize_panel_content, this); mClipper = new QSDetailClipper(findViewById(R.id.customize_container)); diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java index 08aa599d34b7..006b23098622 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java @@ -52,6 +52,7 @@ import com.android.systemui.qs.customize.TileAdapter.Holder; import com.android.systemui.qs.customize.TileQueryHelper.TileInfo; import com.android.systemui.qs.customize.TileQueryHelper.TileStateListener; import com.android.systemui.qs.dagger.QSScope; +import com.android.systemui.qs.dagger.QSThemedContext; import com.android.systemui.qs.external.CustomTile; import com.android.systemui.qs.tileimpl.QSIconViewImpl; import com.android.systemui.qs.tileimpl.QSTileView; @@ -89,7 +90,7 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta private final Handler mHandler = new Handler(); private final List<TileInfo> mTiles = new ArrayList<>(); private final ItemTouchHelper mItemTouchHelper; - private final ItemDecoration mDecoration; + private ItemDecoration mDecoration; private final MarginTileDecoration mMarginDecoration; private final int mMinNumTiles; private final QSTileHost mHost; @@ -112,8 +113,12 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta private final boolean mUseHorizontalTiles; @Inject - public TileAdapter(Context context, QSTileHost qsHost, UiEventLogger uiEventLogger, - @Named(QS_LABELS_FLAG) boolean useHorizontalTiles) { + public TileAdapter( + @QSThemedContext Context context, + QSTileHost qsHost, + UiEventLogger uiEventLogger, + @Named(QS_LABELS_FLAG) boolean useHorizontalTiles + ) { mContext = context; mHost = qsHost; mUiEventLogger = uiEventLogger; diff --git a/packages/SystemUI/src/com/android/systemui/qs/dagger/QSFragmentModule.java b/packages/SystemUI/src/com/android/systemui/qs/dagger/QSFragmentModule.java index 2363aa455cce..3a5adce51d0d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/dagger/QSFragmentModule.java +++ b/packages/SystemUI/src/com/android/systemui/qs/dagger/QSFragmentModule.java @@ -49,6 +49,22 @@ public interface QSFragmentModule { String QS_SECURITY_FOOTER_VIEW = "qs_security_footer"; String QS_USING_MEDIA_PLAYER = "qs_using_media_player"; + /** + * Provide a context themed using the QS theme + */ + @Provides + @QSThemedContext + static Context provideThemedContext(@RootView View view) { + return view.getContext(); + } + + /** */ + @Provides + @QSThemedContext + static LayoutInflater provideThemedLayoutInflater(@QSThemedContext Context context) { + return LayoutInflater.from(context); + } + /** */ @Provides @RootView @@ -109,7 +125,10 @@ public interface QSFragmentModule { @Provides @QSScope @Named(QS_SECURITY_FOOTER_VIEW) - static View providesQSSecurityFooterView(LayoutInflater layoutInflater, QSPanel qsPanel) { + static View providesQSSecurityFooterView( + @QSThemedContext LayoutInflater layoutInflater, + QSPanel qsPanel + ) { return layoutInflater.inflate(R.layout.quick_settings_footer, qsPanel, false); } diff --git a/packages/SystemUI/src/com/android/systemui/qs/dagger/QSThemedContext.java b/packages/SystemUI/src/com/android/systemui/qs/dagger/QSThemedContext.java new file mode 100644 index 000000000000..a878d4c60f88 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/qs/dagger/QSThemedContext.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.qs.dagger; + +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; + +import javax.inject.Qualifier; + +/** + * Annotation for themed context in QS + */ +@Documented +@Retention(RUNTIME) +@Qualifier +public @interface QSThemedContext {} diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java index abe321979a1a..7e72f1a18e41 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java @@ -72,7 +72,6 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { protected final ImageView mBg; private final int mColorActive; private final int mColorInactive; - private final int mColorDisabled; private int mCircleColor; private int mBgSize; @@ -131,10 +130,9 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); setBackground(mTileBackground); - mColorActive = Utils.getColorAttrDefaultColor(context, android.R.attr.colorAccent); - mColorDisabled = Utils.getDisabled(context, - Utils.getColorAttrDefaultColor(context, android.R.attr.colorControlActivated)); - mColorInactive = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondary); + mColorActive = Utils.getColorAttrDefaultColor(context, + com.android.internal.R.attr.colorAccentPrimary); + mColorInactive = Utils.getColorAttrDefaultColor(context, R.attr.offStateColor); setPadding(0, 0, 0, 0); setClipChildren(false); @@ -324,7 +322,7 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { return mColorActive; case Tile.STATE_INACTIVE: case Tile.STATE_UNAVAILABLE: - return mColorDisabled; + return mColorInactive; default: Log.e(TAG, "Invalid state " + state); return 0; diff --git a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessDialog.java b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessDialog.java index 1961bfc9ee27..3ba46460be43 100644 --- a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessDialog.java +++ b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessDialog.java @@ -25,6 +25,7 @@ import android.view.WindowManager; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; +import com.android.systemui.R; import com.android.systemui.broadcast.BroadcastDispatcher; import javax.inject.Inject; @@ -61,10 +62,10 @@ public class BrightnessDialog extends Activity { window.setLayout( WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT); - BrightnessSlider controller = mToggleSliderFactory.create(this, null); controller.init(); setContentView(controller.getRootView()); + controller.getRootView().setBackgroundResource(R.drawable.brightness_mirror_background); mBrightnessController = new BrightnessController(this, controller, mBroadcastDispatcher); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSSecurityFooterTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSSecurityFooterTest.java index e4b95af1af04..4ee639b6928f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSSecurityFooterTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSSecurityFooterTest.java @@ -102,7 +102,7 @@ public class QSSecurityFooterTest extends SysuiTestCase { mRootView = (ViewGroup) new LayoutInflaterBuilder(mContext) .replace("ImageView", TestableImageView.class) .build().inflate(R.layout.quick_settings_footer, null, false); - mFooter = new QSSecurityFooter(mRootView, mContext, mUserTracker, new Handler(looper), + mFooter = new QSSecurityFooter(mRootView, mUserTracker, new Handler(looper), mActivityStarter, mSecurityController, looper); mFooterText = mRootView.findViewById(R.id.footer_text); mFooterIcon = mRootView.findViewById(R.id.footer_icon); |