Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rvenky125 committed Feb 21, 2024
1 parent 06ed974 commit ccd0831
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 61 deletions.
2 changes: 1 addition & 1 deletion device-info/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kotlin {
iosSimulatorArm64()

cocoapods {
summary = "Some description for the Shared Module"
summary = "This module provides device info"
homepage = "Link to the Shared Module homepage"
version = "1.0"
ios.deploymentTarget = "16.0"
Expand Down
2 changes: 1 addition & 1 deletion device-info/device_info.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Pod::Spec.new do |spec|
spec.source = { :http=> ''}
spec.authors = ''
spec.license = ''
spec.summary = 'Some description for the Shared Module'
spec.summary = 'This module provides device info'
spec.vendored_frameworks = 'build/cocoapods/framework/device_info.framework'
spec.libraries = 'c++'
spec.ios.deployment_target = '16.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ class DeviceIdResolver(private val context: Context) {
setInstanceIdInPrefs(instanceId)
return instanceId
}
val uUIDInstanceId: String
private val uUIDInstanceId: String
get() = UUID.randomUUID().toString()
val instanceIdFromPrefs: String?
private val instanceIdFromPrefs: String?
get() {
val prefs = getRNDISharedPreferences(
context
)
return prefs.getString("instanceId", Build.UNKNOWN)
}

fun setInstanceIdInPrefs(instanceId: String?) {
private fun setInstanceIdInPrefs(instanceId: String?) {
val editor = getRNDISharedPreferences(
context
).edit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.famas.kmp_device_info
import kotlin.coroutines.cancellation.CancellationException

expect class DeviceInfo {
@Throws(NotAvailableToPlatformException::class)
fun isEmulator(): Boolean

fun getFontScale(): Float
Expand All @@ -12,7 +11,6 @@ expect class DeviceInfo {

fun getIpAddress(): String?

@Throws(NotAvailableToPlatformException::class)
fun isCameraPresent(): Boolean?

fun getMacAddress(): String
Expand All @@ -37,10 +35,8 @@ expect class DeviceInfo {

fun isAirplaneMode(): Boolean

@Throws(NotAvailableToPlatformException::class)
fun hasGms(): Boolean

@Throws(NotAvailableToPlatformException::class)
fun hasHms(): Boolean

fun hasSystemFeature(feature: String?): Boolean
Expand All @@ -53,45 +49,34 @@ expect class DeviceInfo {

fun getAvailableLocationProviders(): Map<String, Boolean>

@Throws(NotAvailableToPlatformException::class)
fun getInstallReferrer(): String?

fun getInstallerPackageName(): String

fun getFirstInstallTime(): Double

@Throws(NotAvailableToPlatformException::class)
fun getLastUpdateTime(): Double

fun getDeviceName(): String

@Throws(NotAvailableToPlatformException::class)
fun getSerialNumber(): String

@Throws(NotAvailableToPlatformException::class)
fun getDevice(): String

fun getBuildId(): String

@Throws(NotAvailableToPlatformException::class)
fun getApiLevel(): Int

@Throws(NotAvailableToPlatformException::class)
fun getBootloader(): String

@Throws(NotAvailableToPlatformException::class)
fun getDisplay(): String

@Throws(NotAvailableToPlatformException::class)
fun getFingerprint(): String

@Throws(NotAvailableToPlatformException::class)
fun getHardware(): String

@Throws(NotAvailableToPlatformException::class)
fun getHost(): String

@Throws(NotAvailableToPlatformException::class)
fun getProduct(): String

fun getTags(): String
Expand All @@ -100,60 +85,44 @@ expect class DeviceInfo {

fun getSystemManufacturer(): String

@Throws(NotAvailableToPlatformException::class)
fun getCodename(): String

@Throws(NotAvailableToPlatformException::class)
fun getIncremental(): String

fun getUniqueId(): String

@Throws(NotAvailableToPlatformException::class)
fun getAndroidId(): String

@Throws(NotAvailableToPlatformException::class)
fun getMaxMemory(): Double

fun getTotalMemory(): Double

@Throws(NotAvailableToPlatformException::class)
fun getInstanceId(): String?

@Throws(NotAvailableToPlatformException::class)
fun getBaseOs(): String

@Throws(NotAvailableToPlatformException::class)
fun getPreviewSdkInt(): String

@Throws(NotAvailableToPlatformException::class)
fun getSecurityPatch(): String

@Throws(NotAvailableToPlatformException::class, CancellationException::class)
suspend fun getUserAgent(): String?

@Throws(NotAvailableToPlatformException::class)
fun getPhoneNumber(): String

fun getSupportedAbis(): List<String>

@Throws(NotAvailableToPlatformException::class)
fun getSupported32BitAbis(): List<String>

@Throws(NotAvailableToPlatformException::class)
fun getSupported64BitAbis(): List<String>

@Throws(NotAvailableToPlatformException::class)
fun getSupportedMediaTypeList(): List<String>

@Throws(NotAvailableToPlatformException::class)
fun isLowRamDevice(): Boolean

fun isDisplayZoomed(): Boolean

@Throws(NotAvailableToPlatformException::class)
fun getBrightness(): Float

@Throws(NotAvailableToPlatformException::class, CancellationException::class)
suspend fun getDeviceToken(): String?

fun getInfoConstants(): InfoConstants
Expand Down
25 changes: 0 additions & 25 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
[versions]
agp = "8.2.0"
kotlin = "1.9.20"
compose = "1.6.1"
compose-compiler = "1.5.4"
compose-material3 = "1.1.2"
androidx-activityCompose = "1.8.0"
core-ktx = "1.12.0"
junit = "4.13.2"
androidx-test-ext-junit = "1.1.5"
espresso-core = "3.5.1"
lifecycle-runtime-ktx = "2.6.2"
compose-bom = "2023.08.00"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" }
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext-junit" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" }
lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle-runtime-ktx" }
compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
Expand Down

0 comments on commit ccd0831

Please sign in to comment.