Merge "Add animation when conversation priority changes" into rvc-dev am: 511b7fde3c
Change-Id: I18081f27dc92189f0ee7fb78c8e93ab50cc52a5e
This commit is contained in:
@@ -41,6 +41,7 @@ import android.app.Notification.MessagingStyle.Message;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager.Policy;
|
||||
import android.app.Person;
|
||||
import android.app.RemoteInput;
|
||||
import android.app.RemoteInputHistoryItem;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
@@ -69,6 +70,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
|
||||
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowController;
|
||||
import com.android.systemui.statusbar.notification.row.NotificationGuts;
|
||||
import com.android.systemui.statusbar.notification.stack.PriorityBucket;
|
||||
import com.android.systemui.statusbar.phone.NotificationGroupManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -132,7 +134,7 @@ public final class NotificationEntry extends ListEntry {
|
||||
private ShortcutInfo mShortcutInfo;
|
||||
|
||||
/**
|
||||
* If {@link android.app.RemoteInput#getEditChoicesBeforeSending} is enabled, and the user is
|
||||
* If {@link RemoteInput#getEditChoicesBeforeSending} is enabled, and the user is
|
||||
* currently editing a choice (smart reply), then this field contains the information about the
|
||||
* suggestion being edited. Otherwise <code>null</code>.
|
||||
*/
|
||||
@@ -174,6 +176,8 @@ public final class NotificationEntry extends ListEntry {
|
||||
private boolean mPulseSupressed;
|
||||
private boolean mAllowFgsDismissal;
|
||||
private int mBucket = BUCKET_ALERTING;
|
||||
@Nullable private Long mPendingAnimationDuration;
|
||||
private boolean mIsMarkedForUserTriggeredMovement;
|
||||
|
||||
/**
|
||||
* @param sbn the StatusBarNotification from system server
|
||||
@@ -193,7 +197,7 @@ public final class NotificationEntry extends ListEntry {
|
||||
boolean allowFgsDismissal,
|
||||
long creationTime
|
||||
) {
|
||||
super(requireNonNull(Objects.requireNonNull(sbn).getKey()));
|
||||
super(requireNonNull(requireNonNull(sbn).getKey()));
|
||||
|
||||
requireNonNull(ranking);
|
||||
|
||||
@@ -441,7 +445,7 @@ public final class NotificationEntry extends ListEntry {
|
||||
* Get the children that are actually attached to this notification's row.
|
||||
*
|
||||
* TODO: Seems like most callers here should probably be using
|
||||
* {@link com.android.systemui.statusbar.phone.NotificationGroupManager#getChildren}
|
||||
* {@link NotificationGroupManager#getChildren}
|
||||
*/
|
||||
public @Nullable List<NotificationEntry> getAttachedNotifChildren() {
|
||||
if (row == null) {
|
||||
@@ -809,7 +813,7 @@ public final class NotificationEntry extends ListEntry {
|
||||
}
|
||||
|
||||
if ((mSbn.getNotification().flags
|
||||
& Notification.FLAG_FOREGROUND_SERVICE) != 0) {
|
||||
& FLAG_FOREGROUND_SERVICE) != 0) {
|
||||
return true;
|
||||
}
|
||||
if (mSbn.getNotification().isMediaNotification()) {
|
||||
@@ -942,6 +946,19 @@ public final class NotificationEntry extends ListEntry {
|
||||
mPulseSupressed = suppressed;
|
||||
}
|
||||
|
||||
/** Whether or not this entry has been marked for a user-triggered movement. */
|
||||
public boolean isMarkedForUserTriggeredMovement() {
|
||||
return mIsMarkedForUserTriggeredMovement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark this entry for movement triggered by a user action (ex: changing the priorirty of a
|
||||
* conversation). This can then be used for custom animations.
|
||||
*/
|
||||
public void markForUserTriggeredMovement(boolean marked) {
|
||||
mIsMarkedForUserTriggeredMovement = marked;
|
||||
}
|
||||
|
||||
/** Information about a suggestion that is being edited. */
|
||||
public static class EditedSuggestionInfo {
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import android.view.accessibility.AccessibilityManager;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.dagger.qualifiers.Background;
|
||||
import com.android.systemui.dagger.qualifiers.Main;
|
||||
import com.android.systemui.dagger.qualifiers.UiBackground;
|
||||
import com.android.systemui.plugins.statusbar.StatusBarStateController;
|
||||
@@ -105,6 +106,7 @@ public interface NotificationsModule {
|
||||
VisualStabilityManager visualStabilityManager,
|
||||
Lazy<StatusBar> statusBarLazy,
|
||||
@Main Handler mainHandler,
|
||||
@Background Handler bgHandler,
|
||||
AccessibilityManager accessibilityManager,
|
||||
HighPriorityProvider highPriorityProvider,
|
||||
INotificationManager notificationManager,
|
||||
@@ -118,6 +120,7 @@ public interface NotificationsModule {
|
||||
visualStabilityManager,
|
||||
statusBarLazy,
|
||||
mainHandler,
|
||||
bgHandler,
|
||||
accessibilityManager,
|
||||
highPriorityProvider,
|
||||
notificationManager,
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.systemui.statusbar.notification.row;
|
||||
|
||||
import static android.app.Notification.EXTRA_IS_GROUP_CONVERSATION;
|
||||
import static android.app.NotificationManager.BUBBLE_PREFERENCE_ALL;
|
||||
import static android.app.NotificationManager.BUBBLE_PREFERENCE_NONE;
|
||||
import static android.app.NotificationManager.BUBBLE_PREFERENCE_SELECTED;
|
||||
@@ -43,9 +42,7 @@ import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.content.pm.ShortcutManager;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Handler;
|
||||
import android.os.Parcelable;
|
||||
import android.os.RemoteException;
|
||||
import android.provider.Settings;
|
||||
import android.service.notification.StatusBarNotification;
|
||||
@@ -65,15 +62,16 @@ import android.widget.TextView;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settingslib.notification.ConversationIconFactory;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.Prefs;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.dagger.qualifiers.Background;
|
||||
import com.android.systemui.dagger.qualifiers.Main;
|
||||
import com.android.systemui.statusbar.notification.NotificationChannelHelper;
|
||||
import com.android.systemui.statusbar.notification.VisualStabilityManager;
|
||||
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
|
||||
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Provider;
|
||||
|
||||
@@ -86,10 +84,12 @@ public class NotificationConversationInfo extends LinearLayout implements
|
||||
|
||||
|
||||
private INotificationManager mINotificationManager;
|
||||
ShortcutManager mShortcutManager;
|
||||
private ShortcutManager mShortcutManager;
|
||||
private PackageManager mPm;
|
||||
private ConversationIconFactory mIconFactory;
|
||||
private VisualStabilityManager mVisualStabilityManager;
|
||||
private Handler mMainHandler;
|
||||
private Handler mBgHandler;
|
||||
|
||||
private String mPackageName;
|
||||
private String mAppName;
|
||||
@@ -97,6 +97,7 @@ public class NotificationConversationInfo extends LinearLayout implements
|
||||
private String mDelegatePkg;
|
||||
private NotificationChannel mNotificationChannel;
|
||||
private ShortcutInfo mShortcutInfo;
|
||||
private NotificationEntry mEntry;
|
||||
private StatusBarNotification mSbn;
|
||||
@Nullable private Notification.BubbleMetadata mBubbleMetadata;
|
||||
private Context mUserContext;
|
||||
@@ -213,11 +214,14 @@ public class NotificationConversationInfo extends LinearLayout implements
|
||||
ConversationIconFactory conversationIconFactory,
|
||||
Context userContext,
|
||||
Provider<PriorityOnboardingDialogController.Builder> builderProvider,
|
||||
boolean isDeviceProvisioned) {
|
||||
boolean isDeviceProvisioned,
|
||||
@Main Handler mainHandler,
|
||||
@Background Handler bgHandler) {
|
||||
mSelectedAction = -1;
|
||||
mINotificationManager = iNotificationManager;
|
||||
mVisualStabilityManager = visualStabilityManager;
|
||||
mPackageName = pkg;
|
||||
mEntry = entry;
|
||||
mSbn = entry.getSbn();
|
||||
mPm = pm;
|
||||
mAppName = mPackageName;
|
||||
@@ -231,7 +235,8 @@ public class NotificationConversationInfo extends LinearLayout implements
|
||||
mUserContext = userContext;
|
||||
mBubbleMetadata = bubbleMetadata;
|
||||
mBuilderProvider = builderProvider;
|
||||
|
||||
mMainHandler = mainHandler;
|
||||
mBgHandler = bgHandler;
|
||||
mShortcutManager = shortcutManager;
|
||||
mShortcutInfo = entry.getRanking().getShortcutInfo();
|
||||
if (mShortcutInfo == null) {
|
||||
@@ -494,11 +499,13 @@ public class NotificationConversationInfo extends LinearLayout implements
|
||||
}
|
||||
|
||||
private void updateChannel() {
|
||||
Handler bgHandler = new Handler(Dependency.get(Dependency.BG_LOOPER));
|
||||
bgHandler.post(
|
||||
mBgHandler.post(
|
||||
new UpdateChannelRunnable(mINotificationManager, mPackageName,
|
||||
mAppUid, mSelectedAction, mNotificationChannel));
|
||||
mVisualStabilityManager.temporarilyAllowReordering();
|
||||
mMainHandler.postDelayed(() -> {
|
||||
mEntry.markForUserTriggeredMovement(true);
|
||||
mVisualStabilityManager.temporarilyAllowReordering();
|
||||
}, StackStateAnimator.ANIMATION_DURATION_STANDARD);
|
||||
}
|
||||
|
||||
private boolean shouldShowPriorityOnboarding() {
|
||||
|
||||
@@ -46,6 +46,7 @@ import com.android.settingslib.notification.ConversationIconFactory;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.Dumpable;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.dagger.qualifiers.Background;
|
||||
import com.android.systemui.dagger.qualifiers.Main;
|
||||
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
|
||||
import com.android.systemui.plugins.statusbar.StatusBarStateController;
|
||||
@@ -111,6 +112,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
|
||||
|
||||
private final Lazy<StatusBar> mStatusBarLazy;
|
||||
private final Handler mMainHandler;
|
||||
private final Handler mBgHandler;
|
||||
private Runnable mOpenRunnable;
|
||||
private final INotificationManager mNotificationManager;
|
||||
private final LauncherApps mLauncherApps;
|
||||
@@ -122,7 +124,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
|
||||
* Injected constructor. See {@link NotificationsModule}.
|
||||
*/
|
||||
public NotificationGutsManager(Context context, VisualStabilityManager visualStabilityManager,
|
||||
Lazy<StatusBar> statusBarLazy, @Main Handler mainHandler,
|
||||
Lazy<StatusBar> statusBarLazy, @Main Handler mainHandler, @Background Handler bgHandler,
|
||||
AccessibilityManager accessibilityManager,
|
||||
HighPriorityProvider highPriorityProvider,
|
||||
INotificationManager notificationManager,
|
||||
@@ -135,6 +137,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
|
||||
mVisualStabilityManager = visualStabilityManager;
|
||||
mStatusBarLazy = statusBarLazy;
|
||||
mMainHandler = mainHandler;
|
||||
mBgHandler = bgHandler;
|
||||
mAccessibilityManager = accessibilityManager;
|
||||
mHighPriorityProvider = highPriorityProvider;
|
||||
mNotificationManager = notificationManager;
|
||||
@@ -463,7 +466,9 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
|
||||
iconFactoryLoader,
|
||||
mContextTracker.getCurrentUserContext(),
|
||||
mBuilderProvider,
|
||||
mDeviceProvisionedController.isDeviceProvisioned());
|
||||
mDeviceProvisionedController.isDeviceProvisioned(),
|
||||
mMainHandler,
|
||||
mBgHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3655,8 +3655,19 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
@ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
|
||||
private void generatePositionChangeEvents() {
|
||||
for (ExpandableView child : mChildrenChangingPositions) {
|
||||
mAnimationEvents.add(new AnimationEvent(child,
|
||||
AnimationEvent.ANIMATION_TYPE_CHANGE_POSITION));
|
||||
Integer duration = null;
|
||||
if (child instanceof ExpandableNotificationRow) {
|
||||
ExpandableNotificationRow row = (ExpandableNotificationRow) child;
|
||||
if (row.getEntry().isMarkedForUserTriggeredMovement()) {
|
||||
duration = StackStateAnimator.ANIMATION_DURATION_PRIORITY_CHANGE;
|
||||
row.getEntry().markForUserTriggeredMovement(false);
|
||||
}
|
||||
}
|
||||
AnimationEvent animEvent = duration == null
|
||||
? new AnimationEvent(child, AnimationEvent.ANIMATION_TYPE_CHANGE_POSITION)
|
||||
: new AnimationEvent(
|
||||
child, AnimationEvent.ANIMATION_TYPE_CHANGE_POSITION, duration);
|
||||
mAnimationEvents.add(animEvent);
|
||||
}
|
||||
mChildrenChangingPositions.clear();
|
||||
if (mGenerateChildOrderChangedEvent) {
|
||||
|
||||
@@ -56,6 +56,7 @@ public class StackStateAnimator {
|
||||
public static final int ANIMATION_DURATION_PULSE_APPEAR =
|
||||
KeyguardSliceView.DEFAULT_ANIM_DURATION;
|
||||
public static final int ANIMATION_DURATION_BLOCKING_HELPER_FADE = 240;
|
||||
public static final int ANIMATION_DURATION_PRIORITY_CHANGE = 500;
|
||||
public static final int ANIMATION_DELAY_PER_ELEMENT_INTERRUPTING = 80;
|
||||
public static final int ANIMATION_DELAY_PER_ELEMENT_MANUAL = 32;
|
||||
public static final int ANIMATION_DELAY_PER_ELEMENT_GO_TO_FULL_SHADE = 48;
|
||||
|
||||
@@ -60,6 +60,7 @@ import android.content.pm.ShortcutInfo;
|
||||
import android.content.pm.ShortcutManager;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Handler;
|
||||
import android.os.UserHandle;
|
||||
import android.service.notification.StatusBarNotification;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
@@ -72,7 +73,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.settingslib.notification.ConversationIconFactory;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.Prefs;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.SysuiTestCase;
|
||||
@@ -153,13 +153,14 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
private Provider<PriorityOnboardingDialogController.Builder> mBuilderProvider = () -> mBuilder;
|
||||
@Mock
|
||||
private Notification.BubbleMetadata mBubbleMetadata;
|
||||
private Handler mTestHandler;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mTestableLooper = TestableLooper.get(this);
|
||||
|
||||
mDependency.injectTestDependency(Dependency.BG_LOOPER, mTestableLooper.getLooper());
|
||||
mTestHandler = new Handler(mTestableLooper.getLooper());
|
||||
mDependency.injectTestDependency(MetricsLogger.class, mMetricsLogger);
|
||||
mDependency.injectTestDependency(BubbleController.class, mBubbleController);
|
||||
mDependency.injectTestDependency(ShadeController.class, mShadeController);
|
||||
@@ -253,7 +254,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
final ImageView view = mNotificationInfo.findViewById(R.id.conversation_icon);
|
||||
assertEquals(mIconDrawable, view.getDrawable());
|
||||
}
|
||||
@@ -275,7 +278,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
final TextView textView = mNotificationInfo.findViewById(R.id.pkg_name);
|
||||
assertTrue(textView.getText().toString().contains("App Name"));
|
||||
assertEquals(VISIBLE, mNotificationInfo.findViewById(R.id.header).getVisibility());
|
||||
@@ -324,7 +329,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
final TextView textView = mNotificationInfo.findViewById(R.id.group_name);
|
||||
assertTrue(textView.getText().toString().contains(group.getName()));
|
||||
assertEquals(VISIBLE, mNotificationInfo.findViewById(R.id.header).getVisibility());
|
||||
@@ -348,7 +355,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
final TextView textView = mNotificationInfo.findViewById(R.id.group_name);
|
||||
assertEquals(VISIBLE, mNotificationInfo.findViewById(R.id.header).getVisibility());
|
||||
assertEquals(GONE, textView.getVisibility());
|
||||
@@ -371,7 +380,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
final TextView nameView = mNotificationInfo.findViewById(R.id.delegate_name);
|
||||
assertEquals(GONE, nameView.getVisibility());
|
||||
}
|
||||
@@ -404,7 +415,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
final TextView nameView = mNotificationInfo.findViewById(R.id.delegate_name);
|
||||
assertEquals(VISIBLE, nameView.getVisibility());
|
||||
assertTrue(nameView.getText().toString().contains("Proxied"));
|
||||
@@ -430,7 +443,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
final View settingsButton = mNotificationInfo.findViewById(R.id.info);
|
||||
settingsButton.performClick();
|
||||
@@ -454,7 +469,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
final View settingsButton = mNotificationInfo.findViewById(R.id.info);
|
||||
assertTrue(settingsButton.getVisibility() != View.VISIBLE);
|
||||
}
|
||||
@@ -479,7 +496,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
false);
|
||||
false,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
final View settingsButton = mNotificationInfo.findViewById(R.id.info);
|
||||
assertTrue(settingsButton.getVisibility() != View.VISIBLE);
|
||||
}
|
||||
@@ -502,7 +521,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
View view = mNotificationInfo.findViewById(R.id.silence);
|
||||
assertThat(view.isSelected()).isTrue();
|
||||
}
|
||||
@@ -528,7 +549,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
View view = mNotificationInfo.findViewById(R.id.default_behavior);
|
||||
assertThat(view.isSelected()).isTrue();
|
||||
assertThat(((TextView) view.findViewById(R.id.default_summary)).getText()).isEqualTo(
|
||||
@@ -557,7 +580,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
View view = mNotificationInfo.findViewById(R.id.default_behavior);
|
||||
assertThat(view.isSelected()).isTrue();
|
||||
assertThat(((TextView) view.findViewById(R.id.default_summary)).getText()).isEqualTo(
|
||||
@@ -585,7 +610,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
View fave = mNotificationInfo.findViewById(R.id.priority);
|
||||
fave.performClick();
|
||||
@@ -627,7 +654,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
mNotificationInfo.findViewById(R.id.default_behavior).performClick();
|
||||
mTestableLooper.processAllMessages();
|
||||
@@ -668,7 +697,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
View silence = mNotificationInfo.findViewById(R.id.silence);
|
||||
|
||||
@@ -710,7 +741,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
View fave = mNotificationInfo.findViewById(R.id.priority);
|
||||
fave.performClick();
|
||||
@@ -745,7 +778,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
View fave = mNotificationInfo.findViewById(R.id.priority);
|
||||
fave.performClick();
|
||||
@@ -778,7 +813,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
mNotificationInfo.findViewById(R.id.default_behavior).performClick();
|
||||
mNotificationInfo.findViewById(R.id.done).performClick();
|
||||
@@ -812,7 +849,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
mNotificationInfo.findViewById(R.id.default_behavior).performClick();
|
||||
mNotificationInfo.findViewById(R.id.done).performClick();
|
||||
@@ -846,7 +885,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
mNotificationInfo.findViewById(R.id.default_behavior).performClick();
|
||||
mNotificationInfo.findViewById(R.id.done).performClick();
|
||||
@@ -879,7 +920,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
View silence = mNotificationInfo.findViewById(R.id.silence);
|
||||
silence.performClick();
|
||||
@@ -911,7 +954,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
verify(mMockINotificationManager, times(1)).createConversationNotificationChannelForPackage(
|
||||
anyString(), anyInt(), anyString(), any(), eq(CONVERSATION_ID));
|
||||
@@ -934,7 +979,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
mBuilderProvider,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
verify(mMockINotificationManager, never()).createConversationNotificationChannelForPackage(
|
||||
anyString(), anyInt(), anyString(), any(), eq(CONVERSATION_ID));
|
||||
@@ -967,7 +1014,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
() -> b,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
// WHEN user clicks "priority"
|
||||
mNotificationInfo.setSelectedAction(NotificationConversationInfo.ACTION_FAVORITE);
|
||||
@@ -1001,7 +1050,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
mIconFactory,
|
||||
mContext,
|
||||
() -> b,
|
||||
true);
|
||||
true,
|
||||
mTestHandler,
|
||||
mTestHandler);
|
||||
|
||||
// WHEN user clicks "priority"
|
||||
mNotificationInfo.setSelectedAction(NotificationConversationInfo.ACTION_FAVORITE);
|
||||
|
||||
@@ -144,7 +144,7 @@ public class NotificationGutsManagerTest extends SysuiTestCase {
|
||||
when(mAccessibilityManager.isTouchExplorationEnabled()).thenReturn(false);
|
||||
|
||||
mGutsManager = new NotificationGutsManager(mContext, mVisualStabilityManager,
|
||||
() -> mStatusBar, mHandler, mAccessibilityManager, mHighPriorityProvider,
|
||||
() -> mStatusBar, mHandler, mHandler, mAccessibilityManager, mHighPriorityProvider,
|
||||
mINotificationManager, mLauncherApps, mShortcutManager,
|
||||
mChannelEditorDialogController, mContextTracker, mProvider);
|
||||
mGutsManager.setUpWithPresenter(mPresenter, mStackScroller,
|
||||
|
||||
Reference in New Issue
Block a user