ApkInstaller: Supress NewApi for

* Pre-34, this was marked as @hide and @TestApi
* We were using it as a system app with hidden APIs allowed,
  and having added the framework android.jar to gradle
* 91fa0b1298
  made it public, so lint now complains. Silence that.

Change-Id: I5a1ec9847a25a0798726af3867d7660db1528a00
This commit is contained in:
Chirayu Desai 2023-10-09 00:16:15 +05:30
parent 1e2d66fccc
commit aa0e82cfca

View file

@ -1,5 +1,6 @@
package com.stevesoltys.seedvault.restore.install
import android.annotation.SuppressLint
import android.app.PendingIntent
import android.app.PendingIntent.FLAG_MUTABLE
import android.app.PendingIntent.FLAG_UPDATE_CURRENT
@ -57,6 +58,7 @@ internal class ApkInstaller(private val context: Context) {
install(cachedApks, installerPackageName)
}
@SuppressLint("NewApi")
private fun install(cachedApks: List<File>, installerPackageName: String?) {
val sessionParams = SessionParams(MODE_FULL_INSTALL).apply {
setInstallerPackageName(installerPackageName)