Merge changes Ia43ab0ab,I0c4b91aa
* changes: Always use the server based provider if HAL isn't installed Dump the IOexception before retrying load escrow key
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user