Loading core/java/android/service/notification/NotificationListenerService.java +22 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.service.notification; import android.annotation.CurrentTimeMillisLong; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SdkConstant; import android.annotation.SystemApi; import android.annotation.TestApi; Loading @@ -37,6 +38,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.ParceledListSlice; import android.content.pm.ShortcutInfo; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; Loading @@ -53,6 +55,7 @@ import android.os.ServiceManager; import android.os.UserHandle; import android.util.ArrayMap; import android.util.Log; import android.util.Slog; import android.widget.RemoteViews; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -1566,6 +1569,7 @@ public abstract class NotificationListenerService extends Service { private boolean mCanBubble; private boolean mVisuallyInterruptive; private boolean mIsConversation; private ShortcutInfo mShortcutInfo; private static final int PARCEL_VERSION = 2; Loading Loading @@ -1599,6 +1603,7 @@ public abstract class NotificationListenerService extends Service { out.writeBoolean(mCanBubble); out.writeBoolean(mVisuallyInterruptive); out.writeBoolean(mIsConversation); out.writeParcelable(mShortcutInfo, flags); } /** @hide */ Loading @@ -1620,7 +1625,7 @@ public abstract class NotificationListenerService extends Service { mImportance = in.readInt(); mImportanceExplanation = in.readCharSequence(); // may be null mOverrideGroupKey = in.readString(); // may be null mChannel = (NotificationChannel) in.readParcelable(cl); // may be null mChannel = in.readParcelable(cl); // may be null mOverridePeople = in.createStringArrayList(); mSnoozeCriteria = in.createTypedArrayList(SnoozeCriterion.CREATOR); mShowBadge = in.readBoolean(); Loading @@ -1633,6 +1638,7 @@ public abstract class NotificationListenerService extends Service { mCanBubble = in.readBoolean(); mVisuallyInterruptive = in.readBoolean(); mIsConversation = in.readBoolean(); mShortcutInfo = in.readParcelable(cl); } Loading Loading @@ -1837,6 +1843,13 @@ public abstract class NotificationListenerService extends Service { return mIsConversation; } /** * @hide */ public @Nullable ShortcutInfo getShortcutInfo() { return mShortcutInfo; } /** * @hide */ Loading @@ -1849,7 +1862,7 @@ public abstract class NotificationListenerService extends Service { int userSentiment, boolean hidden, long lastAudiblyAlertedMs, boolean noisy, ArrayList<Notification.Action> smartActions, ArrayList<CharSequence> smartReplies, boolean canBubble, boolean visuallyInterruptive, boolean isConversation) { boolean visuallyInterruptive, boolean isConversation, ShortcutInfo shortcutInfo) { mKey = key; mRank = rank; mIsAmbient = importance < NotificationManager.IMPORTANCE_LOW; Loading @@ -1872,6 +1885,7 @@ public abstract class NotificationListenerService extends Service { mCanBubble = canBubble; mVisuallyInterruptive = visuallyInterruptive; mIsConversation = isConversation; mShortcutInfo = shortcutInfo; } /** Loading @@ -1898,7 +1912,8 @@ public abstract class NotificationListenerService extends Service { other.mSmartReplies, other.mCanBubble, other.mVisuallyInterruptive, other.mIsConversation); other.mIsConversation, other.mShortcutInfo); } /** Loading Loading @@ -1952,7 +1967,10 @@ public abstract class NotificationListenerService extends Service { && Objects.equals(mSmartReplies, other.mSmartReplies) && Objects.equals(mCanBubble, other.mCanBubble) && Objects.equals(mVisuallyInterruptive, other.mVisuallyInterruptive) && Objects.equals(mIsConversation, other.mIsConversation); && Objects.equals(mIsConversation, other.mIsConversation) // Shortcutinfo doesn't have equals either; use id && Objects.equals((mShortcutInfo == null ? 0 : mShortcutInfo.getId()), (other.mShortcutInfo == null ? 0 : other.mShortcutInfo.getId())); } } Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/NotificationPersonExtractorPlugin.java +3 −3 Original line number Diff line number Diff line Loading @@ -68,14 +68,14 @@ public interface NotificationPersonExtractorPlugin extends Plugin { public final String key; public final CharSequence name; public final Drawable avatar; public final PendingIntent clickIntent; public final Runnable clickRunnable; public PersonData(String key, CharSequence name, Drawable avatar, PendingIntent clickIntent) { Runnable clickRunnable) { this.key = key; this.name = name; this.avatar = avatar; this.clickIntent = clickIntent; this.clickRunnable = clickRunnable; } } } packages/SystemUI/src/com/android/systemui/ForegroundServiceNotificationListener.java +2 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,8 @@ public class ForegroundServiceNotificationListener { public void onEntryRemoved( NotificationEntry entry, NotificationVisibility visibility, boolean removedByUser) { boolean removedByUser, int reason) { removeNotification(entry.getSbn()); } }); Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +2 −1 Original line number Diff line number Diff line Loading @@ -425,7 +425,8 @@ public class BubbleController implements ConfigurationController.ConfigurationLi public void onEntryRemoved( NotificationEntry entry, @android.annotation.Nullable NotificationVisibility visibility, boolean removedByUser) { boolean removedByUser, int reason) { BubbleController.this.onEntryRemoved(entry); } Loading packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java +14 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ import android.app.trust.TrustManager; import android.content.ContentResolver; import android.content.Context; import android.content.pm.IPackageManager; import android.content.pm.LauncherApps; import android.content.pm.PackageManager; import android.content.res.Resources; import android.hardware.SensorPrivacyManager; import android.media.AudioManager; Loading Loading @@ -167,6 +169,12 @@ public class SystemServicesModule { return LatencyTracker.getInstance(context); } @Singleton @Provides static LauncherApps provideLauncherApps(Context context) { return context.getSystemService(LauncherApps.class); } @SuppressLint("MissingPermission") @Singleton @Provides Loading @@ -182,6 +190,12 @@ public class SystemServicesModule { return context.getSystemService(NotificationManager.class); } @Singleton @Provides static PackageManager providePackageManager(Context context) { return context.getPackageManager(); } @Singleton @Provides static PackageManagerWrapper providePackageManagerWrapper() { Loading Loading
core/java/android/service/notification/NotificationListenerService.java +22 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.service.notification; import android.annotation.CurrentTimeMillisLong; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SdkConstant; import android.annotation.SystemApi; import android.annotation.TestApi; Loading @@ -37,6 +38,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.ParceledListSlice; import android.content.pm.ShortcutInfo; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; Loading @@ -53,6 +55,7 @@ import android.os.ServiceManager; import android.os.UserHandle; import android.util.ArrayMap; import android.util.Log; import android.util.Slog; import android.widget.RemoteViews; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -1566,6 +1569,7 @@ public abstract class NotificationListenerService extends Service { private boolean mCanBubble; private boolean mVisuallyInterruptive; private boolean mIsConversation; private ShortcutInfo mShortcutInfo; private static final int PARCEL_VERSION = 2; Loading Loading @@ -1599,6 +1603,7 @@ public abstract class NotificationListenerService extends Service { out.writeBoolean(mCanBubble); out.writeBoolean(mVisuallyInterruptive); out.writeBoolean(mIsConversation); out.writeParcelable(mShortcutInfo, flags); } /** @hide */ Loading @@ -1620,7 +1625,7 @@ public abstract class NotificationListenerService extends Service { mImportance = in.readInt(); mImportanceExplanation = in.readCharSequence(); // may be null mOverrideGroupKey = in.readString(); // may be null mChannel = (NotificationChannel) in.readParcelable(cl); // may be null mChannel = in.readParcelable(cl); // may be null mOverridePeople = in.createStringArrayList(); mSnoozeCriteria = in.createTypedArrayList(SnoozeCriterion.CREATOR); mShowBadge = in.readBoolean(); Loading @@ -1633,6 +1638,7 @@ public abstract class NotificationListenerService extends Service { mCanBubble = in.readBoolean(); mVisuallyInterruptive = in.readBoolean(); mIsConversation = in.readBoolean(); mShortcutInfo = in.readParcelable(cl); } Loading Loading @@ -1837,6 +1843,13 @@ public abstract class NotificationListenerService extends Service { return mIsConversation; } /** * @hide */ public @Nullable ShortcutInfo getShortcutInfo() { return mShortcutInfo; } /** * @hide */ Loading @@ -1849,7 +1862,7 @@ public abstract class NotificationListenerService extends Service { int userSentiment, boolean hidden, long lastAudiblyAlertedMs, boolean noisy, ArrayList<Notification.Action> smartActions, ArrayList<CharSequence> smartReplies, boolean canBubble, boolean visuallyInterruptive, boolean isConversation) { boolean visuallyInterruptive, boolean isConversation, ShortcutInfo shortcutInfo) { mKey = key; mRank = rank; mIsAmbient = importance < NotificationManager.IMPORTANCE_LOW; Loading @@ -1872,6 +1885,7 @@ public abstract class NotificationListenerService extends Service { mCanBubble = canBubble; mVisuallyInterruptive = visuallyInterruptive; mIsConversation = isConversation; mShortcutInfo = shortcutInfo; } /** Loading @@ -1898,7 +1912,8 @@ public abstract class NotificationListenerService extends Service { other.mSmartReplies, other.mCanBubble, other.mVisuallyInterruptive, other.mIsConversation); other.mIsConversation, other.mShortcutInfo); } /** Loading Loading @@ -1952,7 +1967,10 @@ public abstract class NotificationListenerService extends Service { && Objects.equals(mSmartReplies, other.mSmartReplies) && Objects.equals(mCanBubble, other.mCanBubble) && Objects.equals(mVisuallyInterruptive, other.mVisuallyInterruptive) && Objects.equals(mIsConversation, other.mIsConversation); && Objects.equals(mIsConversation, other.mIsConversation) // Shortcutinfo doesn't have equals either; use id && Objects.equals((mShortcutInfo == null ? 0 : mShortcutInfo.getId()), (other.mShortcutInfo == null ? 0 : other.mShortcutInfo.getId())); } } Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/NotificationPersonExtractorPlugin.java +3 −3 Original line number Diff line number Diff line Loading @@ -68,14 +68,14 @@ public interface NotificationPersonExtractorPlugin extends Plugin { public final String key; public final CharSequence name; public final Drawable avatar; public final PendingIntent clickIntent; public final Runnable clickRunnable; public PersonData(String key, CharSequence name, Drawable avatar, PendingIntent clickIntent) { Runnable clickRunnable) { this.key = key; this.name = name; this.avatar = avatar; this.clickIntent = clickIntent; this.clickRunnable = clickRunnable; } } }
packages/SystemUI/src/com/android/systemui/ForegroundServiceNotificationListener.java +2 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,8 @@ public class ForegroundServiceNotificationListener { public void onEntryRemoved( NotificationEntry entry, NotificationVisibility visibility, boolean removedByUser) { boolean removedByUser, int reason) { removeNotification(entry.getSbn()); } }); Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +2 −1 Original line number Diff line number Diff line Loading @@ -425,7 +425,8 @@ public class BubbleController implements ConfigurationController.ConfigurationLi public void onEntryRemoved( NotificationEntry entry, @android.annotation.Nullable NotificationVisibility visibility, boolean removedByUser) { boolean removedByUser, int reason) { BubbleController.this.onEntryRemoved(entry); } Loading
packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java +14 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ import android.app.trust.TrustManager; import android.content.ContentResolver; import android.content.Context; import android.content.pm.IPackageManager; import android.content.pm.LauncherApps; import android.content.pm.PackageManager; import android.content.res.Resources; import android.hardware.SensorPrivacyManager; import android.media.AudioManager; Loading Loading @@ -167,6 +169,12 @@ public class SystemServicesModule { return LatencyTracker.getInstance(context); } @Singleton @Provides static LauncherApps provideLauncherApps(Context context) { return context.getSystemService(LauncherApps.class); } @SuppressLint("MissingPermission") @Singleton @Provides Loading @@ -182,6 +190,12 @@ public class SystemServicesModule { return context.getSystemService(NotificationManager.class); } @Singleton @Provides static PackageManager providePackageManager(Context context) { return context.getPackageManager(); } @Singleton @Provides static PackageManagerWrapper providePackageManagerWrapper() { Loading