Loading core/api/system-current.txt +10 −3 Original line number Diff line number Diff line Loading @@ -8434,10 +8434,15 @@ package android.os { method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener, android.os.Handler) throws java.io.IOException; method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener) throws java.io.IOException; method @Deprecated @RequiresPermission(android.Manifest.permission.RECOVERY) public static void rebootAndApply(@NonNull android.content.Context, @NonNull String, @NonNull String) throws java.io.IOException; method @RequiresPermission(anyOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void rebootAndApply(@NonNull android.content.Context, @NonNull String, boolean) throws java.io.IOException; method @RequiresPermission(anyOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static int rebootAndApply(@NonNull android.content.Context, @NonNull String, boolean) throws java.io.IOException; method @RequiresPermission(allOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void rebootWipeAb(android.content.Context, java.io.File, String) throws java.io.IOException; method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void scheduleUpdateOnBoot(android.content.Context, java.io.File) throws java.io.IOException; method public static boolean verifyPackageCompatibility(java.io.File) throws java.io.IOException; field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_INVALID_PACKAGE_NAME = 2000; // 0x7d0 field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_LSKF_NOT_CAPTURED = 3000; // 0xbb8 field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_PROVIDER_PREPARATION_FAILURE = 5000; // 0x1388 field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_SLOT_MISMATCH = 4000; // 0xfa0 field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_UNSPECIFIED = 1000; // 0x3e8 } public final class RemoteCallback implements android.os.Parcelable { Loading Loading @@ -13515,7 +13520,8 @@ package android.telephony.ims { } public interface SipDelegateConnection { method public void closeDialog(@NonNull String); method public default void cleanupSession(@NonNull String); method @Deprecated public default void closeDialog(@NonNull String); method public void notifyMessageReceiveError(@NonNull String, int); method public void notifyMessageReceived(@NonNull String); method public void sendMessage(@NonNull android.telephony.ims.SipMessage, long); Loading Loading @@ -13966,7 +13972,8 @@ package android.telephony.ims.stub { } public interface SipDelegate { method public void closeDialog(@NonNull String); method public default void cleanupSession(@NonNull String); method @Deprecated public default void closeDialog(@NonNull String); method public void notifyMessageReceiveError(@NonNull String, int); method public void notifyMessageReceived(@NonNull String); method public void sendMessage(@NonNull android.telephony.ims.SipMessage, long); core/java/android/hardware/face/FaceSensorPropertiesInternal.java +1 −2 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ public class FaceSensorPropertiesInternal extends SensorPropertiesInternal { @Override public String toString() { return "ID: " + sensorId + ", Strength: " + sensorStrength + ", Type: " + sensorType + ", SupportsFaceDetection: " + supportsFaceDetection; return "ID: " + sensorId + ", Strength: " + sensorStrength + ", Type: " + sensorType; } } core/java/android/os/IRecoverySystem.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,6 @@ interface IRecoverySystem { boolean requestLskf(in String packageName, in IntentSender sender); boolean clearLskf(in String packageName); boolean isLskfCaptured(in String packageName); boolean rebootWithLskfAssumeSlotSwitch(in String packageName, in String reason); boolean rebootWithLskf(in String packageName, in String reason, in boolean slotSwitch); int rebootWithLskfAssumeSlotSwitch(in String packageName, in String reason); int rebootWithLskf(in String packageName, in String reason, in boolean slotSwitch); } core/java/android/os/RecoverySystem.java +72 −11 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.view.Display.DEFAULT_DISPLAY; import static java.nio.charset.StandardCharsets.UTF_8; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; Loading Loading @@ -154,6 +155,65 @@ public class RecoverySystem { private final IRecoverySystem mService; /** * The error codes for reboots initiated by resume on reboot clients. * @hide */ @IntDef(prefix = { "RESUME_ON_REBOOT_REBOOT_ERROR_" }, value = { RESUME_ON_REBOOT_REBOOT_ERROR_NONE, RESUME_ON_REBOOT_REBOOT_ERROR_UNSPECIFIED, RESUME_ON_REBOOT_REBOOT_ERROR_INVALID_PACKAGE_NAME, RESUME_ON_REBOOT_REBOOT_ERROR_LSKF_NOT_CAPTURED, RESUME_ON_REBOOT_REBOOT_ERROR_SLOT_MISMATCH, RESUME_ON_REBOOT_REBOOT_ERROR_PROVIDER_PREPARATION_FAILURE}) public @interface ResumeOnRebootRebootErrorCode {} /** * The preparation of resume on reboot succeeds. Don't expose it because a successful reboot * should just reboot the device. * @hide */ public static final int RESUME_ON_REBOOT_REBOOT_ERROR_NONE = 0; /** * The resume on reboot fails due to an unknown reason. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_UNSPECIFIED = 1000; /** * The resume on reboot fails because the package name of the client is invalid, e.g. null * packageName, name contains invalid characters, etc. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_INVALID_PACKAGE_NAME = 2000; /** * The resume on reboot fails because the Lock Screen Knowledge Factor hasn't been captured. * This error is also reported if the client attempts to reboot without preparing RoR. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_LSKF_NOT_CAPTURED = 3000; /** * The resume on reboot fails because the client expects a different boot slot for the next boot * on A/B devices. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_SLOT_MISMATCH = 4000; /** * The resume on reboot fails because the resume on reboot provider, e.g. HAL / server based, * fails to arm/store the escrow key. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_PROVIDER_PREPARATION_FAILURE = 5000; /** * Interface definition for a callback to be invoked regularly as * verification proceeds. Loading Loading @@ -723,7 +783,8 @@ public class RecoverySystem { } RecoverySystem rs = (RecoverySystem) context.getSystemService(Context.RECOVERY_SERVICE); // OTA is the sole user, who expects a slot switch. if (!rs.rebootWithLskfAssumeSlotSwitch(context.getPackageName(), reason)) { if (rs.rebootWithLskfAssumeSlotSwitch(context.getPackageName(), reason) != RESUME_ON_REBOOT_REBOOT_ERROR_NONE) { throw new IOException("system not prepared to apply update"); } } Loading Loading @@ -752,19 +813,19 @@ public class RecoverySystem { * @param context the Context to use. * @param reason the reboot reason to give to the {@link PowerManager} * @param slotSwitch true if the caller expects the slot to be switched on A/B devices. * @throws IOException if the reboot couldn't proceed because the device wasn't ready for an * unattended reboot. * * @return 0 on success, and a non-zero error code if the reboot couldn't proceed because the * device wasn't ready for an unattended reboot. * @throws IOException on remote exceptions from the RecoverySystemService * @hide */ @SystemApi @RequiresPermission(anyOf = {android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void rebootAndApply(@NonNull Context context, public static @ResumeOnRebootRebootErrorCode int rebootAndApply(@NonNull Context context, @NonNull String reason, boolean slotSwitch) throws IOException { RecoverySystem rs = context.getSystemService(RecoverySystem.class); if (!rs.rebootWithLskf(context.getPackageName(), reason, slotSwitch)) { throw new IOException("system not prepared to apply update"); } return rs.rebootWithLskf(context.getPackageName(), reason, slotSwitch); } /** Loading Loading @@ -1399,8 +1460,8 @@ public class RecoverySystem { * Calls the recovery system service to reboot and apply update. * */ private boolean rebootWithLskf(String packageName, String reason, boolean slotSwitch) throws IOException { private @ResumeOnRebootRebootErrorCode int rebootWithLskf(String packageName, String reason, boolean slotSwitch) throws IOException { try { return mService.rebootWithLskf(packageName, reason, slotSwitch); } catch (RemoteException e) { Loading @@ -1414,8 +1475,8 @@ public class RecoverySystem { * expects a slot switch for A/B devices. * */ private boolean rebootWithLskfAssumeSlotSwitch(String packageName, String reason) throws IOException { private @ResumeOnRebootRebootErrorCode int rebootWithLskfAssumeSlotSwitch(String packageName, String reason) throws IOException { try { return mService.rebootWithLskfAssumeSlotSwitch(packageName, reason); } catch (RemoteException e) { Loading core/jni/AndroidRuntime.cpp +2 −11 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ #include "jni.h" using namespace android; using android::base::GetBoolProperty; using android::base::GetProperty; extern int register_android_os_Binder(JNIEnv* env); Loading Loading @@ -735,17 +736,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p ALOGI("Leaving lock profiling enabled"); } bool checkJni = false; property_get("dalvik.vm.checkjni", propBuf, ""); if (strcmp(propBuf, "true") == 0) { checkJni = true; } else if (strcmp(propBuf, "false") != 0) { /* property is neither true nor false; fall back on kernel parameter */ property_get("ro.kernel.android.checkjni", propBuf, ""); if (propBuf[0] == '1') { checkJni = true; } } const bool checkJni = GetBoolProperty("dalvik.vm.checkjni", false); ALOGV("CheckJNI is %s\n", checkJni ? "ON" : "OFF"); if (checkJni) { /* extended JNI checking */ Loading Loading
core/api/system-current.txt +10 −3 Original line number Diff line number Diff line Loading @@ -8434,10 +8434,15 @@ package android.os { method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener, android.os.Handler) throws java.io.IOException; method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener) throws java.io.IOException; method @Deprecated @RequiresPermission(android.Manifest.permission.RECOVERY) public static void rebootAndApply(@NonNull android.content.Context, @NonNull String, @NonNull String) throws java.io.IOException; method @RequiresPermission(anyOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void rebootAndApply(@NonNull android.content.Context, @NonNull String, boolean) throws java.io.IOException; method @RequiresPermission(anyOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static int rebootAndApply(@NonNull android.content.Context, @NonNull String, boolean) throws java.io.IOException; method @RequiresPermission(allOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void rebootWipeAb(android.content.Context, java.io.File, String) throws java.io.IOException; method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void scheduleUpdateOnBoot(android.content.Context, java.io.File) throws java.io.IOException; method public static boolean verifyPackageCompatibility(java.io.File) throws java.io.IOException; field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_INVALID_PACKAGE_NAME = 2000; // 0x7d0 field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_LSKF_NOT_CAPTURED = 3000; // 0xbb8 field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_PROVIDER_PREPARATION_FAILURE = 5000; // 0x1388 field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_SLOT_MISMATCH = 4000; // 0xfa0 field public static final int RESUME_ON_REBOOT_REBOOT_ERROR_UNSPECIFIED = 1000; // 0x3e8 } public final class RemoteCallback implements android.os.Parcelable { Loading Loading @@ -13515,7 +13520,8 @@ package android.telephony.ims { } public interface SipDelegateConnection { method public void closeDialog(@NonNull String); method public default void cleanupSession(@NonNull String); method @Deprecated public default void closeDialog(@NonNull String); method public void notifyMessageReceiveError(@NonNull String, int); method public void notifyMessageReceived(@NonNull String); method public void sendMessage(@NonNull android.telephony.ims.SipMessage, long); Loading Loading @@ -13966,7 +13972,8 @@ package android.telephony.ims.stub { } public interface SipDelegate { method public void closeDialog(@NonNull String); method public default void cleanupSession(@NonNull String); method @Deprecated public default void closeDialog(@NonNull String); method public void notifyMessageReceiveError(@NonNull String, int); method public void notifyMessageReceived(@NonNull String); method public void sendMessage(@NonNull android.telephony.ims.SipMessage, long);
core/java/android/hardware/face/FaceSensorPropertiesInternal.java +1 −2 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ public class FaceSensorPropertiesInternal extends SensorPropertiesInternal { @Override public String toString() { return "ID: " + sensorId + ", Strength: " + sensorStrength + ", Type: " + sensorType + ", SupportsFaceDetection: " + supportsFaceDetection; return "ID: " + sensorId + ", Strength: " + sensorStrength + ", Type: " + sensorType; } }
core/java/android/os/IRecoverySystem.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,6 @@ interface IRecoverySystem { boolean requestLskf(in String packageName, in IntentSender sender); boolean clearLskf(in String packageName); boolean isLskfCaptured(in String packageName); boolean rebootWithLskfAssumeSlotSwitch(in String packageName, in String reason); boolean rebootWithLskf(in String packageName, in String reason, in boolean slotSwitch); int rebootWithLskfAssumeSlotSwitch(in String packageName, in String reason); int rebootWithLskf(in String packageName, in String reason, in boolean slotSwitch); }
core/java/android/os/RecoverySystem.java +72 −11 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.view.Display.DEFAULT_DISPLAY; import static java.nio.charset.StandardCharsets.UTF_8; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; Loading Loading @@ -154,6 +155,65 @@ public class RecoverySystem { private final IRecoverySystem mService; /** * The error codes for reboots initiated by resume on reboot clients. * @hide */ @IntDef(prefix = { "RESUME_ON_REBOOT_REBOOT_ERROR_" }, value = { RESUME_ON_REBOOT_REBOOT_ERROR_NONE, RESUME_ON_REBOOT_REBOOT_ERROR_UNSPECIFIED, RESUME_ON_REBOOT_REBOOT_ERROR_INVALID_PACKAGE_NAME, RESUME_ON_REBOOT_REBOOT_ERROR_LSKF_NOT_CAPTURED, RESUME_ON_REBOOT_REBOOT_ERROR_SLOT_MISMATCH, RESUME_ON_REBOOT_REBOOT_ERROR_PROVIDER_PREPARATION_FAILURE}) public @interface ResumeOnRebootRebootErrorCode {} /** * The preparation of resume on reboot succeeds. Don't expose it because a successful reboot * should just reboot the device. * @hide */ public static final int RESUME_ON_REBOOT_REBOOT_ERROR_NONE = 0; /** * The resume on reboot fails due to an unknown reason. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_UNSPECIFIED = 1000; /** * The resume on reboot fails because the package name of the client is invalid, e.g. null * packageName, name contains invalid characters, etc. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_INVALID_PACKAGE_NAME = 2000; /** * The resume on reboot fails because the Lock Screen Knowledge Factor hasn't been captured. * This error is also reported if the client attempts to reboot without preparing RoR. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_LSKF_NOT_CAPTURED = 3000; /** * The resume on reboot fails because the client expects a different boot slot for the next boot * on A/B devices. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_SLOT_MISMATCH = 4000; /** * The resume on reboot fails because the resume on reboot provider, e.g. HAL / server based, * fails to arm/store the escrow key. * @hide */ @SystemApi public static final int RESUME_ON_REBOOT_REBOOT_ERROR_PROVIDER_PREPARATION_FAILURE = 5000; /** * Interface definition for a callback to be invoked regularly as * verification proceeds. Loading Loading @@ -723,7 +783,8 @@ public class RecoverySystem { } RecoverySystem rs = (RecoverySystem) context.getSystemService(Context.RECOVERY_SERVICE); // OTA is the sole user, who expects a slot switch. if (!rs.rebootWithLskfAssumeSlotSwitch(context.getPackageName(), reason)) { if (rs.rebootWithLskfAssumeSlotSwitch(context.getPackageName(), reason) != RESUME_ON_REBOOT_REBOOT_ERROR_NONE) { throw new IOException("system not prepared to apply update"); } } Loading Loading @@ -752,19 +813,19 @@ public class RecoverySystem { * @param context the Context to use. * @param reason the reboot reason to give to the {@link PowerManager} * @param slotSwitch true if the caller expects the slot to be switched on A/B devices. * @throws IOException if the reboot couldn't proceed because the device wasn't ready for an * unattended reboot. * * @return 0 on success, and a non-zero error code if the reboot couldn't proceed because the * device wasn't ready for an unattended reboot. * @throws IOException on remote exceptions from the RecoverySystemService * @hide */ @SystemApi @RequiresPermission(anyOf = {android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void rebootAndApply(@NonNull Context context, public static @ResumeOnRebootRebootErrorCode int rebootAndApply(@NonNull Context context, @NonNull String reason, boolean slotSwitch) throws IOException { RecoverySystem rs = context.getSystemService(RecoverySystem.class); if (!rs.rebootWithLskf(context.getPackageName(), reason, slotSwitch)) { throw new IOException("system not prepared to apply update"); } return rs.rebootWithLskf(context.getPackageName(), reason, slotSwitch); } /** Loading Loading @@ -1399,8 +1460,8 @@ public class RecoverySystem { * Calls the recovery system service to reboot and apply update. * */ private boolean rebootWithLskf(String packageName, String reason, boolean slotSwitch) throws IOException { private @ResumeOnRebootRebootErrorCode int rebootWithLskf(String packageName, String reason, boolean slotSwitch) throws IOException { try { return mService.rebootWithLskf(packageName, reason, slotSwitch); } catch (RemoteException e) { Loading @@ -1414,8 +1475,8 @@ public class RecoverySystem { * expects a slot switch for A/B devices. * */ private boolean rebootWithLskfAssumeSlotSwitch(String packageName, String reason) throws IOException { private @ResumeOnRebootRebootErrorCode int rebootWithLskfAssumeSlotSwitch(String packageName, String reason) throws IOException { try { return mService.rebootWithLskfAssumeSlotSwitch(packageName, reason); } catch (RemoteException e) { Loading
core/jni/AndroidRuntime.cpp +2 −11 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ #include "jni.h" using namespace android; using android::base::GetBoolProperty; using android::base::GetProperty; extern int register_android_os_Binder(JNIEnv* env); Loading Loading @@ -735,17 +736,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p ALOGI("Leaving lock profiling enabled"); } bool checkJni = false; property_get("dalvik.vm.checkjni", propBuf, ""); if (strcmp(propBuf, "true") == 0) { checkJni = true; } else if (strcmp(propBuf, "false") != 0) { /* property is neither true nor false; fall back on kernel parameter */ property_get("ro.kernel.android.checkjni", propBuf, ""); if (propBuf[0] == '1') { checkJni = true; } } const bool checkJni = GetBoolProperty("dalvik.vm.checkjni", false); ALOGV("CheckJNI is %s\n", checkJni ? "ON" : "OFF"); if (checkJni) { /* extended JNI checking */ Loading