Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import android.content.pm.LauncherApps; import android.content.pm.LauncherApps; import android.content.pm.ShortcutManager; import android.content.pm.ShortcutManager; import android.os.Handler; import android.os.Handler; import android.os.UserManager; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityManager; import com.android.internal.logging.UiEventLogger; import com.android.internal.logging.UiEventLogger; Loading Loading @@ -133,6 +134,7 @@ public interface NotificationsModule { HighPriorityProvider highPriorityProvider, HighPriorityProvider highPriorityProvider, INotificationManager notificationManager, INotificationManager notificationManager, NotificationEntryManager notificationEntryManager, NotificationEntryManager notificationEntryManager, UserManager userManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, LauncherApps launcherApps, LauncherApps launcherApps, ShortcutManager shortcutManager, ShortcutManager shortcutManager, Loading @@ -152,6 +154,7 @@ public interface NotificationsModule { highPriorityProvider, highPriorityProvider, notificationManager, notificationManager, notificationEntryManager, notificationEntryManager, userManager, peopleSpaceWidgetManager, peopleSpaceWidgetManager, launcherApps, launcherApps, shortcutManager, shortcutManager, Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -48,6 +48,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Handler; import android.os.RemoteException; import android.os.RemoteException; import android.os.UserHandle; import android.os.UserHandle; import android.os.UserManager; import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import android.text.TextUtils; import android.transition.ChangeBounds; import android.transition.ChangeBounds; Loading Loading @@ -118,6 +119,8 @@ public class NotificationConversationInfo extends LinearLayout implements private NotificationGuts mGutsContainer; private NotificationGuts mGutsContainer; private OnConversationSettingsClickListener mOnConversationSettingsClickListener; private OnConversationSettingsClickListener mOnConversationSettingsClickListener; private UserManager mUm; @VisibleForTesting @VisibleForTesting boolean mSkipPost = false; boolean mSkipPost = false; private int mActualHeight; private int mActualHeight; Loading Loading @@ -155,8 +158,10 @@ public class NotificationConversationInfo extends LinearLayout implements // People Tile add request. // People Tile add request. if (mSelectedAction == ACTION_FAVORITE && getPriority() != mSelectedAction) { if (mSelectedAction == ACTION_FAVORITE && getPriority() != mSelectedAction) { mShadeController.animateCollapsePanels(); mShadeController.animateCollapsePanels(); if (mUm.isSameProfileGroup(UserHandle.USER_SYSTEM, mSbn.getNormalizedUserId())) { mPeopleSpaceWidgetManager.requestPinAppWidget(mShortcutInfo, new Bundle()); mPeopleSpaceWidgetManager.requestPinAppWidget(mShortcutInfo, new Bundle()); } } } mGutsContainer.closeControls(v, true); mGutsContainer.closeControls(v, true); }; }; Loading Loading @@ -189,6 +194,7 @@ public class NotificationConversationInfo extends LinearLayout implements @Action int selectedAction, @Action int selectedAction, ShortcutManager shortcutManager, ShortcutManager shortcutManager, PackageManager pm, PackageManager pm, UserManager um, PeopleSpaceWidgetManager peopleSpaceWidgetManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, INotificationManager iNotificationManager, INotificationManager iNotificationManager, OnUserInteractionCallback onUserInteractionCallback, OnUserInteractionCallback onUserInteractionCallback, Loading @@ -214,6 +220,7 @@ public class NotificationConversationInfo extends LinearLayout implements mEntry = entry; mEntry = entry; mSbn = entry.getSbn(); mSbn = entry.getSbn(); mPm = pm; mPm = pm; mUm = um; mAppName = mPackageName; mAppName = mPackageName; mOnSettingsClickListener = onSettingsClick; mOnSettingsClickListener = onSettingsClick; mNotificationChannel = notificationChannel; mNotificationChannel = notificationChannel; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Bundle; import android.os.Handler; import android.os.Handler; import android.os.UserHandle; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification; import android.util.ArraySet; import android.util.ArraySet; Loading Loading @@ -124,6 +125,9 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx private final INotificationManager mNotificationManager; private final INotificationManager mNotificationManager; private final NotificationEntryManager mNotificationEntryManager; private final NotificationEntryManager mNotificationEntryManager; private final PeopleSpaceWidgetManager mPeopleSpaceWidgetManager; private final PeopleSpaceWidgetManager mPeopleSpaceWidgetManager; private final UserManager mUserManager; private final LauncherApps mLauncherApps; private final LauncherApps mLauncherApps; private final ShortcutManager mShortcutManager; private final ShortcutManager mShortcutManager; private final UserContextProvider mContextTracker; private final UserContextProvider mContextTracker; Loading @@ -142,6 +146,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx HighPriorityProvider highPriorityProvider, HighPriorityProvider highPriorityProvider, INotificationManager notificationManager, INotificationManager notificationManager, NotificationEntryManager notificationEntryManager, NotificationEntryManager notificationEntryManager, UserManager userManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, LauncherApps launcherApps, LauncherApps launcherApps, ShortcutManager shortcutManager, ShortcutManager shortcutManager, Loading @@ -160,6 +165,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx mHighPriorityProvider = highPriorityProvider; mHighPriorityProvider = highPriorityProvider; mNotificationManager = notificationManager; mNotificationManager = notificationManager; mNotificationEntryManager = notificationEntryManager; mNotificationEntryManager = notificationEntryManager; mUserManager = userManager; mPeopleSpaceWidgetManager = peopleSpaceWidgetManager; mPeopleSpaceWidgetManager = peopleSpaceWidgetManager; mLauncherApps = launcherApps; mLauncherApps = launcherApps; mShortcutManager = shortcutManager; mShortcutManager = shortcutManager; Loading Loading @@ -482,6 +488,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx notificationInfoView.getSelectedAction(), notificationInfoView.getSelectedAction(), mShortcutManager, mShortcutManager, pmUser, pmUser, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mNotificationManager, mNotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java +71 −0 Original line number Original line Diff line number Diff line Loading @@ -62,6 +62,7 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.graphics.drawable.Icon; import android.os.Handler; import android.os.Handler; import android.os.UserHandle; import android.os.UserHandle; import android.os.UserManager; import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification; import android.test.suitebuilder.annotation.SmallTest; import android.test.suitebuilder.annotation.SmallTest; import android.testing.AndroidTestingRunner; import android.testing.AndroidTestingRunner; Loading Loading @@ -132,6 +133,8 @@ public class NotificationConversationInfoTest extends SysuiTestCase { @Mock @Mock private PackageManager mMockPackageManager; private PackageManager mMockPackageManager; @Mock @Mock private UserManager mUserManager; @Mock private OnUserInteractionCallback mOnUserInteractionCallback; private OnUserInteractionCallback mOnUserInteractionCallback; @Mock @Mock private BubblesManager mBubblesManager; private BubblesManager mBubblesManager; Loading Loading @@ -239,6 +242,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -264,6 +268,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -317,6 +322,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -343,6 +349,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -368,6 +375,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -404,6 +412,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -430,6 +439,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -460,6 +470,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -485,6 +496,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -514,6 +526,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -543,6 +556,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -575,6 +589,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -613,6 +628,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -642,6 +658,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -678,6 +695,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -707,6 +725,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -752,6 +771,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -796,6 +816,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -841,6 +862,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -879,6 +901,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -916,6 +939,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -957,6 +981,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, // no action selected by default -1, // no action selected by default mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -988,6 +1013,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { NotificationConversationInfo.ACTION_FAVORITE, // "Favorite" selected by default NotificationConversationInfo.ACTION_FAVORITE, // "Favorite" selected by default mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1018,6 +1044,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1055,6 +1082,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1092,6 +1120,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1128,6 +1157,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1163,6 +1193,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -1189,6 +1220,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -1210,12 +1242,14 @@ public class NotificationConversationInfoTest extends SysuiTestCase { @Test @Test public void testSelectPriorityRequestsPinPeopleTile() { public void testSelectPriorityRequestsPinPeopleTile() { when(mUserManager.isSameProfileGroup(anyInt(), anyInt())).thenReturn(true); //WHEN channel is default importance //WHEN channel is default importance mNotificationChannel.setImportantConversation(false); mNotificationChannel.setImportantConversation(false); mNotificationInfo.bindNotification( mNotificationInfo.bindNotification( -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -1241,12 +1275,48 @@ public class NotificationConversationInfoTest extends SysuiTestCase { verify(mPeopleSpaceWidgetManager, times(1)).requestPinAppWidget(any(), any()); verify(mPeopleSpaceWidgetManager, times(1)).requestPinAppWidget(any(), any()); } } @Test public void testSelectPriorityRequestsPinPeopleTile_noMultiuser() { when(mUserManager.isSameProfileGroup(anyInt(), anyInt())).thenReturn(false); //WHEN channel is default importance mNotificationChannel.setImportantConversation(false); mNotificationInfo.bindNotification( -1, mShortcutManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mOnUserInteractionCallback, TEST_PACKAGE_NAME, mNotificationChannel, mEntry, mBubbleMetadata, null, mIconFactory, mContext, true, mTestHandler, mTestHandler, null, Optional.of(mBubblesManager), mShadeController); // WHEN user clicks "priority" mNotificationInfo.setSelectedAction(NotificationConversationInfo.ACTION_FAVORITE); // and then done mNotificationInfo.findViewById(R.id.done).performClick(); // No widget prompt; on a secondary user verify(mPeopleSpaceWidgetManager, never()).requestPinAppWidget(any(), any()); } @Test @Test public void testSelectDefaultDoesNotRequestPinPeopleTile() { public void testSelectDefaultDoesNotRequestPinPeopleTile() { mNotificationInfo.bindNotification( mNotificationInfo.bindNotification( -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1282,6 +1352,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -54,6 +54,7 @@ import android.content.pm.ShortcutManager; import android.graphics.Color; import android.graphics.Color; import android.os.Binder; import android.os.Binder; import android.os.Handler; import android.os.Handler; import android.os.UserManager; import android.provider.Settings; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification; import android.testing.AndroidTestingRunner; import android.testing.AndroidTestingRunner; Loading Loading @@ -141,6 +142,8 @@ public class NotificationGutsManagerTest extends SysuiTestCase { @Mock private PeopleSpaceWidgetManager mPeopleSpaceWidgetManager; @Mock private PeopleSpaceWidgetManager mPeopleSpaceWidgetManager; @Mock private AssistantFeedbackController mAssistantFeedbackController; @Mock private AssistantFeedbackController mAssistantFeedbackController; @Mock private UserManager mUserManager; @Before @Before public void setUp() { public void setUp() { mTestableLooper = TestableLooper.get(this); mTestableLooper = TestableLooper.get(this); Loading @@ -158,7 +161,8 @@ public class NotificationGutsManagerTest extends SysuiTestCase { mGutsManager = new NotificationGutsManager(mContext, mGutsManager = new NotificationGutsManager(mContext, () -> mStatusBar, mHandler, mHandler, mAccessibilityManager, mHighPriorityProvider, () -> mStatusBar, mHandler, mHandler, mAccessibilityManager, mHighPriorityProvider, mINotificationManager, mNotificationEntryManager, mPeopleSpaceWidgetManager, mINotificationManager, mNotificationEntryManager, mUserManager, mPeopleSpaceWidgetManager, mLauncherApps, mShortcutManager, mChannelEditorDialogController, mContextTracker, mLauncherApps, mShortcutManager, mChannelEditorDialogController, mContextTracker, mAssistantFeedbackController, Optional.of(mBubblesManager), mAssistantFeedbackController, Optional.of(mBubblesManager), new UiEventLoggerFake(), mOnUserInteractionCallback, mShadeController); new UiEventLoggerFake(), mOnUserInteractionCallback, mShadeController); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import android.content.pm.LauncherApps; import android.content.pm.LauncherApps; import android.content.pm.ShortcutManager; import android.content.pm.ShortcutManager; import android.os.Handler; import android.os.Handler; import android.os.UserManager; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityManager; import com.android.internal.logging.UiEventLogger; import com.android.internal.logging.UiEventLogger; Loading Loading @@ -133,6 +134,7 @@ public interface NotificationsModule { HighPriorityProvider highPriorityProvider, HighPriorityProvider highPriorityProvider, INotificationManager notificationManager, INotificationManager notificationManager, NotificationEntryManager notificationEntryManager, NotificationEntryManager notificationEntryManager, UserManager userManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, LauncherApps launcherApps, LauncherApps launcherApps, ShortcutManager shortcutManager, ShortcutManager shortcutManager, Loading @@ -152,6 +154,7 @@ public interface NotificationsModule { highPriorityProvider, highPriorityProvider, notificationManager, notificationManager, notificationEntryManager, notificationEntryManager, userManager, peopleSpaceWidgetManager, peopleSpaceWidgetManager, launcherApps, launcherApps, shortcutManager, shortcutManager, Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -48,6 +48,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Handler; import android.os.RemoteException; import android.os.RemoteException; import android.os.UserHandle; import android.os.UserHandle; import android.os.UserManager; import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import android.text.TextUtils; import android.transition.ChangeBounds; import android.transition.ChangeBounds; Loading Loading @@ -118,6 +119,8 @@ public class NotificationConversationInfo extends LinearLayout implements private NotificationGuts mGutsContainer; private NotificationGuts mGutsContainer; private OnConversationSettingsClickListener mOnConversationSettingsClickListener; private OnConversationSettingsClickListener mOnConversationSettingsClickListener; private UserManager mUm; @VisibleForTesting @VisibleForTesting boolean mSkipPost = false; boolean mSkipPost = false; private int mActualHeight; private int mActualHeight; Loading Loading @@ -155,8 +158,10 @@ public class NotificationConversationInfo extends LinearLayout implements // People Tile add request. // People Tile add request. if (mSelectedAction == ACTION_FAVORITE && getPriority() != mSelectedAction) { if (mSelectedAction == ACTION_FAVORITE && getPriority() != mSelectedAction) { mShadeController.animateCollapsePanels(); mShadeController.animateCollapsePanels(); if (mUm.isSameProfileGroup(UserHandle.USER_SYSTEM, mSbn.getNormalizedUserId())) { mPeopleSpaceWidgetManager.requestPinAppWidget(mShortcutInfo, new Bundle()); mPeopleSpaceWidgetManager.requestPinAppWidget(mShortcutInfo, new Bundle()); } } } mGutsContainer.closeControls(v, true); mGutsContainer.closeControls(v, true); }; }; Loading Loading @@ -189,6 +194,7 @@ public class NotificationConversationInfo extends LinearLayout implements @Action int selectedAction, @Action int selectedAction, ShortcutManager shortcutManager, ShortcutManager shortcutManager, PackageManager pm, PackageManager pm, UserManager um, PeopleSpaceWidgetManager peopleSpaceWidgetManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, INotificationManager iNotificationManager, INotificationManager iNotificationManager, OnUserInteractionCallback onUserInteractionCallback, OnUserInteractionCallback onUserInteractionCallback, Loading @@ -214,6 +220,7 @@ public class NotificationConversationInfo extends LinearLayout implements mEntry = entry; mEntry = entry; mSbn = entry.getSbn(); mSbn = entry.getSbn(); mPm = pm; mPm = pm; mUm = um; mAppName = mPackageName; mAppName = mPackageName; mOnSettingsClickListener = onSettingsClick; mOnSettingsClickListener = onSettingsClick; mNotificationChannel = notificationChannel; mNotificationChannel = notificationChannel; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Bundle; import android.os.Handler; import android.os.Handler; import android.os.UserHandle; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification; import android.util.ArraySet; import android.util.ArraySet; Loading Loading @@ -124,6 +125,9 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx private final INotificationManager mNotificationManager; private final INotificationManager mNotificationManager; private final NotificationEntryManager mNotificationEntryManager; private final NotificationEntryManager mNotificationEntryManager; private final PeopleSpaceWidgetManager mPeopleSpaceWidgetManager; private final PeopleSpaceWidgetManager mPeopleSpaceWidgetManager; private final UserManager mUserManager; private final LauncherApps mLauncherApps; private final LauncherApps mLauncherApps; private final ShortcutManager mShortcutManager; private final ShortcutManager mShortcutManager; private final UserContextProvider mContextTracker; private final UserContextProvider mContextTracker; Loading @@ -142,6 +146,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx HighPriorityProvider highPriorityProvider, HighPriorityProvider highPriorityProvider, INotificationManager notificationManager, INotificationManager notificationManager, NotificationEntryManager notificationEntryManager, NotificationEntryManager notificationEntryManager, UserManager userManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, PeopleSpaceWidgetManager peopleSpaceWidgetManager, LauncherApps launcherApps, LauncherApps launcherApps, ShortcutManager shortcutManager, ShortcutManager shortcutManager, Loading @@ -160,6 +165,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx mHighPriorityProvider = highPriorityProvider; mHighPriorityProvider = highPriorityProvider; mNotificationManager = notificationManager; mNotificationManager = notificationManager; mNotificationEntryManager = notificationEntryManager; mNotificationEntryManager = notificationEntryManager; mUserManager = userManager; mPeopleSpaceWidgetManager = peopleSpaceWidgetManager; mPeopleSpaceWidgetManager = peopleSpaceWidgetManager; mLauncherApps = launcherApps; mLauncherApps = launcherApps; mShortcutManager = shortcutManager; mShortcutManager = shortcutManager; Loading Loading @@ -482,6 +488,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx notificationInfoView.getSelectedAction(), notificationInfoView.getSelectedAction(), mShortcutManager, mShortcutManager, pmUser, pmUser, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mNotificationManager, mNotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java +71 −0 Original line number Original line Diff line number Diff line Loading @@ -62,6 +62,7 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.graphics.drawable.Icon; import android.os.Handler; import android.os.Handler; import android.os.UserHandle; import android.os.UserHandle; import android.os.UserManager; import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification; import android.test.suitebuilder.annotation.SmallTest; import android.test.suitebuilder.annotation.SmallTest; import android.testing.AndroidTestingRunner; import android.testing.AndroidTestingRunner; Loading Loading @@ -132,6 +133,8 @@ public class NotificationConversationInfoTest extends SysuiTestCase { @Mock @Mock private PackageManager mMockPackageManager; private PackageManager mMockPackageManager; @Mock @Mock private UserManager mUserManager; @Mock private OnUserInteractionCallback mOnUserInteractionCallback; private OnUserInteractionCallback mOnUserInteractionCallback; @Mock @Mock private BubblesManager mBubblesManager; private BubblesManager mBubblesManager; Loading Loading @@ -239,6 +242,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -264,6 +268,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -317,6 +322,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -343,6 +349,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -368,6 +375,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -404,6 +412,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -430,6 +439,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -460,6 +470,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -485,6 +496,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -514,6 +526,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -543,6 +556,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -575,6 +589,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -613,6 +628,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -642,6 +658,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -678,6 +695,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -707,6 +725,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -752,6 +771,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -796,6 +816,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -841,6 +862,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -879,6 +901,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -916,6 +939,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -957,6 +981,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, // no action selected by default -1, // no action selected by default mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -988,6 +1013,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { NotificationConversationInfo.ACTION_FAVORITE, // "Favorite" selected by default NotificationConversationInfo.ACTION_FAVORITE, // "Favorite" selected by default mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1018,6 +1044,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1055,6 +1082,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1092,6 +1120,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1128,6 +1157,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1163,6 +1193,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -1189,6 +1220,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -1210,12 +1242,14 @@ public class NotificationConversationInfoTest extends SysuiTestCase { @Test @Test public void testSelectPriorityRequestsPinPeopleTile() { public void testSelectPriorityRequestsPinPeopleTile() { when(mUserManager.isSameProfileGroup(anyInt(), anyInt())).thenReturn(true); //WHEN channel is default importance //WHEN channel is default importance mNotificationChannel.setImportantConversation(false); mNotificationChannel.setImportantConversation(false); mNotificationInfo.bindNotification( mNotificationInfo.bindNotification( -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading @@ -1241,12 +1275,48 @@ public class NotificationConversationInfoTest extends SysuiTestCase { verify(mPeopleSpaceWidgetManager, times(1)).requestPinAppWidget(any(), any()); verify(mPeopleSpaceWidgetManager, times(1)).requestPinAppWidget(any(), any()); } } @Test public void testSelectPriorityRequestsPinPeopleTile_noMultiuser() { when(mUserManager.isSameProfileGroup(anyInt(), anyInt())).thenReturn(false); //WHEN channel is default importance mNotificationChannel.setImportantConversation(false); mNotificationInfo.bindNotification( -1, mShortcutManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mOnUserInteractionCallback, TEST_PACKAGE_NAME, mNotificationChannel, mEntry, mBubbleMetadata, null, mIconFactory, mContext, true, mTestHandler, mTestHandler, null, Optional.of(mBubblesManager), mShadeController); // WHEN user clicks "priority" mNotificationInfo.setSelectedAction(NotificationConversationInfo.ACTION_FAVORITE); // and then done mNotificationInfo.findViewById(R.id.done).performClick(); // No widget prompt; on a secondary user verify(mPeopleSpaceWidgetManager, never()).requestPinAppWidget(any(), any()); } @Test @Test public void testSelectDefaultDoesNotRequestPinPeopleTile() { public void testSelectDefaultDoesNotRequestPinPeopleTile() { mNotificationInfo.bindNotification( mNotificationInfo.bindNotification( -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading Loading @@ -1282,6 +1352,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { -1, -1, mShortcutManager, mShortcutManager, mMockPackageManager, mMockPackageManager, mUserManager, mPeopleSpaceWidgetManager, mPeopleSpaceWidgetManager, mMockINotificationManager, mMockINotificationManager, mOnUserInteractionCallback, mOnUserInteractionCallback, Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -54,6 +54,7 @@ import android.content.pm.ShortcutManager; import android.graphics.Color; import android.graphics.Color; import android.os.Binder; import android.os.Binder; import android.os.Handler; import android.os.Handler; import android.os.UserManager; import android.provider.Settings; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification; import android.testing.AndroidTestingRunner; import android.testing.AndroidTestingRunner; Loading Loading @@ -141,6 +142,8 @@ public class NotificationGutsManagerTest extends SysuiTestCase { @Mock private PeopleSpaceWidgetManager mPeopleSpaceWidgetManager; @Mock private PeopleSpaceWidgetManager mPeopleSpaceWidgetManager; @Mock private AssistantFeedbackController mAssistantFeedbackController; @Mock private AssistantFeedbackController mAssistantFeedbackController; @Mock private UserManager mUserManager; @Before @Before public void setUp() { public void setUp() { mTestableLooper = TestableLooper.get(this); mTestableLooper = TestableLooper.get(this); Loading @@ -158,7 +161,8 @@ public class NotificationGutsManagerTest extends SysuiTestCase { mGutsManager = new NotificationGutsManager(mContext, mGutsManager = new NotificationGutsManager(mContext, () -> mStatusBar, mHandler, mHandler, mAccessibilityManager, mHighPriorityProvider, () -> mStatusBar, mHandler, mHandler, mAccessibilityManager, mHighPriorityProvider, mINotificationManager, mNotificationEntryManager, mPeopleSpaceWidgetManager, mINotificationManager, mNotificationEntryManager, mUserManager, mPeopleSpaceWidgetManager, mLauncherApps, mShortcutManager, mChannelEditorDialogController, mContextTracker, mLauncherApps, mShortcutManager, mChannelEditorDialogController, mContextTracker, mAssistantFeedbackController, Optional.of(mBubblesManager), mAssistantFeedbackController, Optional.of(mBubblesManager), new UiEventLoggerFake(), mOnUserInteractionCallback, mShadeController); new UiEventLoggerFake(), mOnUserInteractionCallback, mShadeController); Loading