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

Commit 245aa87f authored by Adrian Roos's avatar Adrian Roos
Browse files

Even more Inline Reply goodness

- Removed action icon processing
- Correct color for action label
- Change default notification color to Gray 600
- Handle different states in RemoteInputView
- Handle updates to Notifications with active remote input

Bug: 22452379
Change-Id: I30a0cd917dbf814f156ab5a106e018a245d99b67
parent 1c7de373
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -3330,7 +3330,6 @@ public class Notification implements Parcelable
            if (mN.color != COLOR_DEFAULT) {
                button.setTextColor(R.id.action0, mN.color);
            }
            processLegacyAction(action, button);
            return button;
        }

@@ -3342,14 +3341,6 @@ public class Notification implements Parcelable
            return getColorUtil() != null;
        }

        private void processLegacyAction(Action action, RemoteViews button) {
            if (!isLegacy() || getColorUtil().isGrayscaleIcon(mContext, action.getIcon())) {
                button.setTextViewCompoundDrawablesRelativeColorFilter(R.id.action0, 0,
                        mContext.getColor(R.color.notification_action_color_filter),
                        PorterDuff.Mode.MULTIPLY);
            }
        }

        private CharSequence processLegacyText(CharSequence charSequence) {
            if (isLegacy()) {
                return getColorUtil().invertCharSequenceColors(charSequence);
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
    android:layout_height="48dp"
    android:layout_gravity="center"
    android:layout_marginStart="4dp"
    android:textColor="@color/secondary_text_material_light"
    android:textColor="@color/notification_default_color"
    android:singleLine="true"
    android:ellipsize="end"
    android:background="@drawable/notification_material_action_background"
+2 −2
Original line number Diff line number Diff line
@@ -130,8 +130,8 @@
    <drawable name="notification_template_divider">#29000000</drawable>
    <drawable name="notification_template_divider_media">#29ffffff</drawable>

    <color name="notification_icon_default_color">#ff616161</color>
    <color name="notification_action_color_filter">@color/secondary_text_material_light</color>
    <color name="notification_default_color">#757575</color> <!-- Gray 600 -->
    <color name="notification_icon_default_color">@color/notification_default_color</color>

    <color name="notification_progress_background_color">@color/secondary_text_material_light</color>

+0 −1
Original line number Diff line number Diff line
@@ -1874,7 +1874,6 @@
  <java-symbol type="layout" name="notification_template_material_big_text" />
  <java-symbol type="layout" name="notification_template_header" />
  <java-symbol type="layout" name="notification_material_media_action" />
  <java-symbol type="color" name="notification_action_color_filter" />
  <java-symbol type="color" name="notification_icon_default_color" />
  <java-symbol type="color" name="notification_progress_background_color" />
  <java-symbol type="id" name="media_actions" />
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2015 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">
    <item android:state_enabled="true" android:color="@android:color/white" />
    <item android:color="#4dffffff" /> <!-- 30% white -->
</selector>
 No newline at end of file
Loading