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

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

Merge "Split ambient pulse notif logic from heads up."

parents 4435742c a97ea059
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -146,19 +146,29 @@
    <!-- Should "LTE"/"4G" be shown instead of "LTE+"/"4G+" when on NETWORK_TYPE_LTE_CA? -->
    <bool name="config_hideLtePlus">false</bool>

    <!-- milliseconds before the heads up notification auto-dismisses. -->
    <!-- The number of milliseconds before the heads up notification auto-dismisses. -->
    <integer name="heads_up_notification_decay">5000</integer>

    <!-- milliseconds after a heads up notification is pushed back
    <!-- The number of milliseconds after a heads up notification is pushed back
     before the app can interrupt again. -->
    <integer name="heads_up_default_snooze_length_ms">60000</integer>

    <!-- Minimum display time for a heads up notification, in milliseconds. -->
    <integer name="heads_up_notification_minimum_time">2000</integer>

    <!-- milliseconds before the heads up notification accepts touches. -->
    <!-- The number of milliseconds before the heads up notification accepts touches. -->
    <integer name="touch_acceptance_delay">700</integer>

    <!-- The number of milliseconds before the ambient notification auto-dismisses. This will
         override the default pulse length. -->
    <integer name="ambient_notification_decay">6000</integer>

    <!-- Minimum display time for a heads up notification, in milliseconds. -->
    <integer name="ambient_notification_minimum_time">2000</integer>

    <!-- The number of milliseconds to extend ambient pulse by when prompted (e.g. on touch) -->
    <integer name="ambient_notification_extension_time">6000</integer>

    <!-- The duration in seconds to wait before the dismiss buttons are shown. -->
    <integer name="recents_task_bar_dismiss_delay_seconds">1000</integer>

+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import com.android.systemui.Dependency.DependencyProvider;
import com.android.systemui.classifier.FalsingManager;
import com.android.systemui.keyguard.DismissCallbackRegistry;
import com.android.systemui.qs.QSTileHost;
import com.android.systemui.statusbar.AmbientPulseManager;
import com.android.systemui.statusbar.KeyguardIndicationController;
import com.android.systemui.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.notification.row.NotificationBlockingHelperManager;
@@ -137,6 +138,7 @@ public class SystemUIFactory {
        providers.put(NotificationGroupManager.class, NotificationGroupManager::new);
        providers.put(NotificationMediaManager.class, () -> new NotificationMediaManager(context));
        providers.put(NotificationGutsManager.class, () -> new NotificationGutsManager(context));
        providers.put(AmbientPulseManager.class, () -> new AmbientPulseManager(context));
        providers.put(NotificationBlockingHelperManager.class,
                () -> new NotificationBlockingHelperManager(context));
        providers.put(NotificationRemoteInputManager.class,
+2 −3
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
package com.android.systemui.car;

import android.content.Context;
import android.service.notification.StatusBarNotification;

import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.NotificationData;
@@ -41,7 +40,7 @@ public class CarNotificationEntryManager extends NotificationEntryManager {
    }

    @Override
    public boolean shouldPeek(NotificationData.Entry entry, StatusBarNotification sbn) {
    public boolean shouldHeadsUp(NotificationData.Entry entry) {
        // Because space is usually constrained in the auto use-case, there should not be a
        // pinned notification when the shade has been expanded. Ensure this by not pinning any
        // notification if the shade is already opened.
@@ -49,6 +48,6 @@ public class CarNotificationEntryManager extends NotificationEntryManager {
            return false;
        }

        return super.shouldPeek(entry, sbn);
        return super.shouldHeadsUp(entry);
    }
}
+9 −1
Original line number Diff line number Diff line
@@ -48,7 +48,15 @@ public interface DozeHost {
    void onIgnoreTouchWhilePulsing(boolean ignore);

    interface Callback {
        default void onNotificationHeadsUp() {}
        /**
         * Called when a high priority notification is added.
         */
        default void onNotificationAlerted() {}

        /**
         * Called when battery state or power save mode changes.
         * @param active whether power save is active or not
         */
        default void onPowerSaveChanged(boolean active) {}
    }

+1 −1
Original line number Diff line number Diff line
@@ -409,7 +409,7 @@ public class DozeTriggers implements DozeMachine.Part {

    private DozeHost.Callback mHostCallback = new DozeHost.Callback() {
        @Override
        public void onNotificationHeadsUp() {
        public void onNotificationAlerted() {
            onNotification();
        }

Loading