Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb39ad8f authored by Colin Cross's avatar Colin Cross
Browse files

Fix kotlin nullable errors in CompanionDeviceMultiDeviceTests

Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
Change-Id: I0b03abc8f02007e90a3bc6856a7f9560aac263bd
parent 8583ef80
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -112,10 +112,10 @@ class CompanionDeviceManagerSnippet : Snippet {
            throw CompanionException("Association result can't be null.")
        }

        val association = result.getParcelableExtra(
        val association = checkNotNull(result.getParcelableExtra(
            CompanionDeviceManager.EXTRA_ASSOCIATION,
            AssociationInfo::class.java
        )
        ))
        val remoteDevice = association.associatedDevice?.getBluetoothDevice()!!

        // Register associated device
@@ -138,8 +138,8 @@ class CompanionDeviceManagerSnippet : Snippet {
     */
    @Rpc(description = "Start permissions sync.")
    fun startPermissionsSync(associationId: Int) {
        val pendingIntent = companionDeviceManager
            .buildPermissionTransferUserConsentIntent(associationId)
        val pendingIntent = checkNotNull(companionDeviceManager
            .buildPermissionTransferUserConsentIntent(associationId))
        CompanionActivity.launchAndWait(context)
        CompanionActivity.startIntentSender(pendingIntent)
        confirmationUi.waitUntilSystemDataTransferConfirmationVisible()