PackageInfoCompat

public final class PackageInfoCompat
extends Object

java.lang.Object
   ↳ androidx.core.content.pm.PackageInfoCompat


Helper for accessing features in PackageInfo.

Summary

Public methods

static long getLongVersionCode(PackageInfo info)

Return R.attr.versionCode and R.attr.versionCodeMajor combined together as a single long value.

Inherited methods

Public methods

getLongVersionCode

public static long getLongVersionCode (PackageInfo info)

Return R.attr.versionCode and R.attr.versionCodeMajor combined together as a single long value. The versionCodeMajor is placed in the upper 32 bits on Android P or newer, otherwise these bits are all set to 0.

Parameters
info PackageInfo

Returns
long