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

Commit 8f63e454 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/27872480',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/27872480', 'googleplex-android-review.googlesource.com/27974756', 'googleplex-android-review.googlesource.com/28447361'] into 24Q3-release.

Change-Id: Iabf65245ad218eb90944bc118013344e49d153a9
parents a3ec1eab 88651600
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -1834,10 +1834,15 @@ public class ResourcesManager {
                    if (r.getImpl() != null) {
                        final ResourcesImpl oldImpl = r.getImpl();
                        // ResourcesImpl constructor will help to append shared library asset paths.
                        if (oldImpl.getAssets().isUpToDate()) {
                            final ResourcesImpl newImpl = new ResourcesImpl(oldImpl.getAssets(),
                                    oldImpl.getMetrics(), oldImpl.getConfiguration(),
                                    oldImpl.getDisplayAdjustments());
                            r.setImpl(newImpl);
                        } else {
                            Slog.w(TAG, "Skip appending shared library asset paths for the "
                                    + "Resource as its assets are not up to date.");
                        }
                    }
                }
            }
+20 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2024 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.
  -->

<selector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <item android:color="?androidprv:attr/materialColorPrimaryContainer" />
</selector>
 No newline at end of file
+1 −2
Original line number Diff line number Diff line
@@ -170,8 +170,7 @@
                        android:layout_height="28dp"
                        android:layout_marginStart="7dp"
                        android:layout_marginEnd="16dp"
                        android:layout_gravity="center_vertical"
                        android:background="?android:attr/textColorSecondary"/>
                        android:layout_gravity="center_vertical"/>

                    <FrameLayout
                        android:layout_width="@dimen/settingslib_switch_track_width"
+21 −2
Original line number Diff line number Diff line
@@ -1386,9 +1386,13 @@
        <item name="android:textColor">?androidprv:attr/materialColorOnSurfaceVariant</item>
    </style>

    <style name="TextAppearance.InternetDialog.Active"/>
    <style name="TextAppearance.InternetDialog.Active">
        <item name="android:textColor">?androidprv:attr/materialColorOnPrimaryContainer</item>
    </style>

    <style name="TextAppearance.InternetDialog.Secondary.Active"/>
    <style name="TextAppearance.InternetDialog.Secondary.Active">
        <item name="android:textColor">?androidprv:attr/materialColorOnPrimaryContainer</item>
    </style>

    <style name="FgsManagerDialogTitle">
        <item name="android:fontFamily">@*android:string/config_bodyFontFamily</item>
@@ -1424,17 +1428,32 @@
        <item name="android:orientation">horizontal</item>
        <item name="android:focusable">true</item>
        <item name="android:clickable">true</item>
        <item name="android:textColor">?androidprv:attr/materialColorOnSurface</item>
    </style>

    <style name="BluetoothTileDialog.Device.Active">
        <item name="android:textColor">?androidprv:attr/materialColorOnPrimaryContainer</item>
    </style>

    <style name="BluetoothTileDialog.DeviceName">
        <item name="android:textSize">14sp</item>
        <item name="android:textAppearance">@style/TextAppearance.Dialog.Title</item>
        <item name="android:textColor">?androidprv:attr/materialColorOnSurface</item>
    </style>

    <style name="BluetoothTileDialog.DeviceSummary">
        <item name="android:ellipsize">end</item>
        <item name="android:maxLines">2</item>
        <item name="android:textAppearance">@style/TextAppearance.Dialog.Body.Message</item>
        <item name="android:textColor">?androidprv:attr/materialColorOnSurfaceVariant</item>
    </style>

    <style name="BluetoothTileDialog.DeviceName.Active">
        <item name="android:textColor">?androidprv:attr/materialColorOnPrimaryContainer</item>
    </style>

    <style name="BluetoothTileDialog.DeviceSummary.Active">
        <item name="android:textColor">?androidprv:attr/materialColorOnPrimaryContainer</item>
    </style>

    <style name="BroadcastDialog">
+33 −6
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import androidx.recyclerview.widget.AsyncListDiffer
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.android.internal.R as InternalR
import com.android.internal.logging.UiEventLogger
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.res.R
@@ -367,6 +368,7 @@ internal constructor(
            private val nameView = view.requireViewById<TextView>(R.id.bluetooth_device_name)
            private val summaryView = view.requireViewById<TextView>(R.id.bluetooth_device_summary)
            private val iconView = view.requireViewById<ImageView>(R.id.bluetooth_device_icon)
            private val iconGear = view.requireViewById<ImageView>(R.id.gear_icon_image)
            private val gearView = view.requireViewById<View>(R.id.gear_icon)

            internal fun bind(
@@ -380,6 +382,36 @@ internal constructor(
                        mutableDeviceItemClick.tryEmit(item)
                        uiEventLogger.log(BluetoothTileDialogUiEvent.DEVICE_CLICKED)
                    }

                    // updating icon colors
                    val tintColor =
                        com.android.settingslib.Utils.getColorAttr(
                                context,
                                if (item.isActive) InternalR.attr.materialColorOnPrimaryContainer
                                else InternalR.attr.materialColorOnSurface
                            )
                            .defaultColor

                    // update icons
                    iconView.apply {
                        item.iconWithDescription?.let {
                            setImageDrawable(it.first.apply { mutate()?.setTint(tintColor) })
                            contentDescription = it.second
                        }
                    }

                    iconGear.apply { drawable?.let { it.mutate()?.setTint(tintColor) } }

                    // update text styles
                    nameView.setTextAppearance(
                        if (item.isActive) R.style.BluetoothTileDialog_DeviceName_Active
                        else R.style.BluetoothTileDialog_DeviceName
                    )
                    summaryView.setTextAppearance(
                        if (item.isActive) R.style.BluetoothTileDialog_DeviceSummary_Active
                        else R.style.BluetoothTileDialog_DeviceSummary
                    )

                    accessibilityDelegate =
                        object : AccessibilityDelegate() {
                            override fun onInitializeAccessibilityNodeInfo(
@@ -398,12 +430,7 @@ internal constructor(
                }
                nameView.text = item.deviceName
                summaryView.text = item.connectionSummary
                iconView.apply {
                    item.iconWithDescription?.let {
                        setImageDrawable(it.first)
                        contentDescription = it.second
                    }
                }

                gearView.setOnClickListener {
                    deviceItemOnClickCallback.onDeviceItemGearClicked(item, it)
                }
Loading