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

Commit af2bcccb authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[SB][Call chip] Update call chip to use icon from notification." into main

parents 8c0b395a d833c981
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -402,6 +402,13 @@ flag {
    }
}

flag {
    name: "status_bar_call_chip_notification_icon"
    namespace: "systemui"
    description: "Use the small icon set on the notification for the status bar call chip"
    bug: "354930838"
}

flag {
    name: "compose_bouncer"
    namespace: "systemui"
+9 −1
Original line number Diff line number Diff line
@@ -1729,10 +1729,18 @@
    <dimen name="wallet_button_vertical_padding">8dp</dimen>

    <!-- Ongoing activity chip -->
    <!-- The activity chip side padding, used with the default phone icon. -->
    <dimen name="ongoing_activity_chip_side_padding">12dp</dimen>
    <!-- The activity chip side padding, used with an icon that has embedded padding (e.g. if the icon comes from the notification's smallIcon field). If the icon has padding, the chip itself can have less padding. -->
    <dimen name="ongoing_activity_chip_side_padding_for_embedded_padding_icon">6dp</dimen>
    <!-- The icon size, used with the default phone icon. -->
    <dimen name="ongoing_activity_chip_icon_size">16dp</dimen>
    <!-- The padding between the icon and the text. -->
    <!-- The icon size, used with an icon that has embedded padding. (If the icon has embedded padding, we need to make the whole icon larger so the icon itself doesn't look small.) -->
    <dimen name="ongoing_activity_chip_embedded_padding_icon_size">22dp</dimen>
    <!-- The padding between the icon and the text. Only used if the default phone icon is used. -->
    <dimen name="ongoing_activity_chip_icon_text_padding">4dp</dimen>
    <!-- The end padding for the timer text view. Only used if an embedded padding icon is used. -->
    <dimen name="ongoing_activity_chip_text_end_padding_for_embedded_padding_icon">6dp</dimen>
    <dimen name="ongoing_activity_chip_corner_radius">28dp</dimen>

    <!-- Status bar user chip -->
+1 −0
Original line number Diff line number Diff line
@@ -132,6 +132,7 @@

    <!-- Status bar -->
    <item type="id" name="status_bar_dot" />
    <item type="id" name="ongoing_activity_chip_custom_icon" />

    <!-- Default display cutout on the physical top of screen -->
    <item type="id" name="display_cutout" />
+0 −10
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.systemui.common.ui.binder

import android.view.View
import android.widget.ImageView
import com.android.systemui.common.shared.model.Icon

@@ -31,13 +30,4 @@ object IconViewBinder {
            is Icon.Resource -> view.setImageResource(icon.res)
        }
    }

    fun bindNullable(icon: Icon?, view: ImageView) {
        if (icon != null) {
            view.visibility = View.VISIBLE
            bind(icon, view)
        } else {
            view.visibility = View.GONE
        }
    }
}
+24 −1
Original line number Diff line number Diff line
@@ -23,7 +23,13 @@ import com.android.server.notification.Flags.crossAppPoliteNotifications
import com.android.server.notification.Flags.politeNotifications
import com.android.server.notification.Flags.vibrateWhileUnlocked
import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
import com.android.systemui.Flags.FLAG_STATUS_BAR_CALL_CHIP_NOTIFICATION_ICON
import com.android.systemui.Flags.FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS
import com.android.systemui.Flags.FLAG_STATUS_BAR_USE_REPOS_FOR_CALL_CHIP
import com.android.systemui.Flags.communalHub
import com.android.systemui.Flags.statusBarCallChipNotificationIcon
import com.android.systemui.Flags.statusBarScreenSharingChips
import com.android.systemui.Flags.statusBarUseReposForCallChip
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.keyguard.KeyguardBottomAreaRefactor
import com.android.systemui.keyguard.MigrateClocksToBlueprint
@@ -38,9 +44,9 @@ import com.android.systemui.statusbar.notification.interruption.VisualInterrupti
import com.android.systemui.statusbar.notification.shared.NotificationAvalancheSuppression
import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor
import com.android.systemui.statusbar.notification.shared.NotificationMinimalismPrototype
import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun
import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor
import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor
import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun
import com.android.systemui.statusbar.notification.shared.PriorityPeopleSection
import javax.inject.Inject

@@ -77,6 +83,10 @@ class FlagDependencies @Inject constructor(featureFlags: FeatureFlagsClassic, ha

        // QS Fragment using Compose dependencies
        QSComposeFragment.token dependsOn NewQsUI.token

        // Status bar chip dependencies
        statusBarCallChipNotificationIconToken dependsOn statusBarUseReposForCallChipToken
        statusBarCallChipNotificationIconToken dependsOn statusBarScreenSharingChipsToken
    }

    private inline val politeNotifications
@@ -96,4 +106,17 @@ class FlagDependencies @Inject constructor(featureFlags: FeatureFlagsClassic, ha

    private inline val communalHub
        get() = FlagToken(FLAG_COMMUNAL_HUB, communalHub())

    private inline val statusBarCallChipNotificationIconToken
        get() =
            FlagToken(
                FLAG_STATUS_BAR_CALL_CHIP_NOTIFICATION_ICON,
                statusBarCallChipNotificationIcon()
            )

    private inline val statusBarScreenSharingChipsToken
        get() = FlagToken(FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, statusBarScreenSharingChips())

    private inline val statusBarUseReposForCallChipToken
        get() = FlagToken(FLAG_STATUS_BAR_USE_REPOS_FOR_CALL_CHIP, statusBarUseReposForCallChip())
}
Loading