Skip to content

Commit

Permalink
Fix typo on variable (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorNarvaez committed Aug 15, 2023
1 parent 3e8821a commit 9837ca7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import kotlin.reflect.full.createInstance

class OmhStorageProvider private constructor(
private val gmsPath: String?,
private val nonGsmPath: String?
private val nonGmsPath: String?
) {

class Builder {
Expand Down Expand Up @@ -59,7 +59,7 @@ class OmhStorageProvider private constructor(
fun build(): OmhStorageProvider = OmhStorageProvider(gmsPath, nonGmsPath)
}

private val isSingleBuild = gmsPath != null && nonGsmPath != null
private val isSingleBuild = gmsPath != null && nonGmsPath != null

@SuppressWarnings("SwallowedException")
fun provideStorageClient(authClient: OmhAuthClient, context: Context): OmhStorageClient {
Expand All @@ -75,15 +75,15 @@ class OmhStorageProvider private constructor(
private fun getOmhStorageFactory(context: Context): OmhStorageFactory = when {
isSingleBuild -> reflectSingleBuild(context)
gmsPath != null -> getFactoryImplementation(gmsPath)
nonGsmPath != null -> getFactoryImplementation(nonGsmPath)
nonGmsPath != null -> getFactoryImplementation(nonGmsPath)
else -> throw OmhStorageException.ApiException(OmhAuthStatusCodes.DEVELOPER_ERROR)
}

private fun reflectSingleBuild(context: Context): OmhStorageFactory {
val path = if (hasGoogleServices(context)) {
gmsPath!!
} else {
nonGsmPath!!
nonGmsPath!!
}
return getFactoryImplementation(path)
}
Expand Down

0 comments on commit 9837ca7

Please sign in to comment.