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

Commit ab355a20 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add nullability annotations to the SystemApi." into main

parents 6c562bbf bee96742
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12979,11 +12979,11 @@ package android.service.persistentdata {
    method public long getMaximumDataBlockSize();
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_OEM_UNLOCK_STATE, "android.permission.OEM_UNLOCK_STATE"}) public boolean getOemUnlockEnabled();
    method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_PDB_STATE) public String getPersistentDataPackageName();
    method public byte[] read();
    method @Nullable public byte[] read();
    method @FlaggedApi("android.security.frp_enforcement") public boolean setFactoryResetProtectionSecret(@NonNull byte[]);
    method @Deprecated @RequiresPermission("android.permission.OEM_UNLOCK_STATE") public void setOemUnlockEnabled(boolean);
    method @RequiresPermission("android.permission.OEM_UNLOCK_STATE") public void wipe();
    method public int write(byte[]);
    method public int write(@Nullable byte[]);
    field public static final int FLASH_LOCK_LOCKED = 1; // 0x1
    field public static final int FLASH_LOCK_UNKNOWN = -1; // 0xffffffff
    field public static final int FLASH_LOCK_UNLOCKED = 0; // 0x0
+3 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.service.persistentdata;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
@@ -100,7 +101,7 @@ public class PersistentDataBlockManager {
     */
    @SystemApi
    @SuppressLint("RequiresPermission")
    public int write(byte[] data) {
    public int write(@Nullable byte[] data) {
        try {
            return sService.write(data);
        } catch (RemoteException e) {
@@ -115,7 +116,7 @@ public class PersistentDataBlockManager {
     */
    @SystemApi
    @SuppressLint("RequiresPermission")
    public byte[] read() {
    public @Nullable byte[] read() {
        try {
            return sService.read();
        } catch (RemoteException e) {