/cts/tests/tests/tv/src/android/media/tv/cts/ |
D | TvInputServiceTest.java | 296 final CountingRecordingSession session = CountingTvInputService.sRecordingSession; in verifyCommandTuneForRecording() local 297 return session != null && session.mTuneCount > 0 in verifyCommandTuneForRecording() 298 && Objects.equals(session.mTunedChannelUri, fakeChannelUri); in verifyCommandTuneForRecording() 311 final CountingRecordingSession session = CountingTvInputService.sRecordingSession; in verifyCommandTuneForRecordingWithBundle() local 312 return session != null in verifyCommandTuneForRecordingWithBundle() 313 && session.mTuneCount > 0 in verifyCommandTuneForRecordingWithBundle() 314 && session.mTuneWithBundleCount > 0 in verifyCommandTuneForRecordingWithBundle() 315 && Objects.equals(session.mTunedChannelUri, fakeChannelUri) in verifyCommandTuneForRecordingWithBundle() 316 && bundleEquals(session.mTuneWithBundleData, sDummyBundle); in verifyCommandTuneForRecordingWithBundle() 327 final CountingRecordingSession session = CountingTvInputService.sRecordingSession; in verifyCommandRelease() local [all …]
|
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/ |
D | CustomViewActivityTest.java | 107 final Session session = service.getOnlyFinishedSession(); in testLifecycle() local 108 Log.v(TAG, "session id: " + session.id); in testLifecycle() 110 activity.assertDefaultEvents(session); in testLifecycle() 127 final ContentCaptureSession session = customView.getContentCaptureSession(); in testVirtualView_wrongWay() local 129 final ViewStructure child = session.newVirtualViewStructure(customViewId, 1); in testVirtualView_wrongWay() 132 assertThat(session.newAutofillId(customViewId, 1)).isEqualTo(childId); in testVirtualView_wrongWay() 134 session.notifyViewAppeared(child); in testVirtualView_wrongWay() 137 session.notifyViewDisappeared(childId); in testVirtualView_wrongWay() 146 final Session session = service.getOnlyFinishedSession(); in testVirtualView_wrongWay() local 147 Log.v(TAG, "session id: " + session.id); in testVirtualView_wrongWay() [all …]
|
D | Assertions.java | 57 public static void assertRightActivity(@NonNull Session session, in assertRightActivity() argument 60 assertRightActivity(session, expectedSessionId, activity.getComponentName()); in assertRightActivity() 66 public static void assertRightActivity(@NonNull Session session, in assertRightActivity() argument 69 assertWithMessage("wrong activity for %s", session) in assertRightActivity() 70 .that(session.context.getActivityComponent()).isEqualTo(componentName); in assertRightActivity() 73 assertThat(session.id).isEqualTo(expectedSessionId); in assertRightActivity() 79 public static void assertMainSessionContext(@NonNull Session session, in assertMainSessionContext() argument 81 assertMainSessionContext(session, activity, /* expectedFlags= */ 0); in assertMainSessionContext() 87 public static void assertMainSessionContext(@NonNull Session session, in assertMainSessionContext() argument 89 assertWithMessage("no context on %s", session).that(session.context).isNotNull(); in assertMainSessionContext() [all …]
|
D | LoginActivityTest.java | 113 final Session session = service.getOnlyFinishedSession(); in testSimpleLifecycle_defaultSession() local 114 Log.v(TAG, "session id: " + session.id); in testSimpleLifecycle_defaultSession() 116 activity.assertDefaultEvents(session); in testSimpleLifecycle_defaultSession() 262 final Session session = service.getOnlyFinishedSession(); in testSimpleLifecycle_changeContextAfterCreate() local 263 Log.v(TAG, "session id: " + session.id); in testSimpleLifecycle_changeContextAfterCreate() 266 final List<ContentCaptureEvent> events = activity.assertInitialViewsAppeared(session, in testSimpleLifecycle_changeContextAfterCreate() 298 final Session session = service.getOnlyFinishedSession(); in testSimpleLifecycle_changeContextOnCreate() local 299 Log.v(TAG, "session id: " + session.id); in testSimpleLifecycle_changeContextOnCreate() 300 final ContentCaptureSessionId sessionId = session.id; in testSimpleLifecycle_changeContextOnCreate() 301 assertRightActivity(session, sessionId, activity); in testSimpleLifecycle_changeContextOnCreate() [all …]
|
D | CustomViewActivity.java | 94 public void assertDefaultEvents(@NonNull Session session) { in assertDefaultEvents() argument 95 assertRightActivity(session, session.id, this); in assertDefaultEvents() 97 final List<ContentCaptureEvent> events = assertInitialViewsAppeared(session, in assertDefaultEvents() 108 public List<ContentCaptureEvent> assertInitialViewsAppeared(Session session, in assertInitialViewsAppeared() argument 110 return assertJustInitialViewsAppeared(session, additionalEvents); in assertInitialViewsAppeared() 118 private List<ContentCaptureEvent> assertJustInitialViewsAppeared(@NonNull Session session, in assertJustInitialViewsAppeared() argument 127 final List<ContentCaptureEvent> events = session.getEvents(); in assertJustInitialViewsAppeared() 137 assertViewWithUnknownParentAppeared(events, 5, session.id, mCustomView); in assertJustInitialViewsAppeared()
|
D | BlankWithTitleActivityTest.java | 60 final Session session = service.getOnlyFinishedSession(); in testSimpleSessionLifecycle() local 61 Log.v(TAG, "session id: " + session.id); in testSimpleSessionLifecycle() 63 activity.assertDefaultEvents(session); in testSimpleSessionLifecycle() 80 final Session session = service.getOnlyFinishedSession(); in testSimpleSessionLifecycle_noAnimation() local 81 Log.v(TAG, "session id: " + session.id); in testSimpleSessionLifecycle_noAnimation() 83 activity.assertDefaultEvents(session); in testSimpleSessionLifecycle_noAnimation()
|
D | CtsContentCaptureService.java | 238 final Session session = mOpenSessions.get(sessionId); in onCreateContentCaptureSession() local 239 if (session != null) { in onCreateContentCaptureSession() 241 + ": " + session); in onCreateContentCaptureSession() 254 final Session session = getExistingSession(sessionId); in onDestroyContentCaptureSession() local 255 session.finish(); in onDestroyContentCaptureSession() 260 mFinishedSessions.put(sessionId, session); in onDestroyContentCaptureSession() 278 final Session session = getExistingSession(sessionId); in onContentCaptureEvent() local 279 session.mEvents.add(event); in onContentCaptureEvent() 313 final Session session = mFinishedSessions.get(sessionId); in getFinishedSession() local 314 if (session == null) { in getFinishedSession() [all …]
|
D | LoginActivity.java | 71 public void assertDefaultEvents(@NonNull Session session) { in assertDefaultEvents() argument 73 final List<ContentCaptureEvent> events = assertInitialViewsAppeared(session, in assertDefaultEvents() 83 public List<ContentCaptureEvent> assertInitialViewsAppeared(@NonNull Session session, in assertInitialViewsAppeared() argument 85 final List<ContentCaptureEvent> events = assertJustInitialViewsAppeared(session, in assertInitialViewsAppeared() 97 public List<ContentCaptureEvent> assertJustInitialViewsAppeared(@NonNull Session session, in assertJustInitialViewsAppeared() argument 100 final ContentCaptureSessionId sessionId = session.id; in assertJustInitialViewsAppeared() 101 assertRightActivity(session, sessionId, activity); in assertJustInitialViewsAppeared() 109 final List<ContentCaptureEvent> events = session.getEvents(); in assertJustInitialViewsAppeared()
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | InstallSessionTransferTest.java | 104 private void writeApk(@NonNull Session session, @NonNull String name) throws IOException { in writeApk() argument 106 try (OutputStream out = session.openWrite(name, 0, -1)) { in writeApk() 138 Session session = installer.openSession(sessionId); in transferSession() local 140 writeApk(session, "CtsContentTestCases"); in transferSession() 142 InputStream danglingReadStream = session.openRead("CtsContentTestCases"); in transferSession() 149 session.transfer(packageInstallerPackage); in transferSession() 154 session.getNames(); in transferSession() 183 Session session = createSession(); in transferToInvalidNewOwner() local 184 writeApk(session, "CtsContentTestCases"); in transferToInvalidNewOwner() 188 session.transfer("android.content.cts.invalid.package"); in transferToInvalidNewOwner() [all …]
|
/cts/tests/tests/secure_element/omapi/src/android/omapi/cts/ |
D | OmapiTest.java | 316 Session session = null; in testATR() local 318 session = reader.openSession(); in testATR() 322 assertNotNull("Could not open session", session); in testATR() 323 byte[] atr = session.getATR(); in testATR() 324 session.close(); in testATR() 342 Session session = null; in testOpenBasicChannelNullAid() local 345 session = reader.openSession(); in testOpenBasicChannelNullAid() 346 assertNotNull("Could not open session", session); in testOpenBasicChannelNullAid() 347 channel = session.openBasicChannel(null, (byte) 0x00); in testOpenBasicChannelNullAid() 350 if (session != null) session.close(); in testOpenBasicChannelNullAid() [all …]
|
/cts/tests/tests/media/src/android/media/cts/ |
D | MediaSession2Test.java | 38 import android.media.session.MediaSessionManager; 144 try (MediaSession2 session = new MediaSession2.Builder(mContext) in testBuilder_setSessionActivity() argument 154 try (MediaSession2 session = new MediaSession2.Builder(mContext).build()) { in testBuilder_createSessionWithoutId() argument 155 assertEquals("", session.getId()); in testBuilder_createSessionWithoutId() 182 try (MediaSession2 session = new MediaSession2.Builder(mContext) in testBuilder_setExtras_withFrameworkParcelable() argument 185 Bundle extrasOut = session.getToken().getExtras(); in testBuilder_setExtras_withFrameworkParcelable() 200 try (MediaSession2 session = new MediaSession2.Builder(mContext) in testBuilder_setExtras_withCustomParcelable() argument 212 try (MediaSession2 session = new MediaSession2.Builder(mContext) in testSession2Token() argument 215 Session2Token token = session.getToken(); in testSession2Token() 227 try (MediaSession2 session = new MediaSession2.Builder(mContext) in testSession2Token_extrasNotSet() argument [all …]
|
D | MediaSessionManagerTest.java | 29 import android.media.session.MediaController; 30 import android.media.session.MediaSession; 31 import android.media.session.MediaSessionManager; 32 import android.media.session.PlaybackState; 161 MediaSession session = null; in testSetOnMediaKeyListener() local 163 session = new MediaSession(getInstrumentation().getTargetContext(), TAG); in testSetOnMediaKeyListener() 164 MediaSessionCallback callback = new MediaSessionCallback(2, session); in testSetOnMediaKeyListener() 165 session.setFlags(MediaSession.FLAG_HANDLES_MEDIA_BUTTONS in testSetOnMediaKeyListener() 167 session.setCallback(callback, handler); in testSetOnMediaKeyListener() 171 session.setPlaybackState(state); in testSetOnMediaKeyListener() [all …]
|
D | MediaCasTest.java | 186 public void onSessionEvent(MediaCas MediaCas, MediaCas.Session session, in testEnumeratePlugins() 261 Session session = mediaCas.openSession(); in testClearKeyApis() local 262 if (session == null) { in testClearKeyApis() 266 session.setPrivateData(pvtData); in testClearKeyApis() 274 descrambler.setMediaCasSession(session); in testClearKeyApis() 292 testSessionEventEcho(mediaCas, session, 1, 2, null /* data */, handler); in testClearKeyApis() 298 testSessionEventEcho(mediaCas, session, 3, 4, eventData, null /* handler */); in testClearKeyApis() 305 session.processEcm(ecmData); in testClearKeyApis() 314 session.close(); in testClearKeyApis() 338 Session session = mediaCas.openSession(); in testClearKeySessionClosedAfterRelease() local [all …]
|
D | MediaSession2ServiceTest.java | 159 public Session2CommandGroup onConnect(MediaSession2 session, in testOnGetSession_returnsSession() argument 209 MediaSession2 session = createMediaSession2( in testOnGetSession_returnsDifferentSessions() 211 tokens.add(session.getToken()); in testOnGetSession_returnsDifferentSessions() 212 return session; in testOnGetSession_returnsDifferentSessions() 315 try (MediaSession2 session = new MediaSession2.Builder(mContext) in testGetSessions() argument 319 service.addSession(session); in testGetSessions() 321 assertTrue(sessions.contains(session)); in testGetSessions() 324 service.removeSession(session); in testGetSessions() 326 assertFalse(sessions.contains(session)); in testGetSessions() 334 try (MediaSession2 session = new MediaSession2.Builder(mContext) in testAddSessions_removedWhenClose() argument [all …]
|
D | StubMediaSession2Service.java | 74 for (MediaSession2 session : sessions) { in onDestroy() 75 session.close(); in onDestroy() 87 public MediaNotification onUpdateNotification(MediaSession2 session) { in onUpdateNotification() argument 90 sTestInjector.onUpdateNotification(session); in onUpdateNotification() 111 public Session2CommandGroup onConnect(MediaSession2 session, in onGetSession() 126 MediaNotification onUpdateNotification(MediaSession2 session) {
|
/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/ |
D | CameraSessionUtils.java | 85 public void onConfigured(CameraCaptureSession session) { in onConfigured() argument 86 mSessionQueue.offer(session); in onConfigured() 87 super.onConfigured(session); in onConfigured() 117 CameraCaptureSession session, CaptureRequest request, Handler handler) in getCapturedResult() argument 119 session.capture(request, this, handler); in getCapturedResult() 126 public void onCaptureStarted(CameraCaptureSession session, CaptureRequest request, in onCaptureStarted() argument 129 super.onCaptureStarted(session, request, timestamp, frameNumber); in onCaptureStarted() 133 public void onCaptureCompleted(CameraCaptureSession session, CaptureRequest request, in onCaptureCompleted() argument 136 super.onCaptureCompleted(session, request, result); in onCaptureCompleted() 183 CameraCaptureSession session = listener.getConfiguredSession(device, outputs, handler); in configureAndVerifySession() local [all …]
|
/cts/tests/tests/wifi/src/android/net/wifi/aware/cts/ |
D | SingleDeviceTest.java | 108 public void onAttached(WifiAwareSession session) { in onAttached() argument 110 mSession = session; in onAttached() 112 mSessions.add(session); in onAttached() 210 public void onPublishStarted(PublishDiscoverySession session) { in onPublishStarted() argument 211 mPublishDiscoverySession = session; in onPublishStarted() 216 public void onSubscribeStarted(SubscribeDiscoverySession session) { in onSubscribeStarted() argument 217 mSubscribeDiscoverySession = session; in onSubscribeStarted() 314 PublishDiscoverySession session = mPublishDiscoverySession; in getPublishDiscoverySession() local 316 return session; in getPublishDiscoverySession() 323 SubscribeDiscoverySession session = mSubscribeDiscoverySession; in getSubscribeDiscoverySession() local [all …]
|
/cts/tests/tests/secure_element/access_control/AccessControlApp3/src/android/omapi/accesscontrol3/cts/ |
D | AccessControlTest.java | 269 Session session = null; in testSelectableAid() local 273 session = reader.openSession(); in testSelectableAid() 274 assertNotNull("Null Session", session); in testSelectableAid() 275 channel = session.openLogicalChannel(aid, (byte) 0x00); in testSelectableAid() 284 if (session != null) session.close(); in testSelectableAid() 297 Session session = null; in testUnauthorisedAid() local 301 session = reader.openSession(); in testUnauthorisedAid() 302 assertNotNull("Null Session", session); in testUnauthorisedAid() 304 channel = session.openLogicalChannel(aid, (byte) 0x00); in testUnauthorisedAid() 311 if (session != null) session.close(); in testUnauthorisedAid() [all …]
|
/cts/tests/tests/secure_element/access_control/AccessControlApp1/src/android/omapi/accesscontrol1/cts/ |
D | AccessControlTest.java | 267 Session session = null; in testSelectableAid() local 271 session = reader.openSession(); in testSelectableAid() 272 assertNotNull("Null Session", session); in testSelectableAid() 273 channel = session.openLogicalChannel(aid, (byte) 0x00); in testSelectableAid() 282 if (session != null) session.close(); in testSelectableAid() 295 Session session = null; in testUnauthorisedAid() local 299 session = reader.openSession(); in testUnauthorisedAid() 300 assertNotNull("Null Session", session); in testUnauthorisedAid() 302 channel = session.openLogicalChannel(aid, (byte) 0x00); in testUnauthorisedAid() 309 if (session != null) session.close(); in testUnauthorisedAid() [all …]
|
/cts/tests/tests/secure_element/access_control/AccessControlApp2/src/android/omapi/accesscontrol2/cts/ |
D | AccessControlTest.java | 266 Session session = null; in testSelectableAid() local 270 session = reader.openSession(); in testSelectableAid() 271 assertNotNull("Null Session", session); in testSelectableAid() 272 channel = session.openLogicalChannel(aid, (byte) 0x00); in testSelectableAid() 281 if (session != null) session.close(); in testSelectableAid() 294 Session session = null; in testUnauthorisedAid() local 298 session = reader.openSession(); in testUnauthorisedAid() 299 assertNotNull("Null Session", session); in testUnauthorisedAid() 301 channel = session.openLogicalChannel(aid, (byte) 0x00); in testUnauthorisedAid() 308 if (session != null) session.close(); in testUnauthorisedAid() [all …]
|
/cts/hostsidetests/stagedinstall/app/src/com/android/tests/stagedinstall/ |
D | PackageInstallerSessionInfoSubject.java | 41 PackageInstaller.SessionInfo session) { in sessions() 42 return new PackageInstallerSessionInfoSubject(failureMetadata, session); in sessions() 48 PackageInstaller.SessionInfo session) { 49 return Truth.assertAbout(sessions()).that(session); 72 PackageInstaller.SessionInfo session = getSubject(); 73 return "{" + "appPackageName = " + session.getAppPackageName() + "; " 74 + "sessionId = " + session.getSessionId() + "; " 75 + "isStagedSessionReady = " + session.isStagedSessionReady() + "; " 76 + "isStagedSessionApplied = " + session.isStagedSessionApplied() + "; " 77 + "isStagedSessionFailed = " + session.isStagedSessionFailed() + "; " [all …]
|
/cts/tests/tests/hardware/src/android/hardware/lights/cts/ |
D | LightsManagerTest.java | 80 try (LightsManager.LightsSession session = mManager.openSession()) { in testControlLightsPermissionIsRequiredToUseLights() argument 90 try (LightsManager.LightsSession session = mManager.openSession()) { in testControlSingleLight() argument 92 session.setLights(new Builder() in testControlSingleLight() 105 try (LightsManager.LightsSession session = mManager.openSession()) { in testControlMultipleLights() argument 107 session.setLights(new Builder() in testControlMultipleLights() 130 try (LightsManager.LightsSession session = mManager.openSession()) { in testControlLights_onlyEffectiveForLifetimeOfClient() argument 132 session.setLights(new Builder().setLight(mLights.get(0), new LightState(TAN)).build()); in testControlLights_onlyEffectiveForLifetimeOfClient() 137 session.close(); in testControlLights_onlyEffectiveForLifetimeOfClient() 172 try (LightsManager.LightsSession session = mManager.openSession()) { in testClearLight() argument 174 session.setLights(new Builder().setLight(mLights.get(0), new LightState(RED)).build()); in testClearLight() [all …]
|
/cts/tests/tests/print/src/android/print/cts/ |
D | InteractionBetweenPrintDocumentAndPrinterDiscovery.java | 71 private static void addPrinter(StubbablePrinterDiscoverySession session, int status) { in addPrinter() argument 74 PrinterId testId = session.getService().generatePrinterId(PRINTER_NAME); in addPrinter() 86 session.addPrinters(printers); in addPrinter() 96 StubbablePrinterDiscoverySession[] session = new StubbablePrinterDiscoverySession[1]; in printerReappearsWhileCanceling() local 101 session[0] = ((PrinterDiscoverySessionCallbacks) inv.getMock()).getSession(); in printerReappearsWhileCanceling() 103 addPrinter(session[0], STATUS_IDLE); in printerReappearsWhileCanceling() 165 runOnMainThread(() -> addPrinter(session[0], STATUS_UNAVAILABLE)); in printerReappearsWhileCanceling() 172 runOnMainThread(() -> addPrinter(session[0], STATUS_IDLE)); in printerReappearsWhileCanceling()
|
D | PrinterDiscoverySessionLifecycleTest.java | 584 StubbablePrinterDiscoverySession[] session = new StubbablePrinterDiscoverySession[1]; in addRemovePrinters() local 589 session[0] = ((PrinterDiscoverySessionCallbacks) in addRemovePrinters() 611 runOnMainThread(() -> assertEquals(0, session[0].getPrinters().size())); in addRemovePrinters() 615 printerIds[0] = session[0].getService().generatePrinterId("0"); in addRemovePrinters() 616 printerIds[1] = session[0].getService().generatePrinterId("1"); in addRemovePrinters() 617 printerIds[2] = session[0].getService().generatePrinterId("2"); in addRemovePrinters() 631 runOnMainThread(() -> session[0].addPrinters(printers)); in addRemovePrinters() 632 eventually(() -> runOnMainThread(() -> assertEquals(1, session[0].getPrinters().size()))); in addRemovePrinters() 636 runOnMainThread(() -> session[0].addPrinters(printers)); in addRemovePrinters() 637 eventually(() -> runOnMainThread(() -> assertEquals(3, session[0].getPrinters().size()))); in addRemovePrinters() [all …]
|
/cts/libs/install/src/com/android/cts/install/lib/ |
D | Install.java | 143 try (PackageInstaller.Session session = in commit() argument 145 session.commit(LocalIntentSender.getIntentSender()); in commit() 173 try (PackageInstaller.Session session = in createSession() argument 176 session.addChildSessionId(subInstall.createSession()); in createSession() 179 session.addChildSessionId(createSingleInstallSession(testApp)); in createSession() 221 try (PackageInstaller.Session session = in createSingleInstallSession() argument 224 try (OutputStream os = session.openWrite(resourceName, 0, -1); in createSingleInstallSession()
|