Skip to content

Commit

Permalink
refactor: Migrate Internal MPUtility class to kotlin (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi-mParticle authored Dec 10, 2024
1 parent 65f31cc commit b0c0fdb
Show file tree
Hide file tree
Showing 6 changed files with 910 additions and 867 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class DeviceAttributes
attributes.put(MessageKey.DEVICE_SUPPORTS_TELEPHONY, MPUtility.hasTelephony(appContext))

val rootedObject = JSONObject()
rootedObject.put(MessageKey.DEVICE_ROOTED_CYDIA, MPUtility.isPhoneRooted())
rootedObject.put(MessageKey.DEVICE_ROOTED_CYDIA, MPUtility.isPhoneRooted)
attributes.put(MessageKey.DEVICE_ROOTED, rootedObject)

// screen height/width
Expand All @@ -194,7 +194,7 @@ class DeviceAttributes
attributes.put(MessageKey.DEVICE_COUNTRY, locale.displayCountry)
attributes.put(MessageKey.DEVICE_LOCALE_COUNTRY, locale.country)
attributes.put(MessageKey.DEVICE_LOCALE_LANGUAGE, locale.language)
attributes.put(MessageKey.DEVICE_TIMEZONE_NAME, MPUtility.getTimeZone())
attributes.put(MessageKey.DEVICE_TIMEZONE_NAME, MPUtility.timeZone)
attributes.put(MessageKey.TIMEZONE, TimeZone.getDefault().rawOffset / (1000 * 60 * 60))
// network
val telephonyManager = appContext
Expand All @@ -218,7 +218,7 @@ class DeviceAttributes
}
}
attributes.put(MessageKey.DEVICE_IS_TABLET, MPUtility.isTablet(appContext))
attributes.put(MessageKey.DEVICE_IS_IN_DST, MPUtility.isInDaylightSavings())
attributes.put(MessageKey.DEVICE_IS_IN_DST, MPUtility.isInDaylightSavings)

if (!MPUtility.isEmpty(deviceImei)) {
attributes.put(MessageKey.DEVICE_IMEI, deviceImei)
Expand Down
Loading

0 comments on commit b0c0fdb

Please sign in to comment.