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

Commit a4734cb7 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Dump notification dot counts" into ub-launcher3-rvc-dev

parents 671173ef 646e4486
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2565,9 +2565,10 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
        writer.println(prefix + "\tmRotationHelper: " + mRotationHelper);
        writer.println(prefix + "\tmAppWidgetHost.isListening: " + mAppWidgetHost.isListening());

        // Extra logging for b/116853349
        // Extra logging for general debugging
        mDragLayer.dump(prefix, writer);
        mStateManager.dump(prefix, writer);
        mPopupDataProvider.dump(prefix, writer);

        try {
            FileLog.flushAll(writer);
+8 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.launcher3.dot;

import androidx.annotation.NonNull;

import com.android.launcher3.notification.NotificationInfo;
import com.android.launcher3.notification.NotificationKeyData;

@@ -83,4 +85,10 @@ public class DotInfo {
    public int getNotificationCount() {
        return Math.min(mTotalCount, MAX_COUNT);
    }

    @NonNull
    @Override
    public String toString() {
        return Integer.toString(mTotalCount);
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import com.android.launcher3.util.PackageUserKey;
import com.android.launcher3.util.ShortcutUtil;
import com.android.launcher3.widget.WidgetListRowEntry;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -238,6 +239,11 @@ public class PopupDataProvider implements NotificationListener.NotificationsChan
                }).collect(Collectors.toList());
    }

    public void dump(String prefix, PrintWriter writer) {
        writer.println(prefix + "PopupDataProvider:");
        writer.println(prefix + "\tmPackageUserToDotInfos:" + mPackageUserToDotInfos);
    }

    public interface PopupDataChangeListener {

        PopupDataChangeListener INSTANCE = new PopupDataChangeListener() { };
+7 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ package com.android.launcher3.util;
import android.os.UserHandle;
import android.service.notification.StatusBarNotification;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.launcher3.model.data.ItemInfo;
@@ -60,4 +61,10 @@ public class PackageUserKey {
        PackageUserKey otherKey = (PackageUserKey) obj;
        return mPackageName.equals(otherKey.mPackageName) && mUser.equals(otherKey.mUser);
    }

    @NonNull
    @Override
    public String toString() {
        return mPackageName + "#" + mUser;
    }
}