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

Commit 474d549f authored by Tianjie Xu's avatar Tianjie Xu Committed by Gerrit Code Review
Browse files

Merge changes Ia43ab0ab,I0c4b91aa

* changes:
  Always use the server based provider if HAL isn't installed
  Dump the IOexception before retrying load escrow key
parents d1473b36 adc5a1d7
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.UserIdInt;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.pm.UserInfo;
import android.os.Handler;
import android.os.SystemClock;
@@ -224,6 +225,12 @@ class RebootEscrowManager {
        }

        public boolean serverBasedResumeOnReboot() {
            // Always use the server based RoR if the HAL isn't installed on device.
            if (!mContext.getPackageManager().hasSystemFeature(
                    PackageManager.FEATURE_REBOOT_ESCROW)) {
                return true;
            }

            return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_OTA,
                    "server_based_ror_enabled", false);
        }
@@ -374,6 +381,7 @@ class RebootEscrowManager {
        try {
            escrowKey = getAndClearRebootEscrowKey(kk);
        } catch (IOException e) {
            Slog.i(TAG, "Failed to load escrow key, scheduling retry.", e);
            scheduleLoadRebootEscrowDataOrFail(retryHandler, attemptNumber + 1, users,
                    rebootEscrowUsers);
            return;