SessionInstaller: Claim responsibility for future updates
The new setRequestUpdateOwnership() method allows us to indicate to the system that we intend to be responsible for future updates to an app it is installing. Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -109,6 +109,7 @@ class SessionInstaller(context: Context) : InstallerBase(context) {
|
||||
}
|
||||
if (isUAndAbove()) {
|
||||
setInstallerPackageName(context.packageName)
|
||||
setRequestUpdateOwnership(true)
|
||||
}
|
||||
}
|
||||
val sessionId = packageInstaller.createSession(sessionParams)
|
||||
|
||||
Reference in New Issue
Block a user