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

Commit 5333b04e authored by Jacqueline Bronger's avatar Jacqueline Bronger Committed by Android (Google) Code Review
Browse files

Merge "Adds a tv notification panel for aosp which is shown when keyevent NOTIFICATION is received"

parents e7080f41 5c395a46
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -530,6 +530,14 @@
            androidprv:alwaysFocusable="true"
            android:excludeFromRecents="true" />

        <!-- started from TvNotificationPanel -->
        <activity
            android:name=".statusbar.tv.notifications.TvNotificationPanelActivity"
            android:excludeFromRecents="true"
            android:launchMode="singleTask"
            android:noHistory="true"
            android:theme="@style/TvSidePanelTheme" />

        <!-- started from SliceProvider -->
        <activity android:name=".SlicePermissionActivity"
            android:theme="@style/Theme.SystemUI.Dialog.Alert"
+39 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2020 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.
  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/tv_notification_panel_width"
    android:layout_height="wrap_content"
    android:background="?android:attr/selectableItemBackground"
    android:orientation="vertical"
    android:padding="12dp">

    <TextView
        android:id="@+id/tv_notification_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="12dp"
        android:textColor="@color/tv_notification_text_color"
        android:textSize="18sp" />

    <TextView
        android:id="@+id/tv_notification_details"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textColor="@color/tv_notification_text_color" />

</LinearLayout>
+53 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2020 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.
  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tv_notification_panel"
    android:layout_width="@dimen/tv_notification_panel_width"
    android:layout_height="match_parent"
    android:layout_gravity="end"
    android:background="@color/tv_notification_background_color"
    android:orientation="vertical">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="12dp"
        android:paddingTop="24dp"
        android:text="@string/tv_notification_panel_title"
        android:textColor="@color/tv_notification_text_color"
        android:textSize="24sp"
        android:textStyle="bold" />

    <TextView
        android:id="@+id/no_tv_notifications"
        style="?android:attr/titleTextStyle"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:gravity="top|center"
        android:paddingTop="24dp"
        android:text="@string/tv_notification_panel_no_notifications"
        android:textColor="@color/tv_notification_text_color"
        android:visibility="gone" />

    <androidx.leanback.widget.VerticalGridView
        android:id="@+id/notifications_list"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1" />
</LinearLayout>
+2 −1
Original line number Diff line number Diff line
@@ -29,7 +29,8 @@
        <item>com.android.systemui.util.NotificationChannels</item>
        <item>com.android.systemui.volume.VolumeUI</item>
        <item>com.android.systemui.statusbar.tv.TvStatusBar</item>
        <item>com.android.systemui.statusbar.tv.TvNotificationPanel</item>
        <item>com.android.systemui.statusbar.tv.notifications.TvNotificationPanel</item>
        <item>com.android.systemui.statusbar.tv.notifications.TvNotificationHandler</item>
        <item>com.android.systemui.statusbar.tv.VpnStatusObserver</item>
        <item>com.android.systemui.usb.StorageNotification</item>
        <item>com.android.systemui.power.PowerUI</item>
+3 −0
Original line number Diff line number Diff line
@@ -33,4 +33,7 @@
    <color name="tv_volume_dialog_seek_bar_background">#A03C4043</color>
    <color name="tv_volume_dialog_seek_bar_fill">#FFF8F9FA</color>
    <color name="tv_volume_dialog_accent">#FFDADCE0</color>

    <color name="tv_notification_background_color">#383838</color>
    <color name="tv_notification_text_color">#FFFFFF</color>
</resources>
Loading