Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License |
| 15 | */ |
| 16 | |
| 17 | package com.android.systemui.statusbar.notification.row; |
| 18 | |
| 19 | import static android.app.Notification.EXTRA_IS_GROUP_CONVERSATION; |
| 20 | import static android.app.NotificationManager.IMPORTANCE_LOW; |
| 21 | import static android.print.PrintManager.PRINT_SPOOLER_PACKAGE_NAME; |
| 22 | import static android.view.View.GONE; |
| 23 | import static android.view.View.VISIBLE; |
| 24 | |
| 25 | import static junit.framework.Assert.assertEquals; |
| 26 | import static junit.framework.Assert.assertTrue; |
| 27 | |
| 28 | import static org.mockito.Mockito.any; |
| 29 | import static org.mockito.Mockito.anyBoolean; |
| 30 | import static org.mockito.Mockito.anyInt; |
| 31 | import static org.mockito.Mockito.eq; |
| 32 | import static org.mockito.Mockito.mock; |
| 33 | import static org.mockito.Mockito.when; |
| 34 | |
| 35 | import android.app.INotificationManager; |
| 36 | import android.app.Notification; |
| 37 | import android.app.NotificationChannel; |
| 38 | import android.app.NotificationChannelGroup; |
| 39 | import android.app.Person; |
| 40 | import android.content.pm.ApplicationInfo; |
| 41 | import android.content.pm.PackageInfo; |
| 42 | import android.content.pm.PackageManager; |
| 43 | import android.graphics.drawable.Drawable; |
| 44 | import android.graphics.drawable.Icon; |
| 45 | import android.os.UserHandle; |
| 46 | import android.service.notification.StatusBarNotification; |
| 47 | import android.test.suitebuilder.annotation.SmallTest; |
| 48 | import android.testing.AndroidTestingRunner; |
| 49 | import android.testing.TestableLooper; |
| 50 | import android.view.LayoutInflater; |
| 51 | import android.view.View; |
| 52 | import android.widget.ImageView; |
| 53 | import android.widget.TextView; |
| 54 | |
| 55 | import com.android.internal.logging.MetricsLogger; |
| 56 | import com.android.systemui.Dependency; |
| 57 | import com.android.systemui.R; |
| 58 | import com.android.systemui.SysuiTestCase; |
| 59 | import com.android.systemui.statusbar.notification.collection.NotificationEntry; |
| 60 | import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; |
| 61 | |
| 62 | import org.junit.Before; |
| 63 | import org.junit.Rule; |
| 64 | import org.junit.Test; |
| 65 | import org.junit.runner.RunWith; |
| 66 | import org.mockito.Mock; |
| 67 | import org.mockito.junit.MockitoJUnit; |
| 68 | import org.mockito.junit.MockitoRule; |
| 69 | |
| 70 | import java.util.HashSet; |
| 71 | import java.util.Set; |
| 72 | import java.util.concurrent.CountDownLatch; |
| 73 | |
| 74 | @SmallTest |
| 75 | @RunWith(AndroidTestingRunner.class) |
| 76 | @TestableLooper.RunWithLooper |
| 77 | public class PartialConversationInfoTest extends SysuiTestCase { |
| 78 | private static final String TEST_PACKAGE_NAME = "test_package"; |
| 79 | private static final String TEST_SYSTEM_PACKAGE_NAME = PRINT_SPOOLER_PACKAGE_NAME; |
| 80 | private static final int TEST_UID = 1; |
| 81 | private static final String TEST_CHANNEL = "test_channel"; |
| 82 | private static final String TEST_CHANNEL_NAME = "TEST CHANNEL NAME"; |
| 83 | |
| 84 | private TestableLooper mTestableLooper; |
| 85 | private PartialConversationInfo mInfo; |
| 86 | private NotificationChannel mNotificationChannel; |
| 87 | private NotificationChannel mDefaultNotificationChannel; |
| 88 | private Set<NotificationChannel> mNotificationChannelSet = new HashSet<>(); |
| 89 | private Set<NotificationChannel> mDefaultNotificationChannelSet = new HashSet<>(); |
| 90 | private StatusBarNotification mSbn; |
| 91 | private NotificationEntry mEntry; |
| 92 | |
| 93 | @Rule |
| 94 | public MockitoRule mockito = MockitoJUnit.rule(); |
| 95 | @Mock |
| 96 | private MetricsLogger mMetricsLogger; |
| 97 | @Mock |
| 98 | private INotificationManager mMockINotificationManager; |
| 99 | @Mock |
| 100 | private PackageManager mMockPackageManager; |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 101 | @Mock |
| 102 | private ChannelEditorDialogController mChannelEditorDialogController; |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 103 | |
| 104 | @Mock |
| 105 | private Icon mIcon; |
| 106 | @Mock |
| 107 | private Drawable mDrawable; |
| 108 | |
| 109 | @Before |
| 110 | public void setUp() throws Exception { |
| 111 | mTestableLooper = TestableLooper.get(this); |
| 112 | |
| 113 | mDependency.injectTestDependency(Dependency.BG_LOOPER, mTestableLooper.getLooper()); |
| 114 | mDependency.injectTestDependency(MetricsLogger.class, mMetricsLogger); |
| 115 | // Inflate the layout |
| 116 | final LayoutInflater layoutInflater = LayoutInflater.from(mContext); |
| 117 | mInfo = (PartialConversationInfo) layoutInflater.inflate(R.layout.partial_conversation_info, |
| 118 | null); |
| 119 | mInfo.setGutsParent(mock(NotificationGuts.class)); |
| 120 | // Our view is never attached to a window so the View#post methods in NotificationInfo never |
| 121 | // get called. Setting this will skip the post and do the action immediately. |
| 122 | mInfo.mSkipPost = true; |
| 123 | |
| 124 | // PackageManager must return a packageInfo and applicationInfo. |
| 125 | final PackageInfo packageInfo = new PackageInfo(); |
| 126 | packageInfo.packageName = TEST_PACKAGE_NAME; |
| 127 | when(mMockPackageManager.getPackageInfo(eq(TEST_PACKAGE_NAME), anyInt())) |
| 128 | .thenReturn(packageInfo); |
| 129 | final ApplicationInfo applicationInfo = new ApplicationInfo(); |
| 130 | applicationInfo.uid = TEST_UID; // non-zero |
| 131 | when(mMockPackageManager.getApplicationInfo(eq(TEST_PACKAGE_NAME), anyInt())).thenReturn( |
| 132 | applicationInfo); |
| 133 | final PackageInfo systemPackageInfo = new PackageInfo(); |
| 134 | systemPackageInfo.packageName = TEST_SYSTEM_PACKAGE_NAME; |
| 135 | when(mMockPackageManager.getPackageInfo(eq(TEST_SYSTEM_PACKAGE_NAME), anyInt())) |
| 136 | .thenReturn(systemPackageInfo); |
| 137 | when(mMockPackageManager.getPackageInfo(eq("android"), anyInt())) |
| 138 | .thenReturn(packageInfo); |
| 139 | |
| 140 | // Package has one channel by default. |
| 141 | when(mMockINotificationManager.getNumNotificationChannelsForPackage( |
| 142 | eq(TEST_PACKAGE_NAME), eq(TEST_UID), anyBoolean())).thenReturn(1); |
| 143 | |
| 144 | when(mIcon.loadDrawable(any())).thenReturn(mDrawable); |
| 145 | |
| 146 | // Some test channels. |
| 147 | mNotificationChannel = new NotificationChannel( |
| 148 | TEST_CHANNEL, TEST_CHANNEL_NAME, IMPORTANCE_LOW); |
| 149 | mNotificationChannelSet.add(mNotificationChannel); |
| 150 | mDefaultNotificationChannel = new NotificationChannel( |
| 151 | NotificationChannel.DEFAULT_CHANNEL_ID, TEST_CHANNEL_NAME, |
| 152 | IMPORTANCE_LOW); |
| 153 | mDefaultNotificationChannelSet.add(mDefaultNotificationChannel); |
| 154 | mSbn = new StatusBarNotification(TEST_PACKAGE_NAME, TEST_PACKAGE_NAME, 0, null, TEST_UID, 0, |
| 155 | new Notification(), UserHandle.CURRENT, null, 0); |
| 156 | mEntry = new NotificationEntryBuilder().setSbn(mSbn).build(); |
| 157 | } |
| 158 | |
| 159 | @Test |
| 160 | public void testBindNotification_SetsTextApplicationName() throws Exception { |
| 161 | when(mMockPackageManager.getApplicationLabel(any())).thenReturn("App Name"); |
| 162 | mInfo.bindNotification( |
| 163 | mMockPackageManager, |
| 164 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 165 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 166 | TEST_PACKAGE_NAME, |
| 167 | mNotificationChannel, |
| 168 | mNotificationChannelSet, |
| 169 | mEntry, |
| 170 | null, |
| 171 | true, |
| 172 | false); |
| 173 | final TextView textView = mInfo.findViewById(R.id.pkg_name); |
| 174 | assertTrue(textView.getText().toString().contains("App Name")); |
| 175 | assertEquals(VISIBLE, mInfo.findViewById(R.id.header).getVisibility()); |
| 176 | } |
| 177 | |
| 178 | @Test |
| 179 | public void testBindNotification_groupSetsPackageIcon() { |
| 180 | mEntry.getSbn().getNotification().extras.putBoolean(EXTRA_IS_GROUP_CONVERSATION, true); |
| 181 | final Drawable iconDrawable = mock(Drawable.class); |
| 182 | when(mMockPackageManager.getApplicationIcon(any(ApplicationInfo.class))) |
| 183 | .thenReturn(iconDrawable); |
| 184 | mInfo.bindNotification( |
| 185 | mMockPackageManager, |
| 186 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 187 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 188 | TEST_PACKAGE_NAME, |
| 189 | mNotificationChannel, |
| 190 | mNotificationChannelSet, |
| 191 | mEntry, |
| 192 | null, |
| 193 | true, |
| 194 | false); |
| 195 | final ImageView iconView = mInfo.findViewById(R.id.conversation_icon); |
| 196 | assertEquals(iconDrawable, iconView.getDrawable()); |
| 197 | } |
| 198 | |
| 199 | @Test |
| 200 | public void testBindNotification_notGroupSetsMessageIcon() { |
| 201 | Notification n = new Notification.Builder(mContext, TEST_CHANNEL_NAME) |
| 202 | .setStyle(new Notification.MessagingStyle( |
| 203 | new Person.Builder().setName("me").build()) |
| 204 | .addMessage(new Notification.MessagingStyle.Message("hello", 0, |
| 205 | new Person.Builder().setName("friend").setIcon(mIcon).build()))) |
| 206 | .build(); |
| 207 | mSbn = new StatusBarNotification(TEST_PACKAGE_NAME, TEST_PACKAGE_NAME, 0, null, TEST_UID, 0, |
| 208 | n, UserHandle.CURRENT, null, 0); |
| 209 | mEntry.setSbn(mSbn); |
| 210 | mEntry.getSbn().getNotification().extras.putBoolean(EXTRA_IS_GROUP_CONVERSATION, false); |
| 211 | mInfo.bindNotification( |
| 212 | mMockPackageManager, |
| 213 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 214 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 215 | TEST_PACKAGE_NAME, |
| 216 | mNotificationChannel, |
| 217 | mNotificationChannelSet, |
| 218 | mEntry, |
| 219 | null, |
| 220 | true, |
| 221 | false); |
| 222 | final ImageView iconView = mInfo.findViewById(R.id.conversation_icon); |
| 223 | assertEquals(mDrawable.hashCode() + "", mDrawable, iconView.getDrawable()); |
| 224 | } |
| 225 | |
| 226 | @Test |
| 227 | public void testBindNotification_noDelegate() { |
| 228 | mInfo.bindNotification( |
| 229 | mMockPackageManager, |
| 230 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 231 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 232 | TEST_PACKAGE_NAME, |
| 233 | mNotificationChannel, |
| 234 | mNotificationChannelSet, |
| 235 | mEntry, |
| 236 | null, |
| 237 | true, |
| 238 | false); |
| 239 | final TextView nameView = mInfo.findViewById(R.id.delegate_name); |
| 240 | assertEquals(GONE, nameView.getVisibility()); |
| 241 | final TextView dividerView = mInfo.findViewById(R.id.group_divider); |
| 242 | assertEquals(GONE, dividerView.getVisibility()); |
| 243 | } |
| 244 | |
| 245 | @Test |
| 246 | public void testBindNotification_delegate() throws Exception { |
| 247 | mSbn = new StatusBarNotification(TEST_PACKAGE_NAME, "other", 0, null, TEST_UID, 0, |
| 248 | new Notification(), UserHandle.CURRENT, null, 0); |
| 249 | final ApplicationInfo applicationInfo = new ApplicationInfo(); |
| 250 | applicationInfo.uid = 7; // non-zero |
| 251 | when(mMockPackageManager.getApplicationInfo(eq("other"), anyInt())).thenReturn( |
| 252 | applicationInfo); |
| 253 | when(mMockPackageManager.getApplicationLabel(any())).thenReturn("Other"); |
| 254 | |
| 255 | NotificationEntry entry = new NotificationEntryBuilder().setSbn(mSbn).build(); |
| 256 | mInfo.bindNotification( |
| 257 | mMockPackageManager, |
| 258 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 259 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 260 | TEST_PACKAGE_NAME, |
| 261 | mNotificationChannel, |
| 262 | mNotificationChannelSet, |
| 263 | entry, |
| 264 | null, |
| 265 | true, |
| 266 | false); |
| 267 | final TextView nameView = mInfo.findViewById(R.id.delegate_name); |
| 268 | assertEquals(VISIBLE, nameView.getVisibility()); |
| 269 | assertTrue(nameView.getText().toString().contains("Proxied")); |
| 270 | } |
| 271 | |
| 272 | @Test |
| 273 | public void testBindNotification_GroupNameHiddenIfNoGroup() throws Exception { |
| 274 | mInfo.bindNotification( |
| 275 | mMockPackageManager, |
| 276 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 277 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 278 | TEST_PACKAGE_NAME, |
| 279 | mNotificationChannel, |
| 280 | mNotificationChannelSet, |
| 281 | mEntry, |
| 282 | null, |
| 283 | true, |
| 284 | false); |
| 285 | final TextView groupNameView = mInfo.findViewById(R.id.group_name); |
| 286 | assertEquals(GONE, groupNameView.getVisibility()); |
| 287 | final TextView dividerView = mInfo.findViewById(R.id.group_divider); |
| 288 | assertEquals(GONE, dividerView.getVisibility()); |
| 289 | } |
| 290 | |
| 291 | @Test |
| 292 | public void testBindNotification_SetsGroupNameIfNonNull() throws Exception { |
| 293 | mNotificationChannel.setGroup("test_group_id"); |
| 294 | final NotificationChannelGroup notificationChannelGroup = |
| 295 | new NotificationChannelGroup("test_group_id", "Test Group Name"); |
| 296 | when(mMockINotificationManager.getNotificationChannelGroupForPackage( |
| 297 | eq("test_group_id"), eq(TEST_PACKAGE_NAME), eq(TEST_UID))) |
| 298 | .thenReturn(notificationChannelGroup); |
| 299 | mInfo.bindNotification( |
| 300 | mMockPackageManager, |
| 301 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 302 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 303 | TEST_PACKAGE_NAME, |
| 304 | mNotificationChannel, |
| 305 | mNotificationChannelSet, |
| 306 | mEntry, |
| 307 | null, |
| 308 | true, |
| 309 | false); |
| 310 | final TextView groupNameView = mInfo.findViewById(R.id.group_name); |
| 311 | assertEquals(View.VISIBLE, groupNameView.getVisibility()); |
| 312 | assertEquals("Test Group Name", groupNameView.getText()); |
| 313 | final TextView dividerView = mInfo.findViewById(R.id.group_divider); |
| 314 | assertEquals(View.VISIBLE, dividerView.getVisibility()); |
| 315 | } |
| 316 | |
| 317 | @Test |
| 318 | public void testBindNotification_SetsTextChannelName() { |
| 319 | mInfo.bindNotification( |
| 320 | mMockPackageManager, |
| 321 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 322 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 323 | TEST_PACKAGE_NAME, |
| 324 | mNotificationChannel, |
| 325 | mNotificationChannelSet, |
| 326 | mEntry, |
| 327 | null, |
| 328 | true, |
| 329 | false); |
| 330 | final TextView textView = mInfo.findViewById(R.id.parent_channel_name); |
| 331 | assertEquals(TEST_CHANNEL_NAME, textView.getText()); |
| 332 | } |
| 333 | |
| 334 | @Test |
| 335 | public void testBindNotification_SetsOnClickListenerForSettings() { |
| 336 | final CountDownLatch latch = new CountDownLatch(1); |
| 337 | mInfo.bindNotification( |
| 338 | mMockPackageManager, |
| 339 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 340 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 341 | TEST_PACKAGE_NAME, |
| 342 | mNotificationChannel, |
| 343 | mNotificationChannelSet, |
| 344 | mEntry, |
| 345 | (View v, NotificationChannel c, int appUid) -> { |
| 346 | assertEquals(mNotificationChannel, c); |
| 347 | latch.countDown(); |
| 348 | }, |
| 349 | true, |
| 350 | false); |
| 351 | |
| 352 | final View settingsButton = mInfo.findViewById(R.id.info); |
| 353 | settingsButton.performClick(); |
| 354 | // Verify that listener was triggered. |
| 355 | assertEquals(0, latch.getCount()); |
| 356 | } |
| 357 | |
| 358 | @Test |
Julia Reynolds | 435a7a4 | 2020-05-13 11:20:29 -0400 | [diff] [blame] | 359 | public void testBindNotification_SetsOnClickListenerForSettings_mainText() { |
| 360 | final CountDownLatch latch = new CountDownLatch(1); |
| 361 | mInfo.bindNotification( |
| 362 | mMockPackageManager, |
| 363 | mMockINotificationManager, |
| 364 | mChannelEditorDialogController, |
| 365 | TEST_PACKAGE_NAME, |
| 366 | mNotificationChannel, |
| 367 | mNotificationChannelSet, |
| 368 | mEntry, |
| 369 | (View v, NotificationChannel c, int appUid) -> { |
| 370 | assertEquals(mNotificationChannel, c); |
| 371 | latch.countDown(); |
| 372 | }, |
| 373 | true, |
| 374 | false); |
| 375 | |
| 376 | final View settingsButton = mInfo.findViewById(R.id.settings_link); |
| 377 | settingsButton.performClick(); |
| 378 | // Verify that listener was triggered. |
| 379 | assertEquals(0, latch.getCount()); |
| 380 | } |
| 381 | |
| 382 | @Test |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 383 | public void testBindNotification_SettingsButtonInvisibleWhenNoClickListener() { |
| 384 | mInfo.bindNotification( |
| 385 | mMockPackageManager, |
| 386 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 387 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 388 | TEST_PACKAGE_NAME, |
| 389 | mNotificationChannel, |
| 390 | mNotificationChannelSet, |
| 391 | mEntry, |
| 392 | null, |
| 393 | true, |
| 394 | false); |
| 395 | final View settingsButton = mInfo.findViewById(R.id.info); |
| 396 | assertTrue(settingsButton.getVisibility() != View.VISIBLE); |
| 397 | } |
| 398 | |
| 399 | @Test |
| 400 | public void testBindNotification_SettingsButtonInvisibleWhenDeviceUnprovisioned() { |
| 401 | mInfo.bindNotification( |
| 402 | mMockPackageManager, |
| 403 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 404 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 405 | TEST_PACKAGE_NAME, |
| 406 | mNotificationChannel, |
| 407 | mNotificationChannelSet, |
| 408 | mEntry, |
| 409 | (View v, NotificationChannel c, int appUid) -> { |
| 410 | assertEquals(mNotificationChannel, c); |
| 411 | }, |
| 412 | false, |
| 413 | false); |
| 414 | final View settingsButton = mInfo.findViewById(R.id.info); |
| 415 | assertTrue(settingsButton.getVisibility() != View.VISIBLE); |
| 416 | } |
| 417 | |
| 418 | @Test |
| 419 | public void testBindNotification_whenAppUnblockable() { |
| 420 | mInfo.bindNotification( |
| 421 | mMockPackageManager, |
| 422 | mMockINotificationManager, |
Evan Laird | 18bd6e6 | 2019-08-30 16:39:25 -0400 | [diff] [blame] | 423 | mChannelEditorDialogController, |
Julia Reynolds | 8582df5 | 2020-04-24 18:30:59 -0400 | [diff] [blame] | 424 | TEST_PACKAGE_NAME, |
| 425 | mNotificationChannel, |
| 426 | mNotificationChannelSet, |
| 427 | mEntry, |
| 428 | null, |
| 429 | true, |
| 430 | true); |
| 431 | |
| 432 | assertEquals(GONE, |
| 433 | mInfo.findViewById(R.id.turn_off_notifications).getVisibility()); |
| 434 | } |
| 435 | } |