Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationUiAdjustmentTest.java +30 −8 Original line number Diff line number Diff line Loading @@ -39,8 +39,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentLength() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); Notification.Action action = createActionBuilder("first", R.drawable.ic_corp_icon, pendingIntent).build(); assertThat(NotificationUiAdjustment.needReinflate( Loading @@ -51,8 +54,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentLabels() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); Notification.Action firstAction = createActionBuilder("first", R.drawable.ic_corp_icon, pendingIntent).build(); Notification.Action secondAction = Loading @@ -66,8 +72,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentIcons() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); Notification.Action firstAction = createActionBuilder("same", R.drawable.ic_corp_icon, pendingIntent).build(); Notification.Action secondAction = Loading @@ -82,10 +91,14 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentPendingIntent() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent firstPendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_VIEW), 0); PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_VIEW), PendingIntent.FLAG_MUTABLE_UNAUDITED); PendingIntent secondPendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_PROCESS_TEXT), 0); PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_PROCESS_TEXT), PendingIntent.FLAG_MUTABLE_UNAUDITED); Notification.Action firstAction = createActionBuilder("same", R.drawable.ic_corp_icon, firstPendingIntent) .build(); Loading @@ -101,8 +114,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentChoices() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); RemoteInput firstRemoteInput = createRemoteInput("same", "same", new CharSequence[] {"first"}); Loading @@ -126,8 +142,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentRemoteInputLabel() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); RemoteInput firstRemoteInput = createRemoteInput("same", "first", new CharSequence[] {"same"}); Loading @@ -151,8 +170,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_negative() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); RemoteInput firstRemoteInput = createRemoteInput("same", "same", new CharSequence[] {"same"}); RemoteInput secondRemoteInput = Loading Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationUiAdjustmentTest.java +30 −8 Original line number Diff line number Diff line Loading @@ -39,8 +39,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentLength() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); Notification.Action action = createActionBuilder("first", R.drawable.ic_corp_icon, pendingIntent).build(); assertThat(NotificationUiAdjustment.needReinflate( Loading @@ -51,8 +54,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentLabels() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); Notification.Action firstAction = createActionBuilder("first", R.drawable.ic_corp_icon, pendingIntent).build(); Notification.Action secondAction = Loading @@ -66,8 +72,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentIcons() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); Notification.Action firstAction = createActionBuilder("same", R.drawable.ic_corp_icon, pendingIntent).build(); Notification.Action secondAction = Loading @@ -82,10 +91,14 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentPendingIntent() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent firstPendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_VIEW), 0); PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_VIEW), PendingIntent.FLAG_MUTABLE_UNAUDITED); PendingIntent secondPendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_PROCESS_TEXT), 0); PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_PROCESS_TEXT), PendingIntent.FLAG_MUTABLE_UNAUDITED); Notification.Action firstAction = createActionBuilder("same", R.drawable.ic_corp_icon, firstPendingIntent) .build(); Loading @@ -101,8 +114,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentChoices() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); RemoteInput firstRemoteInput = createRemoteInput("same", "same", new CharSequence[] {"first"}); Loading @@ -126,8 +142,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_differentRemoteInputLabel() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); RemoteInput firstRemoteInput = createRemoteInput("same", "first", new CharSequence[] {"same"}); Loading @@ -151,8 +170,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase { @Test public void needReinflate_negative() { // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0); PendingIntent.getActivity(mContext, 0, new Intent(), PendingIntent.FLAG_MUTABLE_UNAUDITED); RemoteInput firstRemoteInput = createRemoteInput("same", "same", new CharSequence[] {"same"}); RemoteInput secondRemoteInput = Loading