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

Commit 85d4c192 authored by Beverly's avatar Beverly
Browse files

Add NotifLogs throughout SystemUI

Test: atest SystemUITests
Test: adb shell dumpsys activity service
  com.android.systemui/.SystemUIService \ dependency DumpController
  NotifLog
Bug: 141470043
Change-Id: I4263333da209a4765cd9a3dd1931780d2041b3bf
parent ee1dd458
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.service.notification.StatusBarNotification;

import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationData;
import com.android.systemui.statusbar.notification.logging.NotifLog;

import javax.inject.Inject;
import javax.inject.Singleton;
@@ -34,8 +35,8 @@ import javax.inject.Singleton;
public class CarNotificationEntryManager extends NotificationEntryManager {

    @Inject
    public CarNotificationEntryManager(NotificationData notificationData) {
        super(notificationData);
    public CarNotificationEntryManager(NotificationData notificationData, NotifLog notifLog) {
        super(notificationData, notifLog);
    }

    @Override
+5 −2
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationInterruptionStateProvider;
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
import com.android.systemui.statusbar.notification.VisualStabilityManager;
import com.android.systemui.statusbar.notification.logging.NotifLog;
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.phone.AutoHideController;
@@ -296,7 +297,8 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
            NotificationListener notificationListener,
            ConfigurationController configurationController,
            StatusBarWindowController statusBarWindowController,
            StatusBarWindowViewController.Builder statusBarWindowViewControllerBuild) {
            StatusBarWindowViewController.Builder statusBarWindowViewControllerBuild,
            NotifLog notifLog) {
        super(
                lightBarController,
                autoHideController,
@@ -350,7 +352,8 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
                notificationListener,
                configurationController,
                statusBarWindowController,
                statusBarWindowViewControllerBuild);
                statusBarWindowViewControllerBuild,
                notifLog);
        mNavigationBarController = navigationBarController;
    }

+6 −3
Original line number Diff line number Diff line
@@ -569,7 +569,8 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
                    if (mStackView != null) {
                        mStackView.updateDotVisibility(entry.key);
                    }
                    mNotificationEntryManager.updateNotifications();
                    mNotificationEntryManager.updateNotifications(
                            "BubbleController.onNotificationRemoveRequested");
                    return true;
                } else if (!userRemovedNotif && entry != null) {
                    // This wasn't a user removal so we should remove the bubble as well
@@ -609,7 +610,8 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
                mBubbleData.addSummaryToSuppress(summary.notification.getGroupKey(),
                        summary.key);
                // Tell shade to update for the suppression
                mNotificationEntryManager.updateNotifications();
                mNotificationEntryManager.updateNotifications(
                        "BubbleController.handleSummaryRemovalInterception");
            }
            return !isAutogroupSummary;
        } else {
@@ -760,7 +762,8 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
                mStackView.setExpanded(true);
            }

            mNotificationEntryManager.updateNotifications();
            mNotificationEntryManager.updateNotifications(
                    "BubbleData.Listener.applyUpdate");
            updateStack();

            if (DEBUG_BUBBLE_CONTROLLER) {
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ public class NotificationListener extends NotificationListenerWithPlugins {
                        mEntryManager.removeNotification(key, rankingMap, UNDEFINED_DISMISS_REASON);
                    } else {
                        mEntryManager.getNotificationData()
                                .updateRanking(rankingMap);
                                .updateRanking(rankingMap, "onNotificationPosted");
                    }
                    return;
                }
+7 −5
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ public class NotificationLockscreenUserManagerImpl implements
                    isCurrentProfile(getSendingUserId())) {
                mUsersAllowingPrivateNotifications.clear();
                updateLockscreenNotificationSetting();
                getEntryManager().updateNotifications();
                getEntryManager().updateNotifications("ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED");
            }
        }
    };
@@ -124,7 +124,7 @@ public class NotificationLockscreenUserManagerImpl implements
                updatePublicMode();
                // The filtering needs to happen before the update call below in order to make sure
                // the presenter has the updated notifications from the new user
                getEntryManager().getNotificationData().filterAndSort();
                getEntryManager().getNotificationData().filterAndSort("user switched");
                mPresenter.onUserSwitched(mCurrentUserId);

                for (UserChangedListener listener : mListeners) {
@@ -205,7 +205,8 @@ public class NotificationLockscreenUserManagerImpl implements
                mUsersAllowingNotifications.clear();
                // ... and refresh all the notifications
                updateLockscreenNotificationSetting();
                getEntryManager().updateNotifications();
                getEntryManager().updateNotifications("LOCK_SCREEN_SHOW_NOTIFICATIONS,"
                        + " or LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS change");
            }
        };

@@ -214,7 +215,8 @@ public class NotificationLockscreenUserManagerImpl implements
            public void onChange(boolean selfChange) {
                updateLockscreenNotificationSetting();
                if (mDeviceProvisionedController.isDeviceProvisioned()) {
                    getEntryManager().updateNotifications();
                    getEntryManager().updateNotifications("LOCK_SCREEN_ALLOW_REMOTE_INPUT"
                            + " or ZEN_MODE change");
                }
            }
        };
@@ -532,7 +534,7 @@ public class NotificationLockscreenUserManagerImpl implements
            setLockscreenPublicMode(isProfilePublic, userId);
            mUsersWithSeperateWorkChallenge.put(userId, needsSeparateChallenge);
        }
        getEntryManager().updateNotifications();
        getEntryManager().updateNotifications("NotificationLockscreenUserManager.updatePublicMode");
    }

    @Override
Loading