Fix references to resources using incorrect packages in SystemUI-core
Using ResourceProcessorBusyBox to speed up resource processing
reuires using the correct package to reference resources from
android_library dependencies. Fix them, and set use_resource_processor: true.
This saves around 47 seconds when compiling the SystemUI module, and
a similar amount when compiling the SystemUI-core module.
Bug: 284023594
Test: m SystemUI
Change-Id: I8f825ef549a5e0bd67e10d260ecdc3353a526fdb
Merged-In: I8f825ef549a5e0bd67e10d260ecdc3353a526fdb
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index 12f9af3..712b737 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -154,6 +154,7 @@
"res-keyguard",
"res",
],
+ use_resource_processor: true,
static_libs: [
"WifiTrackerLib",
"WindowManager-Shell",
@@ -532,6 +533,7 @@
],
resource_dirs: [],
+ use_resource_processor: true,
platform_apis: true,
system_ext_specific: true,
certificate: "platform",
diff --git a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
index 4a6e53d..0b9e6e9 100644
--- a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
+++ b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
@@ -31,7 +31,7 @@
import androidx.annotation.VisibleForTesting
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.repeatOnLifecycle
-import com.android.systemui.R
+import com.android.systemui.customization.R
import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
index 4793b4f..00256c4 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
@@ -66,9 +66,12 @@
/** Returns a region for the large clock to position itself, based on the given parent. */
public static Rect getLargeClockRegion(ViewGroup parent) {
int largeClockTopMargin = parent.getResources()
- .getDimensionPixelSize(R.dimen.keyguard_large_clock_top_margin);
+ .getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.keyguard_large_clock_top_margin);
int targetHeight = parent.getResources()
- .getDimensionPixelSize(R.dimen.large_clock_text_size) * 2;
+ .getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.large_clock_text_size)
+ * 2;
int top = parent.getHeight() / 2 - targetHeight / 2
+ largeClockTopMargin / 2;
return new Rect(
@@ -81,7 +84,8 @@
/** Returns a region for the small clock to position itself, based on the given parent. */
public static Rect getSmallClockRegion(ViewGroup parent) {
int targetHeight = parent.getResources()
- .getDimensionPixelSize(R.dimen.small_clock_text_size);
+ .getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.small_clock_text_size);
return new Rect(
parent.getLeft(),
parent.getTop(),
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
index 16eb21d..40ced67 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
@@ -229,7 +229,8 @@
mKeyguardSmallClockTopMargin =
mView.getResources().getDimensionPixelSize(R.dimen.keyguard_clock_top_margin);
mKeyguardLargeClockTopMargin =
- mView.getResources().getDimensionPixelSize(R.dimen.keyguard_large_clock_top_margin);
+ mView.getResources().getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.keyguard_large_clock_top_margin);
mKeyguardDateWeatherViewInvisibility =
mView.getResources().getInteger(R.integer.keyguard_date_weather_view_invisibility);
@@ -365,7 +366,8 @@
mKeyguardSmallClockTopMargin =
mView.getResources().getDimensionPixelSize(R.dimen.keyguard_clock_top_margin);
mKeyguardLargeClockTopMargin =
- mView.getResources().getDimensionPixelSize(R.dimen.keyguard_large_clock_top_margin);
+ mView.getResources().getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.keyguard_large_clock_top_margin);
mKeyguardDateWeatherViewInvisibility =
mView.getResources().getInteger(R.integer.keyguard_date_weather_view_invisibility);
mView.updateClockTargetRegions();
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
index 42a4e72..61addab 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -1167,7 +1167,8 @@
}
drawable.setTint(iconColor);
- Drawable bg = context.getDrawable(R.drawable.user_avatar_bg);
+ Drawable bg = context.getDrawable(
+ com.android.settingslib.R.drawable.user_avatar_bg);
bg.setTintBlendMode(BlendMode.DST);
bg.setTint(Utils.getColorAttrDefaultColor(context,
com.android.internal.R.attr.colorSurfaceVariant));
diff --git a/packages/SystemUI/src/com/android/systemui/GuestSessionNotification.java b/packages/SystemUI/src/com/android/systemui/GuestSessionNotification.java
index fa9a83e..7a6b1c3 100644
--- a/packages/SystemUI/src/com/android/systemui/GuestSessionNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/GuestSessionNotification.java
@@ -64,12 +64,15 @@
}
String contentText;
if (userInfo.isEphemeral()) {
- contentText = mContext.getString(R.string.guest_notification_ephemeral);
+ contentText = mContext.getString(
+ com.android.settingslib.R.string.guest_notification_ephemeral);
} else if (isGuestFirstLogin) {
- contentText = mContext.getString(R.string.guest_notification_non_ephemeral);
+ contentText = mContext.getString(
+ com.android.settingslib.R.string.guest_notification_non_ephemeral);
} else {
contentText = mContext.getString(
- R.string.guest_notification_non_ephemeral_non_first_login);
+ com.android.settingslib.R.string
+ .guest_notification_non_ephemeral_non_first_login);
}
final Intent guestExitIntent = new Intent(
@@ -89,7 +92,7 @@
Notification.Builder builder = new Notification.Builder(mContext,
NotificationChannels.ALERTS)
- .setSmallIcon(R.drawable.ic_account_circle)
+ .setSmallIcon(com.android.settingslib.R.drawable.ic_account_circle)
.setContentTitle(mContext.getString(R.string.guest_notification_session_active))
.setContentText(contentText)
.setPriority(Notification.PRIORITY_DEFAULT)
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/DismissAnimationController.java b/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/DismissAnimationController.java
index 225a2f7..b1de127 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/DismissAnimationController.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/DismissAnimationController.java
@@ -24,7 +24,6 @@
import androidx.annotation.NonNull;
import androidx.dynamicanimation.animation.DynamicAnimation;
-import com.android.systemui.R;
import com.android.wm.shell.common.bubbles.DismissView;
import com.android.wm.shell.common.magnetictarget.MagnetizedObject;
@@ -157,9 +156,9 @@
void updateResources() {
final float maxDismissSize = mDismissView.getResources().getDimensionPixelSize(
- R.dimen.dismiss_circle_size);
+ com.android.wm.shell.R.dimen.dismiss_circle_size);
mMinDismissSize = mDismissView.getResources().getDimensionPixelSize(
- R.dimen.dismiss_circle_small);
+ com.android.wm.shell.R.dimen.dismiss_circle_small);
mSizePercent = mMinDismissSize / maxDismissSize;
}
diff --git a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
index 234795f..46fcdbc 100644
--- a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
@@ -106,7 +106,7 @@
TypedArray atts = context.obtainStyledAttributes(attrs, R.styleable.BatteryMeterView,
defStyle, 0);
final int frameColor = atts.getColor(R.styleable.BatteryMeterView_frameColor,
- context.getColor(R.color.meter_background_color));
+ context.getColor(com.android.settingslib.R.color.meter_background_color));
mPercentageStyleId = atts.getResourceId(R.styleable.BatteryMeterView_textAppearance, 0);
mDrawable = new AccessorizedBatteryDrawable(context, frameColor);
atts.recycle();
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt
index 11418e6..063f62e 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt
@@ -446,7 +446,7 @@
for (key in listOf(".blue600", ".blue400")) {
addValueCallback(KeyPath(key, "**"), LottieProperty.COLOR_FILTER) {
PorterDuffColorFilter(
- context.getColor(R.color.settingslib_color_blue400),
+ context.getColor(com.android.settingslib.R.color.settingslib_color_blue400),
PorterDuff.Mode.SRC_ATOP
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/contrast/ContrastDialog.kt b/packages/SystemUI/src/com/android/systemui/contrast/ContrastDialog.kt
index f17d0f3..6b1c85f 100644
--- a/packages/SystemUI/src/com/android/systemui/contrast/ContrastDialog.kt
+++ b/packages/SystemUI/src/com/android/systemui/contrast/ContrastDialog.kt
@@ -61,7 +61,7 @@
)
dismiss()
}
- setPositiveButton(R.string.done) { _, _ -> dismiss() }
+ setPositiveButton(com.android.settingslib.R.string.done) { _, _ -> dismiss() }
super.onCreate(savedInstanceState)
contrastButtons =
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
index 3e6e158..73ea80d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
@@ -129,17 +129,17 @@
if (featureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
keyguardRootViewModel.enablePreviewMode(
initiallySelectedSlotId =
- bundle.getString(
- KeyguardPreviewConstants.KEY_INITIALLY_SELECTED_SLOT_ID,
- ),
+ bundle.getString(
+ KeyguardPreviewConstants.KEY_INITIALLY_SELECTED_SLOT_ID,
+ ),
shouldHighlightSelectedAffordance = shouldHighlightSelectedAffordance,
)
} else {
bottomAreaViewModel.enablePreviewMode(
initiallySelectedSlotId =
- bundle.getString(
- KeyguardPreviewConstants.KEY_INITIALLY_SELECTED_SLOT_ID,
- ),
+ bundle.getString(
+ KeyguardPreviewConstants.KEY_INITIALLY_SELECTED_SLOT_ID,
+ ),
shouldHighlightSelectedAffordance = shouldHighlightSelectedAffordance,
)
}
@@ -276,8 +276,9 @@
val startPadding: Int =
with(context.resources) {
- getDimensionPixelSize(R.dimen.clock_padding_start) +
- getDimensionPixelSize(R.dimen.below_clock_padding_start)
+ getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.clock_padding_start
+ ) + getDimensionPixelSize(R.dimen.below_clock_padding_start)
}
val endPadding: Int =
@@ -309,7 +310,7 @@
false,
) as KeyguardBottomAreaView
bottomAreaView.init(
- viewModel = bottomAreaViewModel,
+ viewModel = bottomAreaViewModel,
)
parentView.addView(
bottomAreaView,
@@ -451,15 +452,21 @@
val layoutParams =
FrameLayout.LayoutParams(
FrameLayout.LayoutParams.WRAP_CONTENT,
- resources.getDimensionPixelSize(R.dimen.small_clock_height)
+ resources.getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.small_clock_height
+ )
)
layoutParams.topMargin =
KeyguardPreviewSmartspaceViewModel.getStatusBarHeight(resources) +
- resources.getDimensionPixelSize(R.dimen.small_clock_padding_top)
+ resources.getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.small_clock_padding_top
+ )
hostView.layoutParams = layoutParams
hostView.setPaddingRelative(
- resources.getDimensionPixelSize(R.dimen.clock_padding_start),
+ resources.getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.clock_padding_start
+ ),
0,
0,
0
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardPreviewSmartspaceViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardPreviewSmartspaceViewModel.kt
index bf51976..63d165d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardPreviewSmartspaceViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardPreviewSmartspaceViewModel.kt
@@ -71,8 +71,12 @@
fun getSmallClockSmartspaceTopPadding(resources: Resources): Int {
return with(resources) {
getStatusBarHeight(this) +
- getDimensionPixelSize(R.dimen.small_clock_padding_top) +
- getDimensionPixelSize(R.dimen.small_clock_height)
+ getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.small_clock_padding_top
+ ) +
+ getDimensionPixelSize(
+ com.android.systemui.customization.R.dimen.small_clock_height
+ )
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/ColorSchemeTransition.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/ColorSchemeTransition.kt
index 2b42604..14d4b68 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/ColorSchemeTransition.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/ColorSchemeTransition.kt
@@ -119,7 +119,7 @@
::AnimatingColorTransition
)
- val bgColor = context.getColor(com.android.systemui.R.color.material_dynamic_secondary95)
+ val bgColor = context.getColor(com.google.android.material.R.color.material_dynamic_secondary95)
val surfaceColor =
animatingColorTransitionFactory(bgColor, ::surfaceFromScheme) { surfaceColor ->
val colorList = ColorStateList.valueOf(surfaceColor)
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/RecentTaskViewHolder.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/RecentTaskViewHolder.kt
index 2d75359..a09935b 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/RecentTaskViewHolder.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/RecentTaskViewHolder.kt
@@ -68,7 +68,9 @@
}
launch {
val label = labelLoader.loadLabel(task.userId, component)
- root.contentDescription = label ?: root.context.getString(R.string.unknown)
+ root.contentDescription =
+ label
+ ?: root.context.getString(com.android.settingslib.R.string.unknown)
}
}
launch {
diff --git a/packages/SystemUI/src/com/android/systemui/people/PeopleStoryIconFactory.java b/packages/SystemUI/src/com/android/systemui/people/PeopleStoryIconFactory.java
index 58e700f..25965fc 100644
--- a/packages/SystemUI/src/com/android/systemui/people/PeopleStoryIconFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/people/PeopleStoryIconFactory.java
@@ -33,7 +33,6 @@
import androidx.core.graphics.drawable.RoundedBitmapDrawable;
import com.android.settingslib.Utils;
-import com.android.systemui.R;
class PeopleStoryIconFactory implements AutoCloseable {
@@ -59,7 +58,8 @@
mIconSize = mDensity * iconSizeDp;
mPackageManager = pm;
mIconDrawableFactory = iconDrawableFactory;
- mImportantConversationColor = mContext.getColor(R.color.important_conversation);
+ mImportantConversationColor = mContext.getColor(
+ com.android.launcher3.icons.R.color.important_conversation);
mAccentColor = Utils.getColorAttr(mContext,
com.android.internal.R.attr.colorAccentPrimaryVariant).getDefaultColor();
}
@@ -224,4 +224,4 @@
@Override
public void close() {
}
-}
\ No newline at end of file
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
index 4c3699c..7c76c1a 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
@@ -180,7 +180,8 @@
private String getSecondaryLabel(boolean isActive, boolean isTransient,
boolean isDataSaverEnabled, int numConnectedDevices, boolean isWifiTetheringAllowed) {
if (!isWifiTetheringAllowed) {
- return mContext.getString(R.string.wifitrackerlib_admin_restricted_network);
+ return mContext.getString(
+ com.android.wifitrackerlib.R.string.wifitrackerlib_admin_restricted_network);
} else if (isTransient) {
return mContext.getString(R.string.quick_settings_hotspot_secondary_label_transient);
} else if (isDataSaverEnabled) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java
index 7b6802f..1657c28 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java
@@ -1414,8 +1414,8 @@
if (shouldShowBubbleButton(entry)) {
// explicitly resolve drawable resource using SystemUI's theme
Drawable d = mContext.getDrawable(entry.isBubble()
- ? R.drawable.bubble_ic_stop_bubble
- : R.drawable.bubble_ic_create_bubble);
+ ? com.android.wm.shell.R.drawable.bubble_ic_stop_bubble
+ : com.android.wm.shell.R.drawable.bubble_ic_create_bubble);
String contentDescription = mContext.getResources().getString(entry.isBubble()
? R.string.notification_conversation_unbubble
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DarkIconDispatcherImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DarkIconDispatcherImpl.java
index c4495ed..1576aa2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DarkIconDispatcherImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DarkIconDispatcherImpl.java
@@ -23,7 +23,6 @@
import android.util.ArrayMap;
import android.widget.ImageView;
-import com.android.systemui.R;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dump.DumpManager;
@@ -62,8 +61,10 @@
Context context,
LightBarTransitionsController.Factory lightBarTransitionsControllerFactory,
DumpManager dumpManager) {
- mDarkModeIconColorSingleTone = context.getColor(R.color.dark_mode_icon_color_single_tone);
- mLightModeIconColorSingleTone = context.getColor(R.color.light_mode_icon_color_single_tone);
+ mDarkModeIconColorSingleTone = context.getColor(
+ com.android.settingslib.R.color.dark_mode_icon_color_single_tone);
+ mLightModeIconColorSingleTone = context.getColor(
+ com.android.settingslib.R.color.light_mode_icon_color_single_tone);
mTransitionsController = lightBarTransitionsControllerFactory.create(this);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index 5c1f824b..117a1a4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -421,8 +421,9 @@
@ColorInt int textColor = Utils.getColorAttrDefaultColor(mContext,
R.attr.wallpaperTextColor);
@ColorInt int iconColor = Utils.getColorStateListDefaultColor(mContext,
- Color.luminance(textColor) < 0.5 ? R.color.dark_mode_icon_color_single_tone :
- R.color.light_mode_icon_color_single_tone);
+ Color.luminance(textColor) < 0.5
+ ? com.android.settingslib.R.color.dark_mode_icon_color_single_tone
+ : com.android.settingslib.R.color.light_mode_icon_color_single_tone);
float intensity = textColor == Color.WHITE ? 0 : 1;
mCarrierLabel.setTextColor(iconColor);
@@ -430,7 +431,7 @@
if (userSwitcherName != null) {
userSwitcherName.setTextColor(Utils.getColorStateListDefaultColor(
mContext,
- R.color.light_mode_icon_color_single_tone));
+ com.android.settingslib.R.color.light_mode_icon_color_single_tone));
}
if (iconManager != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarController.java
index dc5eb0d..c2dd059 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarController.java
@@ -35,7 +35,6 @@
import com.android.internal.colorextraction.ColorExtractor.GradientColors;
import com.android.internal.view.AppearanceRegion;
import com.android.systemui.Dumpable;
-import com.android.systemui.R;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.navigationbar.NavigationModeController;
@@ -122,8 +121,10 @@
NavigationModeController navModeController,
DumpManager dumpManager,
DisplayTracker displayTracker) {
- mDarkIconColor = ctx.getColor(R.color.dark_mode_icon_color_single_tone);
- mLightIconColor = ctx.getColor(R.color.light_mode_icon_color_single_tone);
+ mDarkIconColor = ctx.getColor(
+ com.android.settingslib.R.color.dark_mode_icon_color_single_tone);
+ mLightIconColor = ctx.getColor(
+ com.android.settingslib.R.color.light_mode_icon_color_single_tone);
mStatusBarIconController = (SysuiDarkIconDispatcher) darkIconDispatcher;
mBatteryController = batteryController;
mBatteryController.addCallback(this);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java
index bb22365..baf94fc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java
@@ -427,7 +427,8 @@
// We first look for the background on the dialogContentWithBackground added by
// DialogLaunchAnimator. If it's not there, we use the background of the DecorView.
View viewWithBackground = decorView.findViewByPredicate(
- view -> view.getTag(R.id.tag_dialog_background) != null);
+ view -> view.getTag(
+ com.android.systemui.animation.R.id.tag_dialog_background) != null);
Drawable background = viewWithBackground != null ? viewWithBackground.getBackground()
: decorView.getBackground();
Insets insets = background != null ? background.getOpticalInsets() : Insets.NONE;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardQsUserSwitchController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardQsUserSwitchController.java
index c8ee647..880e0d2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardQsUserSwitchController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardQsUserSwitchController.java
@@ -319,7 +319,7 @@
drawable = new CircleFramedDrawable(mCurrentUser.picture, avatarSize);
}
- Drawable bg = mContext.getDrawable(R.drawable.user_avatar_bg);
+ Drawable bg = mContext.getDrawable(com.android.settingslib.R.drawable.user_avatar_bg);
drawable = new LayerDrawable(new Drawable[]{bg, drawable});
return drawable;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherController.java
index 66b5256..2d04ffa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherController.java
@@ -534,7 +534,7 @@
}
drawable.setTint(mResources.getColor(iconColorRes, mContext.getTheme()));
- Drawable bg = mContext.getDrawable(R.drawable.user_avatar_bg);
+ Drawable bg = mContext.getDrawable(com.android.settingslib.R.drawable.user_avatar_bg);
drawable = new LayerDrawable(new Drawable[]{bg, drawable});
return drawable;
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
index 32ecb67..ecaf792 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
@@ -61,7 +61,7 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setTheme(R.style.Theme_AppCompat_DayNight);
+ setTheme(androidx.appcompat.R.style.Theme_AppCompat_DayNight);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
requestWindowFeature(Window.FEATURE_NO_TITLE);
diff --git a/packages/SystemUI/src/com/android/systemui/user/domain/interactor/UserInteractor.kt b/packages/SystemUI/src/com/android/systemui/user/domain/interactor/UserInteractor.kt
index 4d506f0..a3e648d 100644
--- a/packages/SystemUI/src/com/android/systemui/user/domain/interactor/UserInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/user/domain/interactor/UserInteractor.kt
@@ -776,7 +776,9 @@
userId: Int,
): Drawable {
if (isGuest) {
- return checkNotNull(applicationContext.getDrawable(R.drawable.ic_account_circle))
+ return checkNotNull(
+ applicationContext.getDrawable(com.android.settingslib.R.drawable.ic_account_circle)
+ )
}
// TODO(b/246631653): cache the bitmaps to avoid the background work to fetch them.
diff --git a/packages/SystemUI/src/com/android/systemui/user/legacyhelper/ui/LegacyUserUiHelper.kt b/packages/SystemUI/src/com/android/systemui/user/legacyhelper/ui/LegacyUserUiHelper.kt
index e74232d..00ca92d 100644
--- a/packages/SystemUI/src/com/android/systemui/user/legacyhelper/ui/LegacyUserUiHelper.kt
+++ b/packages/SystemUI/src/com/android/systemui/user/legacyhelper/ui/LegacyUserUiHelper.kt
@@ -42,13 +42,13 @@
isManageUsers: Boolean,
): Int {
return if (isAddUser && isTablet) {
- R.drawable.ic_account_circle_filled
+ com.android.settingslib.R.drawable.ic_account_circle_filled
} else if (isAddUser) {
R.drawable.ic_add
} else if (isGuest) {
- R.drawable.ic_account_circle
+ com.android.settingslib.R.drawable.ic_account_circle
} else if (isAddSupervisedUser) {
- R.drawable.ic_add_supervised_user
+ com.android.settingslib.R.drawable.ic_add_supervised_user
} else if (isManageUsers) {
R.drawable.ic_manage_users
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/user/ui/viewmodel/UserSwitcherViewModel.kt b/packages/SystemUI/src/com/android/systemui/user/ui/viewmodel/UserSwitcherViewModel.kt
index afd72e7..aeed5fc 100644
--- a/packages/SystemUI/src/com/android/systemui/user/ui/viewmodel/UserSwitcherViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/user/ui/viewmodel/UserSwitcherViewModel.kt
@@ -128,7 +128,7 @@
viewKey = model.id,
name =
if (model.isGuest && model.isSelected) {
- Text.Resource(R.string.guest_exit_quick_settings_button)
+ Text.Resource(com.android.settingslib.R.string.guest_exit_quick_settings_button)
} else {
model.name
},
diff --git a/packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java b/packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java
index 2efeda9..904a98b 100644
--- a/packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java
+++ b/packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java
@@ -112,7 +112,7 @@
// priority, so it can be shown in all times.
nm.createNotificationChannel(new NotificationChannel(
TVPIP,
- context.getString(R.string.notification_channel_tv_pip),
+ context.getString(com.android.wm.shell.R.string.notification_channel_tv_pip),
NotificationManager.IMPORTANCE_MAX));
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index 87b2697..5f0f7b8 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -1807,8 +1807,10 @@
if (!ss.dynamic) continue;
mDynamic.put(stream, true);
if (findRow(stream) == null) {
- addRow(stream, R.drawable.ic_volume_remote, R.drawable.ic_volume_remote_mute, true,
- false, true);
+ addRow(stream,
+ com.android.settingslib.R.drawable.ic_volume_remote,
+ com.android.settingslib.R.drawable.ic_volume_remote_mute,
+ true, false, true);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/wallet/ui/DotIndicatorDecoration.java b/packages/SystemUI/src/com/android/systemui/wallet/ui/DotIndicatorDecoration.java
index d2142dc..e5c55b0 100644
--- a/packages/SystemUI/src/com/android/systemui/wallet/ui/DotIndicatorDecoration.java
+++ b/packages/SystemUI/src/com/android/systemui/wallet/ui/DotIndicatorDecoration.java
@@ -48,8 +48,10 @@
R.dimen.card_carousel_dot_selected_radius);
mDotMargin = context.getResources().getDimensionPixelSize(R.dimen.card_carousel_dot_margin);
- mUnselectedColor = context.getColor(R.color.material_dynamic_neutral70);
- mSelectedColor = context.getColor(R.color.material_dynamic_neutral100);
+ mUnselectedColor = context.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral70);
+ mSelectedColor = context.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral100);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/wallet/ui/WalletActivity.java b/packages/SystemUI/src/com/android/systemui/wallet/ui/WalletActivity.java
index d03148c..2491e2b 100644
--- a/packages/SystemUI/src/com/android/systemui/wallet/ui/WalletActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/wallet/ui/WalletActivity.java
@@ -278,7 +278,7 @@
private Drawable getHomeIndicatorDrawable() {
Drawable drawable = getDrawable(R.drawable.ic_close);
- drawable.setTint(getColor(R.color.material_dynamic_neutral70));
+ drawable.setTint(getColor(com.google.android.material.R.color.material_dynamic_neutral70));
return drawable;
}
}