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

Commit bafe438d authored by Adrian Roos's avatar Adrian Roos Committed by Android (Google) Code Review
Browse files

Merge "AOD: Notification groups on Ambient Display" into oc-dev

parents 0b9e1e7f 6f6e1594
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -4257,15 +4257,17 @@ public class Notification implements Parcelable
         * Construct a RemoteViews for the final notification header only. This will not be
         * colorized.
         *
         * @param ambient if true, generate the header for the ambient display layout.
         * @hide
         */
        public RemoteViews makeNotificationHeader() {
        public RemoteViews makeNotificationHeader(boolean ambient) {
            Boolean colorized = (Boolean) mN.extras.get(EXTRA_COLORIZED);
            mN.extras.putBoolean(EXTRA_COLORIZED, false);
            RemoteViews header = new BuilderRemoteViews(mContext.getApplicationInfo(),
                    R.layout.notification_template_header);
                    ambient ? R.layout.notification_template_ambient_header
                            : R.layout.notification_template_header);
            resetNotificationHeader(header);
            bindNotificationHeader(header, false /* ambient */);
            bindNotificationHeader(header, ambient);
            if (colorized != null) {
                mN.extras.putBoolean(EXTRA_COLORIZED, colorized);
            } else {
@@ -4407,7 +4409,7 @@ public class Notification implements Parcelable
                }
            }

            RemoteViews header = makeNotificationHeader();
            RemoteViews header = makeNotificationHeader(false /* ambient */);
            header.setBoolean(R.id.notification_header, "setAcceptAllTouches", true);
            if (summary != null) {
                mN.extras.putCharSequence(EXTRA_SUB_TEXT, summary);
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2017 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.
  -->

<!-- hack to work around <include /> not being supported at the top level -->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:paddingStart="@dimen/notification_extra_margin_ambient"
    android:paddingEnd="@dimen/notification_extra_margin_ambient"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
    <include
        layout="@layout/notification_template_header"
        android:theme="@style/Theme.Material.Notification.Ambient"/>
</FrameLayout>
+2 −0
Original line number Diff line number Diff line
@@ -2935,6 +2935,8 @@
  <java-symbol type="string" name="time_picker_text_input_mode_description"/>
  <java-symbol type="string" name="time_picker_radial_mode_description"/>

  <java-symbol type="layout" name="notification_template_ambient_header" />

  <!-- resolver activity -->
  <java-symbol type="drawable" name="resolver_icon_placeholder" />

+8 −9
Original line number Diff line number Diff line
@@ -19,23 +19,22 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingStart="@*android:dimen/notification_content_margin_start"
    android:paddingEnd="12dp"
    android:gravity="bottom|start">
    android:gravity="bottom|start"
    style="?attr/hybridNotificationStyle">
    <TextView
        android:id="@+id/notification_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingEnd="4dp"
        android:singleLine="true"
        android:textAppearance="@*android:style/TextAppearance.Material.Notification.Title"
        android:singleLine="true"
        style="?attr/hybridNotificationTitleStyle"
    />
    <TextView
        android:id="@+id/notification_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingEnd="4dp"
        android:textAppearance="@*android:style/TextAppearance.Material.Notification"
        android:singleLine="true"
        android:textAppearance="@*android:style/TextAppearance.Material.Notification"
        style="?attr/hybridNotificationTextStyle"
    />
</com.android.systemui.statusbar.notification.HybridNotificationView>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textAppearance="@*android:style/TextAppearance.Material.Notification"
    android:paddingEnd="@*android:dimen/notification_content_margin_end"
    android:paddingEnd="@dimen/group_overflow_number_padding"
    android:gravity="end"
    android:singleLine="true"
    />
 No newline at end of file
Loading