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

Commit 68fec525 authored by Andre Le's avatar Andre Le Committed by Android (Google) Code Review
Browse files

Merge "Clean up show_new_notif_dismiss settings" into main

parents 24c0311c a7ff34e7
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -20266,15 +20266,6 @@ public final class Settings {
        public static final String PEOPLE_SPACE_CONVERSATION_TYPE =
                "people_space_conversation_type";
        /**
         * Whether to show new notification dismissal.
         * Values are:
         * 0: Disabled
         * 1: Enabled
         * @hide
         */
        public static final String SHOW_NEW_NOTIF_DISMISS = "show_new_notif_dismiss";
        /**
         * The maximum allowed obscuring opacity by UID to propagate touches.
         *
+0 −1
Original line number Diff line number Diff line
@@ -409,7 +409,6 @@ public class SettingsBackupTest {
                    Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED,
                    Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS,
                    Settings.Global.SHOW_PEOPLE_SPACE,
                    Settings.Global.SHOW_NEW_NOTIF_DISMISS,
                    Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG,
                    Settings.Global.SHOW_TEMPERATURE_WARNING,
                    Settings.Global.SHOW_USB_TEMPERATURE_ALARM,
+0 −3
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@

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

import static android.provider.Settings.Global.SHOW_NEW_NOTIF_DISMISS;
import static android.view.HapticFeedbackConstants.CLOCK_TICK;

import static junit.framework.Assert.assertEquals;
@@ -33,7 +32,6 @@ import static org.mockito.Mockito.when;
import android.app.NotificationChannel;
import android.platform.test.annotations.DisableFlags;
import android.platform.test.annotations.EnableFlags;
import android.provider.Settings;
import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;
import android.testing.ViewUtils;
@@ -120,7 +118,6 @@ public class NotificationMenuRowTest extends LeakCheckedTest {
    @Test
    public void testSlowSwipe_newDismiss() {
        when(mRow.getShowSnooze()).thenReturn(true);
        Settings.Global.putInt(mContext.getContentResolver(), SHOW_NEW_NOTIF_DISMISS, 1);

        NotificationMenuRowPlugin row = new NotificationMenuRow(
                mContext, mPeopleNotificationIdentifier, mNotificationActivityStarter);
+1 −7
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;
import android.provider.Settings;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
@@ -345,14 +344,9 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl
            mMenuContainer = new FrameLayout(mContext);
        }

        final int showDismissSetting =  Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.SHOW_NEW_NOTIF_DISMISS, /* default = */ 1);
        final boolean newFlowHideShelf = showDismissSetting == 1;

        // Populate menu items if we are using the new permission helper (U+) or if we are using
        // the very old dismiss setting (SC-).
        // TODO: SHOW_NEW_NOTIF_DISMISS==0 case can likely be removed.
        if (Flags.permissionHelperInlineUiRichOngoing() || !newFlowHideShelf) {
        if (Flags.permissionHelperInlineUiRichOngoing()) {
            List<MenuItem> menuItems = mOnLeft ? mLeftMenuItems : mRightMenuItems;
            for (int i = 0; i < menuItems.size(); i++) {
                addMenuView(menuItems.get(i), mMenuContainer);