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

Commit 6d7a25f3 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Fix black background for auto-redacted legacy notifications" into lmp-preview-dev

parents 88427b0c 36b15237
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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"
        android:exitFadeDuration="@android:integer/config_mediumAnimTime">

    <item android:state_pressed="true"  android:drawable="@drawable/notification_item_background_color_pressed" />
    <item android:state_pressed="false" android:drawable="@drawable/notification_item_background_legacy_color" />
</selector>
+0 −25
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 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.
-->

<layer-list
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:opacity="translucent"
    >
    <item
        android:drawable="@drawable/notification_item_background_color"
        />
</layer-list>
+0 −27
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 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.
-->

<layer-list
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:opacity="translucent"
    >
    <!-- the large icon extends 12dp beyond the edge of the status bar -->
    <item
        android:drawable="@drawable/notification_item_background_color"
        android:top="12dp"
        />
</layer-list>
+0 −3
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@
    <drawable name="status_bar_notification_row_background_color">#ff090909</drawable>
    <color name="notification_list_shadow_top">#80000000</color>
    <drawable name="recents_callout_line">#99ffffff</drawable>
    <drawable name="notification_item_background_legacy_color">#ffaaaaaa</drawable>
    <drawable name="heads_up_notification_bg_pressed">#ff33B5E5</drawable>
    <color name="batterymeter_frame_color">#66FFFFFF</color><!-- 40% white -->
    <color name="batterymeter_charge_color">#FFFFFFFF</color>
@@ -42,8 +41,6 @@
    <color name="qs_tile_divider">#29ffffff</color><!--  16% white -->
    <color name="qs_tile_text">#FFFFFFFF</color>
    <color name="status_bar_clock_color">#FFFFFFFF</color>
    <drawable name="notification_item_background_color">#ff111111</drawable>
    <drawable name="notification_item_background_color_pressed">#ff454545</drawable>

    <!-- Tint color for the content on the notification overflow card. -->
    <color name="keyguard_overflow_content_color">#ff686868</color>
+3 −3
Original line number Diff line number Diff line
@@ -545,12 +545,11 @@ public abstract class BaseStatusBar extends SystemUI implements

        if (entry.expanded.getId() != com.android.internal.R.id.status_bar_latest_event_content) {
            // Using custom RemoteViews
            if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) {
                entry.row.setBackgroundResource(R.drawable.notification_row_legacy_bg);
            } else if (version < Build.VERSION_CODES.L) {
            if (version >= Build.VERSION_CODES.GINGERBREAD && version < Build.VERSION_CODES.L) {
                entry.row.setBackgroundResourceIds(
                        com.android.internal.R.drawable.notification_bg,
                        com.android.internal.R.drawable.notification_bg_dim);
                entry.legacy = true;
            }
        } else {
            // Using platform templates
@@ -1026,6 +1025,7 @@ public abstract class BaseStatusBar extends SystemUI implements
                    com.android.internal.R.id.text);
            text.setText("Unlock your device to see this notification.");

            entry.autoRedacted = true;
            // TODO: fill out "time" as well
        }

Loading