Loading packages/SystemUI/res/layout/qs_panel.xml +0 −19 Original line number Diff line number Diff line Loading @@ -29,25 +29,6 @@ android:elevation="4dp" android:background="@drawable/qs_background_primary" /> <!-- Black part behind the status bar --> <View android:id="@+id/quick_settings_status_bar_background" android:layout_width="match_parent" android:layout_height="@*android:dimen/quick_qs_offset_height" android:clipToPadding="false" android:clipChildren="false" android:background="#ff000000" /> <!-- Gradient view behind QS --> <View android:id="@+id/quick_settings_gradient_view" android:layout_width="match_parent" android:layout_height="126dp" android:layout_marginTop="@*android:dimen/quick_qs_offset_height" android:clipToPadding="false" android:clipChildren="false" android:background="@drawable/qs_bg_gradient" /> <com.android.systemui.qs.NonInterceptingScrollView android:id="@+id/expanded_qs_scroll_view" android:layout_width="match_parent" Loading packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml +1 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,7 @@ android:paddingStart="@dimen/status_bar_left_clock_starting_padding" android:paddingEnd="@dimen/status_bar_left_clock_end_padding" android:singleLine="true" android:textAppearance="@style/TextAppearance.StatusBar.Clock" systemui:showDark="false" /> android:textAppearance="@style/TextAppearance.StatusBar.Clock" /> </LinearLayout> <android.widget.Space Loading packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +1 −18 Original line number Diff line number Diff line Loading @@ -65,8 +65,6 @@ public class QSContainerImpl extends FrameLayout { private View mQSPanelContainer; private View mBackground; private View mBackgroundGradient; private View mStatusBarBackground; private int mSideMargins; private boolean mQsDisabled; Loading @@ -86,8 +84,6 @@ public class QSContainerImpl extends FrameLayout { mQSCustomizer = findViewById(R.id.qs_customize); mDragHandle = findViewById(R.id.qs_drag_handle_view); mBackground = findViewById(R.id.quick_settings_background); mStatusBarBackground = findViewById(R.id.quick_settings_status_bar_background); mBackgroundGradient = findViewById(R.id.quick_settings_gradient_view); mHeader.getHeaderQsPanel().setMediaVisibilityChangedListener((visible) -> { if (mHeader.getHeaderQsPanel().isShown()) { mAnimateBottomOnNextLayout = true; Loading Loading @@ -117,7 +113,6 @@ public class QSContainerImpl extends FrameLayout { @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); setBackgroundGradientVisibility(newConfig); mSizePoint.set(0, 0); // Will be retrieved on next measure pass. } Loading Loading @@ -186,7 +181,6 @@ public class QSContainerImpl extends FrameLayout { final boolean disabled = (state2 & DISABLE2_QUICK_SETTINGS) != 0; if (disabled == mQsDisabled) return; mQsDisabled = disabled; setBackgroundGradientVisibility(getResources().getConfiguration()); mBackground.setVisibility(mQsDisabled ? View.GONE : View.VISIBLE); } Loading Loading @@ -252,16 +246,6 @@ public class QSContainerImpl extends FrameLayout { + mHeader.getHeight(); } private void setBackgroundGradientVisibility(Configuration newConfig) { if (newConfig.orientation == ORIENTATION_LANDSCAPE) { mBackgroundGradient.setVisibility(View.INVISIBLE); mStatusBarBackground.setVisibility(View.INVISIBLE); } else { mBackgroundGradient.setVisibility(mQsDisabled ? View.INVISIBLE : View.VISIBLE); mStatusBarBackground.setVisibility(View.VISIBLE); } } public void setExpansion(float expansion) { mQsExpansion = expansion; mDragHandle.setAlpha(1.0f - expansion); Loading @@ -271,8 +255,7 @@ public class QSContainerImpl extends FrameLayout { private void updatePaddingsAndMargins(QSPanelController qsPanelController) { for (int i = 0; i < getChildCount(); i++) { View view = getChildAt(i); if (view == mStatusBarBackground || view == mBackgroundGradient || view == mQSCustomizer) { if (view == mQSCustomizer) { // Some views are always full width or have dependent padding continue; } Loading packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +7 −11 Original line number Diff line number Diff line Loading @@ -137,10 +137,6 @@ public class QuickStatusBarHeader extends RelativeLayout implements LifecycleOwn updateResources(); Rect tintArea = new Rect(0, 0, 0, 0); // Set light text on the header icons because they will always be on a black background applyDarkness(R.id.clock, tintArea, 0, DarkIconDispatcher.DEFAULT_ICON_TINT); mClockView = findViewById(R.id.clock); mSpace = findViewById(R.id.space); Loading @@ -158,7 +154,14 @@ public class QuickStatusBarHeader extends RelativeLayout implements LifecycleOwn android.R.attr.colorForeground); float intensity = getColorIntensity(colorForeground); int fillColor = mDualToneHandler.getSingleColor(intensity); Rect tintArea = new Rect(0, 0, 0, 0); mBatteryRemainingIcon.onDarkChanged(tintArea, intensity, fillColor); // The quick settings status bar clock depends on the color of the background scrim and // can be different from the status bar clock color. mClockView.setTextColor( Utils.getColorAttrDefaultColor(mContext, R.attr.wallpaperTextColor)); } void onAttach(TintedIconManager iconManager) { Loading Loading @@ -231,13 +234,6 @@ public class QuickStatusBarHeader extends RelativeLayout implements LifecycleOwn !Objects.equals(originalAlarmText, mNextAlarmTextView.getText()); } private void applyDarkness(int id, Rect tintArea, float intensity, int color) { View v = findViewById(id); if (v instanceof DarkReceiver) { ((DarkReceiver) v).onDarkChanged(tintArea, intensity, color); } } @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Loading packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java +14 −1 Original line number Diff line number Diff line Loading @@ -34,8 +34,10 @@ import androidx.lifecycle.Lifecycle; import androidx.lifecycle.LifecycleOwner; import androidx.lifecycle.LifecycleRegistry; import com.android.internal.colorextraction.ColorExtractor; import com.android.internal.logging.UiEventLogger; import com.android.systemui.R; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.demomode.DemoMode; import com.android.systemui.demomode.DemoModeController; import com.android.systemui.plugins.ActivityStarter; Loading Loading @@ -99,6 +101,9 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader private boolean mMicCameraIndicatorsEnabled; private boolean mLocationIndicatorsEnabled; private boolean mPrivacyChipLogged; private SysuiColorExtractor mColorExtractor; private ColorExtractor.OnColorsChangedListener mOnColorsChangedListener; private int mRingerMode = AudioManager.RINGER_MODE_NORMAL; private final ZenModeController.Callback mZenModeControllerCallback = new Callback() { Loading Loading @@ -216,7 +221,8 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader CommandQueue commandQueue, DemoModeController demoModeController, UserTracker userTracker, QuickQSPanelController quickQSPanelController, QSCarrierGroupController.Builder qsCarrierGroupControllerBuilder, PrivacyLogger privacyLogger) { PrivacyLogger privacyLogger, SysuiColorExtractor colorExtractor) { super(view); mZenModeController = zenModeController; mNextAlarmController = nextAlarmController; Loading Loading @@ -246,6 +252,12 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader mIconManager = new StatusBarIconController.TintedIconManager(mIconContainer, mCommandQueue); mDemoModeReceiver = new ClockDemoModeReceiver(mClockView); mColorExtractor = colorExtractor; mOnColorsChangedListener = (extractor, which) -> { final boolean lightTheme = mColorExtractor.getNeutralColors().supportsDarkText(); mClockView.onColorsChanged(lightTheme); }; mColorExtractor.addOnColorsChangedListener(mOnColorsChangedListener); } @Override Loading Loading @@ -281,6 +293,7 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader protected void onViewDetached() { mRingerModeTracker.getRingerModeInternal().removeObservers(mLifecycleOwner); mClockView.setOnClickListener(null); mColorExtractor.removeOnColorsChangedListener(mOnColorsChangedListener); mNextAlarmContainer.setOnClickListener(null); mRingerContainer.setOnClickListener(null); mPrivacyChip.setOnClickListener(null); Loading Loading
packages/SystemUI/res/layout/qs_panel.xml +0 −19 Original line number Diff line number Diff line Loading @@ -29,25 +29,6 @@ android:elevation="4dp" android:background="@drawable/qs_background_primary" /> <!-- Black part behind the status bar --> <View android:id="@+id/quick_settings_status_bar_background" android:layout_width="match_parent" android:layout_height="@*android:dimen/quick_qs_offset_height" android:clipToPadding="false" android:clipChildren="false" android:background="#ff000000" /> <!-- Gradient view behind QS --> <View android:id="@+id/quick_settings_gradient_view" android:layout_width="match_parent" android:layout_height="126dp" android:layout_marginTop="@*android:dimen/quick_qs_offset_height" android:clipToPadding="false" android:clipChildren="false" android:background="@drawable/qs_bg_gradient" /> <com.android.systemui.qs.NonInterceptingScrollView android:id="@+id/expanded_qs_scroll_view" android:layout_width="match_parent" Loading
packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml +1 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,7 @@ android:paddingStart="@dimen/status_bar_left_clock_starting_padding" android:paddingEnd="@dimen/status_bar_left_clock_end_padding" android:singleLine="true" android:textAppearance="@style/TextAppearance.StatusBar.Clock" systemui:showDark="false" /> android:textAppearance="@style/TextAppearance.StatusBar.Clock" /> </LinearLayout> <android.widget.Space Loading
packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +1 −18 Original line number Diff line number Diff line Loading @@ -65,8 +65,6 @@ public class QSContainerImpl extends FrameLayout { private View mQSPanelContainer; private View mBackground; private View mBackgroundGradient; private View mStatusBarBackground; private int mSideMargins; private boolean mQsDisabled; Loading @@ -86,8 +84,6 @@ public class QSContainerImpl extends FrameLayout { mQSCustomizer = findViewById(R.id.qs_customize); mDragHandle = findViewById(R.id.qs_drag_handle_view); mBackground = findViewById(R.id.quick_settings_background); mStatusBarBackground = findViewById(R.id.quick_settings_status_bar_background); mBackgroundGradient = findViewById(R.id.quick_settings_gradient_view); mHeader.getHeaderQsPanel().setMediaVisibilityChangedListener((visible) -> { if (mHeader.getHeaderQsPanel().isShown()) { mAnimateBottomOnNextLayout = true; Loading Loading @@ -117,7 +113,6 @@ public class QSContainerImpl extends FrameLayout { @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); setBackgroundGradientVisibility(newConfig); mSizePoint.set(0, 0); // Will be retrieved on next measure pass. } Loading Loading @@ -186,7 +181,6 @@ public class QSContainerImpl extends FrameLayout { final boolean disabled = (state2 & DISABLE2_QUICK_SETTINGS) != 0; if (disabled == mQsDisabled) return; mQsDisabled = disabled; setBackgroundGradientVisibility(getResources().getConfiguration()); mBackground.setVisibility(mQsDisabled ? View.GONE : View.VISIBLE); } Loading Loading @@ -252,16 +246,6 @@ public class QSContainerImpl extends FrameLayout { + mHeader.getHeight(); } private void setBackgroundGradientVisibility(Configuration newConfig) { if (newConfig.orientation == ORIENTATION_LANDSCAPE) { mBackgroundGradient.setVisibility(View.INVISIBLE); mStatusBarBackground.setVisibility(View.INVISIBLE); } else { mBackgroundGradient.setVisibility(mQsDisabled ? View.INVISIBLE : View.VISIBLE); mStatusBarBackground.setVisibility(View.VISIBLE); } } public void setExpansion(float expansion) { mQsExpansion = expansion; mDragHandle.setAlpha(1.0f - expansion); Loading @@ -271,8 +255,7 @@ public class QSContainerImpl extends FrameLayout { private void updatePaddingsAndMargins(QSPanelController qsPanelController) { for (int i = 0; i < getChildCount(); i++) { View view = getChildAt(i); if (view == mStatusBarBackground || view == mBackgroundGradient || view == mQSCustomizer) { if (view == mQSCustomizer) { // Some views are always full width or have dependent padding continue; } Loading
packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +7 −11 Original line number Diff line number Diff line Loading @@ -137,10 +137,6 @@ public class QuickStatusBarHeader extends RelativeLayout implements LifecycleOwn updateResources(); Rect tintArea = new Rect(0, 0, 0, 0); // Set light text on the header icons because they will always be on a black background applyDarkness(R.id.clock, tintArea, 0, DarkIconDispatcher.DEFAULT_ICON_TINT); mClockView = findViewById(R.id.clock); mSpace = findViewById(R.id.space); Loading @@ -158,7 +154,14 @@ public class QuickStatusBarHeader extends RelativeLayout implements LifecycleOwn android.R.attr.colorForeground); float intensity = getColorIntensity(colorForeground); int fillColor = mDualToneHandler.getSingleColor(intensity); Rect tintArea = new Rect(0, 0, 0, 0); mBatteryRemainingIcon.onDarkChanged(tintArea, intensity, fillColor); // The quick settings status bar clock depends on the color of the background scrim and // can be different from the status bar clock color. mClockView.setTextColor( Utils.getColorAttrDefaultColor(mContext, R.attr.wallpaperTextColor)); } void onAttach(TintedIconManager iconManager) { Loading Loading @@ -231,13 +234,6 @@ public class QuickStatusBarHeader extends RelativeLayout implements LifecycleOwn !Objects.equals(originalAlarmText, mNextAlarmTextView.getText()); } private void applyDarkness(int id, Rect tintArea, float intensity, int color) { View v = findViewById(id); if (v instanceof DarkReceiver) { ((DarkReceiver) v).onDarkChanged(tintArea, intensity, color); } } @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Loading
packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java +14 −1 Original line number Diff line number Diff line Loading @@ -34,8 +34,10 @@ import androidx.lifecycle.Lifecycle; import androidx.lifecycle.LifecycleOwner; import androidx.lifecycle.LifecycleRegistry; import com.android.internal.colorextraction.ColorExtractor; import com.android.internal.logging.UiEventLogger; import com.android.systemui.R; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.demomode.DemoMode; import com.android.systemui.demomode.DemoModeController; import com.android.systemui.plugins.ActivityStarter; Loading Loading @@ -99,6 +101,9 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader private boolean mMicCameraIndicatorsEnabled; private boolean mLocationIndicatorsEnabled; private boolean mPrivacyChipLogged; private SysuiColorExtractor mColorExtractor; private ColorExtractor.OnColorsChangedListener mOnColorsChangedListener; private int mRingerMode = AudioManager.RINGER_MODE_NORMAL; private final ZenModeController.Callback mZenModeControllerCallback = new Callback() { Loading Loading @@ -216,7 +221,8 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader CommandQueue commandQueue, DemoModeController demoModeController, UserTracker userTracker, QuickQSPanelController quickQSPanelController, QSCarrierGroupController.Builder qsCarrierGroupControllerBuilder, PrivacyLogger privacyLogger) { PrivacyLogger privacyLogger, SysuiColorExtractor colorExtractor) { super(view); mZenModeController = zenModeController; mNextAlarmController = nextAlarmController; Loading Loading @@ -246,6 +252,12 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader mIconManager = new StatusBarIconController.TintedIconManager(mIconContainer, mCommandQueue); mDemoModeReceiver = new ClockDemoModeReceiver(mClockView); mColorExtractor = colorExtractor; mOnColorsChangedListener = (extractor, which) -> { final boolean lightTheme = mColorExtractor.getNeutralColors().supportsDarkText(); mClockView.onColorsChanged(lightTheme); }; mColorExtractor.addOnColorsChangedListener(mOnColorsChangedListener); } @Override Loading Loading @@ -281,6 +293,7 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader protected void onViewDetached() { mRingerModeTracker.getRingerModeInternal().removeObservers(mLifecycleOwner); mClockView.setOnClickListener(null); mColorExtractor.removeOnColorsChangedListener(mOnColorsChangedListener); mNextAlarmContainer.setOnClickListener(null); mRingerContainer.setOnClickListener(null); mPrivacyChip.setOnClickListener(null); Loading