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

Commit 7179c272 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use ic_action_open when icon is not given in RemoteAction"

parents 48af9196 f7bc2c17
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
<!--
Copyright (C) 2019 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0">
  <path
      android:fillColor="#FF737373"
      android:pathData="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/>
</vector>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -3643,4 +3643,6 @@
  <java-symbol type="array" name="config_displayWhiteBalanceDecreaseThresholds" />
  <java-symbol type="dimen" name="config_displayWhiteBalanceLowLightAmbientBrightnessThreshold" />
  <java-symbol type="dimen" name="config_displayWhiteBalanceLowLightAmbientColorTemperature" />

  <java-symbol type="drawable" name="ic_action_open" />
</resources>
+5 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.app.Notification;
import android.app.Person;
import android.app.RemoteAction;
import android.content.Context;
import android.graphics.drawable.Icon;
import android.os.Bundle;
import android.os.Parcelable;
import android.os.Process;
@@ -230,8 +231,11 @@ public class SmartActionsHelper {

    private Notification.Action createNotificationAction(
            RemoteAction remoteAction, String actionType) {
        Icon icon = remoteAction.shouldShowIcon()
                ? remoteAction.getIcon()
                : Icon.createWithResource(mContext, com.android.internal.R.drawable.ic_action_open);
        return new Notification.Action.Builder(
                remoteAction.getIcon(),
                icon,
                remoteAction.getTitle(),
                remoteAction.getActionIntent())
                .setContextual(true)