File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
firebase-sessions/src/main/kotlin/com/google/firebase/sessions Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,12 @@ internal object SessionEvents {
128
128
val context = firebaseApp.applicationContext
129
129
val packageName = context.packageName
130
130
val packageInfo = context.packageManager.getPackageInfo(packageName, 0 )
131
+ val buildVersion =
132
+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .P ) {
133
+ packageInfo.longVersionCode
134
+ } else {
135
+ @Suppress(" DEPRECATION" ) packageInfo.versionCode
136
+ }
131
137
132
138
return ApplicationInfo (
133
139
appId = firebaseApp.options.applicationId,
@@ -139,7 +145,7 @@ internal object SessionEvents {
139
145
AndroidApplicationInfo (
140
146
packageName = packageName,
141
147
versionName = packageInfo.versionName,
142
- appBuildVersion = packageInfo.versionCode .toString(),
148
+ appBuildVersion = buildVersion .toString(),
143
149
deviceManufacturer = Build .MANUFACTURER ,
144
150
)
145
151
)
You can’t perform that action at this time.
0 commit comments