Skip to content

Commit

Permalink
Merge pull request #579 from seedvault-app/staging/android14-bp
Browse files Browse the repository at this point in the history
Get app working in Android 14, built via Android.bp
  • Loading branch information
grote authored Oct 10, 2023
2 parents 0cd6d05 + 6cb3b30 commit bc90378
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.app.PendingIntent.FLAG_MUTABLE
import android.app.PendingIntent.FLAG_UPDATE_CURRENT
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Context.RECEIVER_NOT_EXPORTED
import android.content.Intent
import android.content.Intent.FLAG_RECEIVER_FOREGROUND
import android.content.IntentFilter
Expand Down Expand Up @@ -52,7 +53,11 @@ internal class ApkInstaller(private val context: Context) {
cont.resume(onBroadcastReceived(i, packageName, cachedApks, installResult))
}
}
context.registerReceiver(broadcastReceiver, IntentFilter(BROADCAST_ACTION))
context.registerReceiver(
broadcastReceiver,
IntentFilter(BROADCAST_ACTION),
RECEIVER_NOT_EXPORTED,
)
cont.invokeOnCancellation { context.unregisterReceiver(broadcastReceiver) }

install(cachedApks, installerPackageName)
Expand Down

0 comments on commit bc90378

Please sign in to comment.