From 4dd5006ff58c3b1ee5a2e0db343170e7cbd1b585 Mon Sep 17 00:00:00 2001 From: Geoffrey Pitsch Date: Tue, 6 Dec 2016 16:41:22 -0500 Subject: [PATCH] Change Notification Inline Settings for Channels Removes slider advanced settings. Move more Guts internals out of BaseStatusBar. Test: runtest systemui Change-Id: I0cf7f144859d1248bd54e281cfe0b35a817376a6 --- .../SystemUI/res/layout/notification_guts.xml | 227 +++++------ .../notification_guts_importance_text.xml | 38 ++ packages/SystemUI/res/values/dimens.xml | 3 + packages/SystemUI/res/values/strings.xml | 43 +- packages/SystemUI/res/values/styles.xml | 12 +- .../systemui/statusbar/BaseStatusBar.java | 101 ++--- .../statusbar/ExpandableNotificationRow.java | 6 +- .../systemui/statusbar/NotificationGuts.java | 369 +++++++++--------- .../stack/NotificationChildrenContainer.java | 5 +- packages/SystemUI/tests/AndroidManifest.xml | 1 + .../statusbar/NotificationGutsTest.java | 301 ++++++++++++++ .../NotificationManagerService.java | 3 +- 12 files changed, 682 insertions(+), 427 deletions(-) create mode 100644 packages/SystemUI/res/layout/notification_guts_importance_text.xml create mode 100644 packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java diff --git a/packages/SystemUI/res/layout/notification_guts.xml b/packages/SystemUI/res/layout/notification_guts.xml index e84ed23fbc868..3948dc4b87711 100644 --- a/packages/SystemUI/res/layout/notification_guts.xml +++ b/packages/SystemUI/res/layout/notification_guts.xml @@ -16,150 +16,109 @@ --> + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/notification_guts" + android:visibility="gone" + android:clickable="true" + android:gravity="top|start" + android:orientation="vertical" + android:paddingStart="@*android:dimen/notification_content_margin_start" + android:paddingEnd="8dp" + android:background="@color/notification_guts_bg_color" + android:theme="@*android:style/Theme.DeviceDefault.Light"> - + - - + android:layout_alignParentStart="true" + style="@style/TextAppearance.NotificationGuts.Secondary" /> - - + android:id="@+id/channel_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_below="@id/pkgname" + style="@style/TextAppearance.NotificationGuts.Header" /> + + - + + + + + + + - - - - - - - - - - - - - - - - - + android:orientation="vertical"> + + + + + - + + + + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="end" + android:paddingTop="16dp" + android:paddingBottom="8dp" > + + + + + diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index ff4ec5bdaf3fc..ca4214bda2cf0 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -302,6 +302,9 @@ 6dp + + 55dp + 36dp diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 8f230b47b37f1..2b1db3c4b3de4 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -1332,41 +1332,38 @@ \n- Block all notifications from the app - - Importance: Automatic - - Importance: Level 0 + + Notifications + + + You won\'t get these notifications anymore. + + + %s notifications for + - Importance: Level 1 + Low - Importance: Level 2 + Medium - Importance: Level 3 + High - Importance: Level 4 - - Importance: Level 5 - - - App determines importance for each notification. - - - Never show notifications from this app. + Urgent - No full screen interruption, peeking, sound, or vibration. Hide from lock screen and status bar. + No sound or visual interruption - No full screen interruption, peeking, sound, or vibration. + Show silently - No full screen interruption or peeking. + Make sound - Always peek. No full screen interruption. - - - Always peek, and allow full screen interruption. + Make sound and pop on screen More settings diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index 93b696591c1f0..fc1d816993b71 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -4,9 +4,9 @@ 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. @@ -359,12 +359,14 @@