29
29
import android .content .Context ;
30
30
import android .content .SharedPreferences ;
31
31
import android .os .Bundle ;
32
+ import androidx .test .filters .SdkSuppress ;
32
33
import com .google .android .gms .tasks .Task ;
33
34
import com .google .android .gms .tasks .TaskCompletionSource ;
34
35
import com .google .android .gms .tasks .Tasks ;
@@ -194,6 +195,7 @@ private CrashlyticsController createController() {
194
195
return controller ;
195
196
}
196
197
198
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
197
199
public void testWriteNonFatal_callsSessionReportingCoordinatorPersistNonFatal () throws Exception {
198
200
final String sessionId = "sessionId" ;
199
201
final Thread thread = Thread .currentThread ();
@@ -210,6 +212,7 @@ public void testWriteNonFatal_callsSessionReportingCoordinatorPersistNonFatal()
210
212
.persistNonFatalEvent (eq (nonFatal ), eq (thread ), eq (sessionId ), anyLong ());
211
213
}
212
214
215
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
213
216
public void testFatalException_callsSessionReportingCoordinatorPersistFatal () throws Exception {
214
217
final String sessionId = "sessionId" ;
215
218
final Thread thread = Thread .currentThread ();
@@ -226,6 +229,7 @@ public void testFatalException_callsSessionReportingCoordinatorPersistFatal() th
226
229
}
227
230
228
231
@ Test
232
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
229
233
public void testOnDemandFatal_callLogFatalException () {
230
234
Thread thread = Thread .currentThread ();
231
235
Exception fatal = new RuntimeException ("Fatal" );
@@ -245,6 +249,7 @@ public void testOnDemandFatal_callLogFatalException() {
245
249
verify (mockUserMetadata ).setNewSession (not (eq (SESSION_ID )));
246
250
}
247
251
252
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
248
253
public void testNativeCrashDataCausesNativeReport () throws Exception {
249
254
final String sessionId = "sessionId_1_new" ;
250
255
final String previousSessionId = "sessionId_0_previous" ;
@@ -325,6 +330,7 @@ public File getOsFile() {
325
330
.finalizeSessionWithNativeEvent (eq (sessionId ), any (), any ());
326
331
}
327
332
333
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
328
334
public void testMissingNativeComponentCausesNoReports () {
329
335
final CrashlyticsController controller = createController ();
330
336
controller .finalizeSessions (testSettingsProvider );
@@ -341,6 +347,7 @@ public void testMissingNativeComponentCausesNoReports() {
341
347
* it to throw exceptions!
342
348
*/
343
349
// FIXME: Validate this test is working as intended
350
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
344
351
public void testLoggedExceptionsAfterCrashOk () {
345
352
final CrashlyticsController controller = builder ().build ();
346
353
controller .handleUncaughtException (
@@ -355,6 +362,7 @@ public void testLoggedExceptionsAfterCrashOk() {
355
362
* it to throw exceptions!
356
363
*/
357
364
// FIXME: Validate this test works as intended
365
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
358
366
public void testLogStringAfterCrashOk () {
359
367
final CrashlyticsController controller = builder ().build ();
360
368
controller .handleUncaughtException (
@@ -369,6 +377,7 @@ public void testLogStringAfterCrashOk() {
369
377
* it to throw exceptions!
370
378
*/
371
379
// FIXME: Validate this test works as intended
380
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
372
381
public void testFinalizeSessionAfterCrashOk () throws Exception {
373
382
final CrashlyticsController controller = builder ().build ();
374
383
controller .handleUncaughtException (
@@ -378,6 +387,7 @@ public void testFinalizeSessionAfterCrashOk() throws Exception {
378
387
controller .finalizeSessions (testSettingsProvider );
379
388
}
380
389
390
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
381
391
public void testUploadWithNoReports () throws Exception {
382
392
when (mockSessionReportingCoordinator .hasReportsToSend ()).thenReturn (false );
383
393
@@ -391,6 +401,7 @@ public void testUploadWithNoReports() throws Exception {
391
401
verifyNoMoreInteractions (mockSessionReportingCoordinator );
392
402
}
393
403
404
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
394
405
public void testUploadWithDataCollectionAlwaysEnabled () throws Exception {
395
406
when (mockSessionReportingCoordinator .hasReportsToSend ()).thenReturn (true );
396
407
when (mockSessionReportingCoordinator .sendReports (any (Executor .class )))
@@ -408,6 +419,7 @@ public void testUploadWithDataCollectionAlwaysEnabled() throws Exception {
408
419
verifyNoMoreInteractions (mockSessionReportingCoordinator );
409
420
}
410
421
422
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
411
423
public void testUploadDisabledThenOptIn () throws Exception {
412
424
when (mockSessionReportingCoordinator .hasReportsToSend ()).thenReturn (true );
413
425
when (mockSessionReportingCoordinator .sendReports (any (Executor .class )))
@@ -437,6 +449,7 @@ public void testUploadDisabledThenOptIn() throws Exception {
437
449
verifyNoMoreInteractions (mockSessionReportingCoordinator );
438
450
}
439
451
452
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
440
453
public void testUploadDisabledThenOptOut () throws Exception {
441
454
when (mockSessionReportingCoordinator .hasReportsToSend ()).thenReturn (true );
442
455
when (mockSessionReportingCoordinator .sendReports (any (Executor .class )))
@@ -464,6 +477,7 @@ public void testUploadDisabledThenOptOut() throws Exception {
464
477
verifyNoMoreInteractions (mockSessionReportingCoordinator );
465
478
}
466
479
480
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
467
481
public void testUploadDisabledThenEnabled () throws Exception {
468
482
when (mockSessionReportingCoordinator .hasReportsToSend ()).thenReturn (true );
469
483
when (mockSessionReportingCoordinator .sendReports (any (Executor .class )))
@@ -520,6 +534,7 @@ public void testUploadDisabledThenEnabled() throws Exception {
520
534
verifyNoMoreInteractions (mockSessionReportingCoordinator );
521
535
}
522
536
537
+ @ SdkSuppress (minSdkVersion = 30 ) // ApplicationExitInfo
523
538
public void testFatalEvent_sendsAppExceptionEvent () {
524
539
final String sessionId = "sessionId" ;
525
540
final LogFileManager logFileManager = new LogFileManager (testFileStore );
0 commit comments