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

Commit ed814087 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Move notification shade changes into GX Overlay.

* Reduce horizontal margins and padding for shade
* Restore old dismiss rest behavior
* Restore notification background
* Hide the 'two radii' new feature (small radius now 0)
* Reduce notification divider height

Test: manual inspection w/ and w/o overlay
Test: atest NotificationRoundnessManagerTest
Test: atest NotificationMenuRowTest
Fixes: 175710408
Fixes: 178609228
Change-Id: I3e3e6359a8afb7d9f07a1922c3f884901e16e458
parent 1ee02141
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@
    <bool name="config_showNotificationGear">true</bool>

    <!-- Whether or not a background should be drawn behind a notification. -->
    <bool name="config_drawNotificationBackground">false</bool>
    <bool name="config_drawNotificationBackground">true</bool>

    <!-- Whether or the notifications can be shown and dismissed with a drag. -->
    <bool name="config_enableNotificationShadeDrag">true</bool>
+7 −4
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@
    <dimen name="notification_max_heads_up_height_increased">188dp</dimen>

    <!-- Side padding on the lockscreen on the side of notifications -->
    <dimen name="notification_side_paddings">16dp</dimen>
    <dimen name="notification_side_paddings">4dp</dimen>

    <!-- padding between the heads up and the statusbar -->
    <dimen name="heads_up_status_bar_padding">8dp</dimen>
@@ -177,7 +177,10 @@
    <dimen name="notification_min_interaction_height">40dp</dimen>

    <!-- Radius for notifications corners without adjacent notifications -->
    <dimen name="notification_corner_radius">28dp</dimen>
    <dimen name="notification_corner_radius">8dp</dimen>

    <!-- Radius for notifications corners with adjacent notifications -->
    <dimen name="notification_corner_radius_small">0dp</dimen>

    <!-- the padding of the shelf icon container -->
    <dimen name="shelf_icon_container_padding">13dp</dimen>
@@ -619,7 +622,7 @@
    <dimen name="z_distance_between_notifications">0.5dp</dimen>

    <!-- The height of the divider between the individual notifications. -->
    <dimen name="notification_divider_height">2dp</dimen>
    <dimen name="notification_divider_height">1dp</dimen>

    <!-- The corner radius of the shadow behind the notification. -->
    <dimen name="notification_shadow_radius">0dp</dimen>
@@ -632,7 +635,7 @@
    <dimen name="notification_children_container_divider_height">0.5dp</dimen>

    <!-- The horizontal margin of the content in the notification shade -->
    <dimen name="notification_shade_content_margin_horizontal">16dp</dimen>
    <dimen name="notification_shade_content_margin_horizontal">4dp</dimen>

    <!-- The top margin for the notification children container in its non-expanded form. -->
    <dimen name="notification_children_container_margin_top">
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@

    <bool name="flag_notification_pipeline2">false</bool>
    <bool name="flag_notification_pipeline2_rendering">false</bool>
    <bool name="flag_notif_updates">false</bool>

    <bool name="flag_shade_is_opaque">false</bool>

    <!-- b/171917882 -->
+6 −2
Original line number Diff line number Diff line
@@ -302,8 +302,12 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl
        } else {
            mMenuContainer = new FrameLayout(mContext);
        }
        final boolean newFlowHideShelf = Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.SHOW_NEW_NOTIF_DISMISS, 1 /* on by default */) == 1;
        // The setting can win (which is needed for tests) but if not set, then use the flag
        final int showDismissSetting =  Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.SHOW_NEW_NOTIF_DISMISS, -1);
        final boolean newFlowHideShelf = showDismissSetting == -1
                ? mContext.getResources().getBoolean(R.bool.flag_notif_updates)
                : showDismissSetting == 1;
        if (newFlowHideShelf) {
            return;
        }
+5 −6
Original line number Diff line number Diff line
@@ -16,8 +16,10 @@

package com.android.systemui.statusbar.notification.stack;

import android.content.res.Resources;
import android.util.MathUtils;

import com.android.systemui.R;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.statusbar.notification.NotificationSectionsFeatureManager;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
@@ -45,11 +47,6 @@ public class NotificationRoundnessManager {
    private ExpandableNotificationRow mTrackedHeadsUp;
    private float mAppearFraction;

    // Radius for notification corners WITH adjacent notifications
    // as percent of radius WITHOUT adjacent notifications.
    // TODO(b/175710408) pull from dimens and hide from beta builds.
    static final float SMALL_CORNER_RADIUS = 4f/28;

    @Inject
    NotificationRoundnessManager(
            KeyguardBypassController keyguardBypassController,
@@ -128,7 +125,9 @@ public class NotificationRoundnessManager {
        if (view.showingPulsing() && !mBypassController.getBypassEnabled()) {
            return 1.0f;
        }
        return SMALL_CORNER_RADIUS;
        final Resources resources = view.getResources();
        return resources.getDimension(R.dimen.notification_corner_radius_small)
                / resources.getDimension(R.dimen.notification_corner_radius);
    }

    public void setExpanded(float expandedHeight, float appearFraction) {
Loading