Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c23cde4e authored by Colin Cross's avatar Colin Cross
Browse files

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
parent a8f8a0a1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@ android_library {
        "res-keyguard",
        "res",
    ],
    use_resource_processor: true,
    static_libs: [
        "WifiTrackerLib",
        "WindowManager-Shell",
@@ -532,6 +533,7 @@ android_app {
    ],
    resource_dirs: [],

    use_resource_processor: true,
    platform_apis: true,
    system_ext_specific: true,
    certificate: "platform",
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ import android.widget.FrameLayout
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
+7 −3
Original line number Diff line number Diff line
@@ -66,9 +66,12 @@ public class KeyguardClockSwitch extends RelativeLayout {
    /** 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 @@ public class KeyguardClockSwitch extends RelativeLayout {
    /** 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(),
+4 −2
Original line number Diff line number Diff line
@@ -229,7 +229,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
        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 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
        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();
+2 −1
Original line number Diff line number Diff line
@@ -1167,7 +1167,8 @@ public class KeyguardSecurityContainer extends ConstraintLayout {
                    }
                    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));
Loading