Skip to content

Commit

Permalink
ApkInstaller: Supress NewApi for
Browse files Browse the repository at this point in the history
* 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
* https://android.googlesource.com/platform/frameworks/base/+/91fa0b12986ac4832568ce2e7280d1da52a959da
  made it public, so lint now complains. Silence that.

Change-Id: I5a1ec9847a25a0798726af3867d7660db1528a00
  • Loading branch information
chirayudesai committed Oct 8, 2023
1 parent 1e2d66f commit aa0e82c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit aa0e82c

Please sign in to comment.