Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04e17a55 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7014159 from 4b63b1db to rvc-qpr2-release

Change-Id: I1f3938523119cd0d218cbde061101a36af63c711
parents 456586b2 4b63b1db
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.content.pm.PackageManager
import android.content.pm.PackageManager.FLAG_PERMISSION_AUTO_REVOKED
import android.content.pm.PackageManager.FLAG_PERMISSION_USER_SET
import android.content.pm.PackageManager.PERMISSION_GRANTED
@@ -190,6 +191,13 @@ suspend fun dumpAutoRevokePermissions(context: Context): AutoRevokePermissionsDu
class AutoRevokeOnBootReceiver : BroadcastReceiver() {

    override fun onReceive(context: Context, intent: Intent?) {

        // Auto-revoke is not enabled on Automotive devices
        if (context.packageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) {
            DumpableLog.i(LOG_TAG, "Auto-revoke not scheduled on Automotive devices")
            return
        }

        // Init firstBootTime
        val firstBootTime = context.firstBootTime