/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/footer/ui/view/ |
D | FooterViewTest.java | 73 Context mSpyContext = spy(mContext); field in FooterViewTest 77 mView = (FooterView) LayoutInflater.from(mSpyContext).inflate( in setUp() 139 verify(mSpyContext).getString(eq(resId)); in testSetManageOrHistoryButtonText_resourceOnlyFetchedOnce() 141 clearInvocations(mSpyContext); in testSetManageOrHistoryButtonText_resourceOnlyFetchedOnce() 150 verify(mSpyContext, never()).getString(anyInt()); in testSetManageOrHistoryButtonText_resourceOnlyFetchedOnce() 156 clearInvocations(mSpyContext); in testSetManageOrHistoryButtonText_expectsFlagEnabled() 159 verify(mSpyContext, never()).getString(anyInt()); in testSetManageOrHistoryButtonText_expectsFlagEnabled() 167 verify(mSpyContext).getString(eq(resId)); in testSetManageOrHistoryButtonDescription_resourceOnlyFetchedOnce() 169 clearInvocations(mSpyContext); in testSetManageOrHistoryButtonDescription_resourceOnlyFetchedOnce() 178 verify(mSpyContext, never()).getString(anyInt()); in testSetManageOrHistoryButtonDescription_resourceOnlyFetchedOnce() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/ |
D | MenuViewLayerTest.java | 134 private SysuiTestableContext mSpyContext = getContext(); field in MenuViewLayerTest 152 mSpyContext.addMockSystemService(Context.NOTIFICATION_SERVICE, mMockNotificationManager); in setUp() 162 mSpyContext, mStubAccessibilityManager, mSecureSettings); in setUp() 164 mSpyContext, mStubWindowManager); in setUp() 166 new MenuView(mSpyContext, mMenuViewModel, menuViewAppearance, mSecureSettings)); in setUp() 170 mMenuViewLayer = spy(new MenuViewLayer(mSpyContext, mStubWindowManager, in setUp() 175 doNothing().when(mSpyContext).startActivity(any()); in setUp() 176 when(mSpyContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp() 179 Settings.Secure.getStringForUser(mSpyContext.getContentResolver(), in setUp() 182 Settings.Secure.getStringForUser(mSpyContext.getContentResolver(), in setUp() [all …]
|
D | MenuViewTest.java | 73 private SysuiTestableContext mSpyContext; field in MenuViewTest 81 mSpyContext = spy(mContext); in setUp() 82 doNothing().when(mSpyContext).startActivity(any()); in setUp() 88 mStubMenuViewAppearance = new MenuViewAppearance(mSpyContext, stubWindowManager); in setUp() 89 mMenuView = spy(new MenuView(mSpyContext, stubMenuViewModel, mStubMenuViewAppearance, in setUp() 91 mLastPosition = Prefs.getString(mSpyContext, in setUp()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/ |
D | SliceBroadcastRelayHandlerTest.java | 69 private Context mSpyContext; field in SliceBroadcastRelayHandlerTest 81 mSpyContext = spy(mContext); in setup() 83 mRelayHandler = new SliceBroadcastRelayHandler(mSpyContext, mBroadcastDispatcher, in setup() 105 verify(mSpyContext).registerReceiver(any(), eq(value), anyInt()); in testRegister() 126 verify(mSpyContext).registerReceiver(relay.capture(), eq(value), anyInt()); in testUnregister() 132 verify(mSpyContext).unregisterReceiver(eq(relay.getValue())); in testUnregister() 168 verify(mSpyContext).registerReceiver(relay.capture(), eq(value), anyInt()); in testRelay() 169 relay.getValue().onReceive(mSpyContext, new Intent(TEST_ACTION)); in testRelay() 182 verify(mSpyContext, never()) in testRegisteredWithDispatcher_onMainThread() 195 verify(mSpyContext, never()) in testRegisteredWithDispatcher_onBackgroundThread()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/ |
D | TileLayoutTest.java | 61 private Context mSpyContext; field in TileLayoutTest 66 mSpyContext = Mockito.spy( in setUp() 68 mResources = Mockito.spy(mSpyContext.getResources()); in setUp() 69 when(mSpyContext.getResources()).thenReturn(mResources); in setUp() 71 mTileLayout = new TileLayout(mSpyContext); in setUp() 81 spy(new QSTileViewImpl(mSpyContext))); in createTileRecord() 177 assertTrue(mSpyContext.getResources().getInteger(R.integer.quick_settings_num_columns) > 1); in testMeasureLayout_CallsLayoutOnTilesWithNeighboredBounds() 266 FakeTileView tileView = new FakeTileView(mSpyContext); 293 new Configuration(mSpyContext.getResources().getConfiguration()); in changeFontScaling() 296 mSpyContext.getResources().updateConfiguration(configuration, null, null); in changeFontScaling()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/ |
D | WindowMagnificationPromptControllerTest.java | 191 private Context mSpyContext; field in WindowMagnificationPromptControllerTest.A11yTestableContext 195 mSpyContext = Mockito.mock(Context.class); in A11yTestableContext() 200 mSpyContext.startActivityAsUser(intent, options, user); in startActivityAsUser() 206 return mSpyContext.registerReceiver(receiver, filter, broadcastPermission, scheduler); in registerReceiver() 211 mSpyContext.unregisterReceiver(receiver); in unregisterReceiver() 215 return mSpyContext; in getSpyContext()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/dialog/ |
D | MediaOutputControllerTest.java | 167 private Context mSpyContext; field in MediaOutputControllerTest 183 mSpyContext = spy(mContext); in setUp() 192 doReturn(mMediaSessionManager).when(mSpyContext).getSystemService( in setUp() 199 mSpyContext, in setUp() 293 mSpyContext, in start_withoutPackageName_verifyMediaControllerInit() 335 mSpyContext, in stop_withoutPackageName_verifyMediaControllerDeinit() 337 mSpyContext.getUser(), in stop_withoutPackageName_verifyMediaControllerDeinit() 591 mSpyContext, in getAppSourceName_packageNameIsNull_returnsNull() 593 mSpyContext.getUser(), in getAppSourceName_packageNameIsNull_returnsNull() 625 mSpyContext, in getNotificationSmallIcon_packageNameIsNull_returnsNull() [all …]
|
/frameworks/base/tests/PackageWatchdog/src/com/android/server/ |
D | CrashRecoveryTest.java | 111 private Context mSpyContext; field in CrashRecoveryTest 139 mSpyContext = spy(InstrumentationRegistry.getContext()); in setUp() 140 when(mSpyContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp() 365 spy(new RollbackPackageHealthObserver(mSpyContext, mApexManager)); in setUpRollbackPackageHealthObserver() 366 when(mSpyContext.getSystemService(RollbackManager.class)).thenReturn(mRollbackManager); in setUpRollbackPackageHealthObserver() 369 when(mSpyContext.getPackageManager()).thenReturn(mMockPackageManager); in setUpRollbackPackageHealthObserver() 377 RescuePartyObserver rescuePartyObserver = spy(RescuePartyObserver.getInstance(mSpyContext)); in setUpRescuePartyObserver() 415 new AtomicFile(new File(mSpyContext.getFilesDir(), "package-watchdog.xml")); in createWatchdog() 418 new PackageWatchdog(mSpyContext, policyFile, handler, handler, controller, in createWatchdog()
|
D | PackageWatchdogTest.java | 112 private Context mSpyContext; field in PackageWatchdogTest 146 mSpyContext = spy(InstrumentationRegistry.getContext()); in setUp() 147 when(mSpyContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp() 1727 new AtomicFile(new File(mSpyContext.getFilesDir(), "package-watchdog.xml")); in createWatchdog() 1730 new PackageWatchdog(mSpyContext, policyFile, handler, handler, controller, in createWatchdog()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/ |
D | InternetAdapterTest.java | 54 private Context mSpyContext = mContext; field in InternetAdapterTest 229 mViewHolder = mInternetAdapter.onCreateViewHolder(new LinearLayout(mSpyContext), 0); in viewHolderOnWifiClick_wifiShouldEditBeforeConnect_startActivity() 230 doNothing().when(mSpyContext).startActivity(any()); in viewHolderOnWifiClick_wifiShouldEditBeforeConnect_startActivity() 234 verify(mSpyContext).startActivity(any()); in viewHolderOnWifiClick_wifiShouldEditBeforeConnect_startActivity()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
D | PolicyWarningUIControllerTest.java | 91 private Context mSpyContext; field in PolicyWarningUIControllerTest 254 verify(mSpyContext).startActivityAsUser(intentCaptor.capture(), in verifyLaunchA11ySettings() 280 mSpyContext.startActivityAsUser(intent, options, user); in startActivityAsUser()
|