Always use the server based provider if HAL isn't installed
If the device doesn't have the reboot escorw HAL, default the provider to server-based. It helps OEM testing before our P/H flag rollout; because most OEM devices don't install the HAL. Test: unittests Change-Id: Ia43ab0abb769bbf8e11e61841f4a647ae2acc6be
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user