Loading packages/SystemUI/res/layout/battery_status_chip.xml +2 −10 Original line number Diff line number Diff line Loading @@ -24,21 +24,13 @@ <LinearLayout android:id="@+id/rounded_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minHeight="@dimen/ongoing_appops_chip_height" android:layout_gravity="center" android:background="@drawable/statusbar_chip_bg" android:clipToOutline="true" android:gravity="center" android:maxWidth="@dimen/ongoing_appops_chip_max_width" android:minWidth="@dimen/ongoing_appops_chip_min_width"> style="@style/StatusBar.EventChip"> <com.android.systemui.battery.BatteryMeterView android:id="@+id/battery_meter_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginHorizontal="10dp" /> android:layout_marginHorizontal="@dimen/ongoing_appops_chip_content_horizontal_margin" /> </LinearLayout> </merge> No newline at end of file packages/SystemUI/res/layout/status_bar_event_chip_compose.xml 0 → 100644 +34 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- ~ Copyright (C) 2025 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. --> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="center_vertical|end"> <LinearLayout android:id="@+id/rounded_container" style="@style/StatusBar.EventChip"> <!-- Stub for the composable --> <androidx.compose.ui.platform.ComposeView android:id="@+id/compose_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginHorizontal="@dimen/ongoing_appops_chip_content_horizontal_margin" /> </LinearLayout> </merge> packages/SystemUI/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1254,6 +1254,8 @@ <dimen name="ongoing_appops_chip_side_padding">8dp</dimen> <!-- Margin between icons of Ongoing App Ops chip --> <dimen name="ongoing_appops_chip_icon_margin">4dp</dimen> <!-- Side margins for the content of an appops chip --> <dimen name="ongoing_appops_chip_content_horizontal_margin">10dp</dimen> <!-- Icon size of Ongoing App Ops chip --> <dimen name="ongoing_appops_chip_icon_size">16sp</dimen> <!-- Radius of Ongoing App Ops chip corners --> Loading packages/SystemUI/res/values/styles.xml +13 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,19 @@ <item name="android:textColor">?android:attr/colorPrimary</item> </style> <style name="StatusBar.EventChip"> <item name="android:orientation">horizontal</item> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_gravity">center</item> <item name="android:gravity">center</item> <item name="android:clipToOutline">true</item> <item name="android:background">@drawable/statusbar_chip_bg</item> <item name="android:minHeight">@dimen/ongoing_appops_chip_height</item> <item name="android:maxWidth">@dimen/ongoing_appops_chip_max_width</item> <item name="android:minWidth">@dimen/ongoing_appops_chip_min_width</item> </style> <style name="Chipbar" /> <style name="Chipbar.Text" parent="@*android:style/TextAppearance.DeviceDefault.Notification.Title"> Loading packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt +3 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import com.android.settingslib.flags.Flags.newStatusBarIcons import com.android.systemui.battery.BatteryMeterView import com.android.systemui.battery.unified.BatteryColors import com.android.systemui.res.R import com.android.systemui.statusbar.core.NewStatusBarIcons import com.android.systemui.statusbar.events.BackgroundAnimatableView class BatteryStatusChip @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : Loading @@ -37,6 +38,8 @@ class BatteryStatusChip @JvmOverloads constructor(context: Context, attrs: Attri get() = batteryMeterView init { NewStatusBarIcons.assertInLegacyMode() inflate(context, R.layout.battery_status_chip, this) roundedContainer = requireViewById(R.id.rounded_container) batteryMeterView = requireViewById(R.id.battery_meter_view) Loading Loading
packages/SystemUI/res/layout/battery_status_chip.xml +2 −10 Original line number Diff line number Diff line Loading @@ -24,21 +24,13 @@ <LinearLayout android:id="@+id/rounded_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minHeight="@dimen/ongoing_appops_chip_height" android:layout_gravity="center" android:background="@drawable/statusbar_chip_bg" android:clipToOutline="true" android:gravity="center" android:maxWidth="@dimen/ongoing_appops_chip_max_width" android:minWidth="@dimen/ongoing_appops_chip_min_width"> style="@style/StatusBar.EventChip"> <com.android.systemui.battery.BatteryMeterView android:id="@+id/battery_meter_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginHorizontal="10dp" /> android:layout_marginHorizontal="@dimen/ongoing_appops_chip_content_horizontal_margin" /> </LinearLayout> </merge> No newline at end of file
packages/SystemUI/res/layout/status_bar_event_chip_compose.xml 0 → 100644 +34 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- ~ Copyright (C) 2025 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. --> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="center_vertical|end"> <LinearLayout android:id="@+id/rounded_container" style="@style/StatusBar.EventChip"> <!-- Stub for the composable --> <androidx.compose.ui.platform.ComposeView android:id="@+id/compose_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginHorizontal="@dimen/ongoing_appops_chip_content_horizontal_margin" /> </LinearLayout> </merge>
packages/SystemUI/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1254,6 +1254,8 @@ <dimen name="ongoing_appops_chip_side_padding">8dp</dimen> <!-- Margin between icons of Ongoing App Ops chip --> <dimen name="ongoing_appops_chip_icon_margin">4dp</dimen> <!-- Side margins for the content of an appops chip --> <dimen name="ongoing_appops_chip_content_horizontal_margin">10dp</dimen> <!-- Icon size of Ongoing App Ops chip --> <dimen name="ongoing_appops_chip_icon_size">16sp</dimen> <!-- Radius of Ongoing App Ops chip corners --> Loading
packages/SystemUI/res/values/styles.xml +13 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,19 @@ <item name="android:textColor">?android:attr/colorPrimary</item> </style> <style name="StatusBar.EventChip"> <item name="android:orientation">horizontal</item> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_gravity">center</item> <item name="android:gravity">center</item> <item name="android:clipToOutline">true</item> <item name="android:background">@drawable/statusbar_chip_bg</item> <item name="android:minHeight">@dimen/ongoing_appops_chip_height</item> <item name="android:maxWidth">@dimen/ongoing_appops_chip_max_width</item> <item name="android:minWidth">@dimen/ongoing_appops_chip_min_width</item> </style> <style name="Chipbar" /> <style name="Chipbar.Text" parent="@*android:style/TextAppearance.DeviceDefault.Notification.Title"> Loading
packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt +3 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import com.android.settingslib.flags.Flags.newStatusBarIcons import com.android.systemui.battery.BatteryMeterView import com.android.systemui.battery.unified.BatteryColors import com.android.systemui.res.R import com.android.systemui.statusbar.core.NewStatusBarIcons import com.android.systemui.statusbar.events.BackgroundAnimatableView class BatteryStatusChip @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : Loading @@ -37,6 +38,8 @@ class BatteryStatusChip @JvmOverloads constructor(context: Context, attrs: Attri get() = batteryMeterView init { NewStatusBarIcons.assertInLegacyMode() inflate(context, R.layout.battery_status_chip, this) roundedContainer = requireViewById(R.id.rounded_container) batteryMeterView = requireViewById(R.id.battery_meter_view) Loading