diff options
3 files changed, 29 insertions, 0 deletions
diff --git a/packages/SystemUI/res/color/notification_focus_overlay_color.xml b/packages/SystemUI/res/color/notification_focus_overlay_color.xml new file mode 100644 index 000000000000..6a3c7a148963 --- /dev/null +++ b/packages/SystemUI/res/color/notification_focus_overlay_color.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ 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:state_focused="true" android:color="?androidprv:attr/materialColorSecondary" /> + <item android:color="@color/transparent" /> +</selector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/notification_material_bg.xml b/packages/SystemUI/res/drawable/notification_material_bg.xml index 3f903aece0b5..587a5a05458f 100644 --- a/packages/SystemUI/res/drawable/notification_material_bg.xml +++ b/packages/SystemUI/res/drawable/notification_material_bg.xml @@ -28,4 +28,9 @@ <solid android:color="@color/notification_state_color_default" /> </shape> </item> + <item> + <shape> + <stroke android:width="3dp" android:color="@color/notification_focus_overlay_color"/> + </shape> + </item> </layer-list>
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index 9e0b16cfb312..c5e5e4d654e6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -2068,6 +2068,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView // Remove views that don't translate mTranslateableViews.remove(mChildrenContainerStub); mTranslateableViews.remove(mGutsStub); + // We don't handle focus highlight in this view, it's done in background drawable instead + setDefaultFocusHighlightEnabled(false); } /** |